svn commit: r313372 - projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/lib/libc/stdlib
Ngie Cooper
ngie at FreeBSD.org
Tue Feb 7 02:00:15 UTC 2017
Author: ngie
Date: Tue Feb 7 02:00:14 2017
New Revision: 313372
URL: https://svnweb.freebsd.org/changeset/base/313372
Log:
Uncomment more of the hsearch_r testcases
Call hdestroy/hdestroy_r on FreeBSD instead of hdestroy(1?)(_r).
All but hdestroy_r_nonexistent pass as-is.
Modified:
projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c
Modified: projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c
==============================================================================
--- projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c Tue Feb 7 01:58:02 2017 (r313371)
+++ projects/netbsd-tests-upstream-01-2017/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c Tue Feb 7 02:00:14 2017 (r313372)
@@ -75,7 +75,6 @@ __RCSID("$NetBSD: t_hsearch.c,v 1.4 2014
#define REQUIRE_ERRNO(x) ATF_REQUIRE_MSG(x, "%s", strerror(errno))
-#ifdef __NetBSD__
ATF_TC(hsearch_basic);
ATF_TC_HEAD(hsearch_basic, tc)
{
@@ -122,9 +121,12 @@ ATF_TC_BODY(hsearch_basic, tc)
ATF_REQUIRE_EQ((intptr_t)ep->data, i);
}
+#ifdef __NetBSD__
hdestroy1(free, NULL);
-}
+#else
+ hdestroy();
#endif
+}
ATF_TC(hsearch_duplicate);
ATF_TC_HEAD(hsearch_duplicate, tc)
@@ -232,7 +234,6 @@ ATF_TC_BODY(hsearch_two, tc)
}
#if defined(__FreeBSD__) && 1100027 <= __FreeBSD_version
-#ifdef __NetBSD__
ATF_TC(hsearch_r_basic);
ATF_TC_HEAD(hsearch_r_basic, tc)
{
@@ -278,7 +279,11 @@ ATF_TC_BODY(hsearch_r_basic, tc)
ATF_REQUIRE_EQ((intptr_t)ep->data, i);
}
+#ifdef __NetBSD__
hdestroy1_r(&t, free, NULL);
+#else
+ hdestroy_r(&t);
+#endif
}
#endif
@@ -386,22 +391,17 @@ ATF_TC_BODY(hsearch_r_two, tc)
hdestroy_r(&t);
}
-#endif
ATF_TP_ADD_TCS(tp)
{
-#ifdef __NetBSD__
ATF_TP_ADD_TC(tp, hsearch_basic);
-#endif
ATF_TP_ADD_TC(tp, hsearch_duplicate);
ATF_TP_ADD_TC(tp, hsearch_nonexistent);
ATF_TP_ADD_TC(tp, hsearch_two);
-
+
#if defined(__FreeBSD__) && 1100027 <= __FreeBSD_version
-#ifdef __NetBSD__
ATF_TP_ADD_TC(tp, hsearch_r_basic);
-#endif
ATF_TP_ADD_TC(tp, hsearch_r_duplicate);
ATF_TP_ADD_TC(tp, hsearch_r_nonexistent);
ATF_TP_ADD_TC(tp, hsearch_r_two);
More information about the svn-src-projects
mailing list