diff options
author | Enji Cooper <ngie@FreeBSD.org> | 2014-11-01 17:22:53 +0000 |
---|---|---|
committer | Enji Cooper <ngie@FreeBSD.org> | 2014-11-01 17:22:53 +0000 |
commit | a8b9bac8b5e140fb6ccfe65ac2007c8b9797e249 (patch) | |
tree | 65e6f0998c6b4940fdee03f640c2a3e1308eee31 /contrib/netbsd-tests | |
parent | 4dc3ed6a7b55dca7f52117f8c798deeb3be24804 (diff) | |
download | src-a8b9bac8b5e140fb6ccfe65ac2007c8b9797e249.tar.gz src-a8b9bac8b5e140fb6ccfe65ac2007c8b9797e249.zip |
getitimer on FreeBSD returns the last set time instead of the remaining time;
test for that instead
Submitted by: pho
Notes
Notes:
svn path=/head/; revision=273938
Diffstat (limited to 'contrib/netbsd-tests')
-rw-r--r-- | contrib/netbsd-tests/lib/libc/sys/t_getitimer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_getitimer.c b/contrib/netbsd-tests/lib/libc/sys/t_getitimer.c index b3845418cbe9..0e4e7b6be333 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_getitimer.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_getitimer.c @@ -194,8 +194,13 @@ ATF_TC_BODY(setitimer_old, tc) ATF_REQUIRE(setitimer(ITIMER_REAL, &it, &ot) == 0); +#ifdef __FreeBSD__ + if (ot.it_value.tv_sec == 4 && ot.it_value.tv_usec == 3) + atf_tc_fail("setitimer(2) did not return remaining time"); +#else if (ot.it_value.tv_sec != 4 || ot.it_value.tv_usec != 3) atf_tc_fail("setitimer(2) did not store old values"); +#endif } ATF_TP_ADD_TCS(tp) |