svn commit: r273529 - head/contrib/netbsd-tests/lib/libc/gen

Garrett Cooper ngie at FreeBSD.org
Thu Oct 23 07:20:36 UTC 2014


Author: ngie
Date: Thu Oct 23 07:20:35 2014
New Revision: 273529
URL: https://svnweb.freebsd.org/changeset/base/273529

Log:
  - Omit the poll testcases on FreeBSD (they require pollts)
  - Add necessary headers for the testcases
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/contrib/netbsd-tests/lib/libc/gen/t_sleep.c

Modified: head/contrib/netbsd-tests/lib/libc/gen/t_sleep.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/gen/t_sleep.c	Thu Oct 23 07:11:58 2014	(r273528)
+++ head/contrib/netbsd-tests/lib/libc/gen/t_sleep.c	Thu Oct 23 07:20:35 2014	(r273529)
@@ -49,6 +49,11 @@
 #define KEVNT_TIMEOUT	10300		/* measured in milli-seconds */
 #define FUZZ		(40 * MILLION)	/* scheduling fuzz accepted - 40 ms */
 
+#ifdef __FreeBSD__
+#include <sys/time.h>
+#include <inttypes.h>
+#endif
+
 /*
  * Timer notes
  *
@@ -78,7 +83,9 @@ static volatile int sig;
 int sleeptest(int (*)(struct timespec *, struct timespec *), bool, bool);
 int do_nanosleep(struct timespec *, struct timespec *);
 int do_select(struct timespec *, struct timespec *);
+#ifdef __NetBSD__
 int do_poll(struct timespec *, struct timespec *);
+#endif
 int do_sleep(struct timespec *, struct timespec *);
 int do_kevent(struct timespec *, struct timespec *);
 void sigalrm(int);
@@ -116,6 +123,7 @@ do_select(struct timespec *delay, struct
 	return ret;
 }
 
+#ifdef __NetBSD__
 int
 do_poll(struct timespec *delay, struct timespec *remain)
 {
@@ -129,6 +137,7 @@ do_poll(struct timespec *delay, struct t
 		ret = 0;
 	return ret;
 }
+#endif
 
 int
 do_sleep(struct timespec *delay, struct timespec *remain)
@@ -210,6 +219,7 @@ ATF_TC_BODY(select, tc)
 	sleeptest(do_select, true, true);
 }
 
+#ifdef __NetBSD__
 ATF_TC(poll);
 ATF_TC_HEAD(poll, tc) 
 {
@@ -223,6 +233,7 @@ ATF_TC_BODY(poll, tc)
 
 	sleeptest(do_poll, true, true);
 }
+#endif
 
 ATF_TC(sleep);
 ATF_TC_HEAD(sleep, tc) 
@@ -329,7 +340,9 @@ ATF_TP_ADD_TCS(tp) 
 {
 	ATF_TP_ADD_TC(tp, nanosleep);
 	ATF_TP_ADD_TC(tp, select);
+#ifdef __NetBSD__
 	ATF_TP_ADD_TC(tp, poll); 
+#endif
 	ATF_TP_ADD_TC(tp, sleep);
 	ATF_TP_ADD_TC(tp, kevent);
  


More information about the svn-src-all mailing list