diff options
author | ngie <ngie@FreeBSD.org> | 2014-10-23 07:20:35 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2014-10-23 07:20:35 +0000 |
commit | b94c3058c50917e64b446d140b4f7b364248df24 (patch) | |
tree | e5c14baaaa29434c03ddbd63d80c8bd2d5507161 /contrib/netbsd-tests | |
parent | 3dacc6b94766f84205f3ddd88bbb78f816e042e4 (diff) | |
download | FreeBSD-src-b94c3058c50917e64b446d140b4f7b364248df24.zip FreeBSD-src-b94c3058c50917e64b446d140b4f7b364248df24.tar.gz |
- Omit the poll testcases on FreeBSD (they require pollts)
- Add necessary headers for the testcases
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'contrib/netbsd-tests')
-rw-r--r-- | contrib/netbsd-tests/lib/libc/gen/t_sleep.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/lib/libc/gen/t_sleep.c b/contrib/netbsd-tests/lib/libc/gen/t_sleep.c index e4dc94e..f722ec9 100644 --- a/contrib/netbsd-tests/lib/libc/gen/t_sleep.c +++ b/contrib/netbsd-tests/lib/libc/gen/t_sleep.c @@ -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 timespec *remain) return ret; } +#ifdef __NetBSD__ int do_poll(struct timespec *delay, struct timespec *remain) { @@ -129,6 +137,7 @@ do_poll(struct timespec *delay, struct timespec *remain) 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); |