[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit

Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/libc/glibc/glibc-2.22/misc/tst-hsearch.c b/ap/libc/glibc/glibc-2.22/misc/tst-hsearch.c
new file mode 100644
index 0000000..d390f1d
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/misc/tst-hsearch.c
@@ -0,0 +1,34 @@
+#include <search.h>
+#include <stdio.h>
+
+static int
+do_test (void)
+{
+  int a = 1;
+  int b = 2;
+  ENTRY i;
+  ENTRY *e;
+
+  if (hcreate (20) == 0)
+    {
+      puts ("hcreate failed");
+      return 1;
+    }
+
+  i.key = (char *) "one";
+  i.data = &a;
+  if (hsearch (i, ENTER) == NULL)
+    return 1;
+
+  i.key = (char *) "one";
+  i.data = &b;
+  e = hsearch (i, ENTER);
+  printf ("e.data = %d\n", *(int *) e->data);
+  if (*(int *) e->data != 1)
+    return 1;
+
+  return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"