diff options
author | ngie <ngie@FreeBSD.org> | 2014-11-01 17:22:53 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2014-11-01 17:22:53 +0000 |
commit | 7f45fd4285f093e1bc42f1d9253689c951802cd7 (patch) | |
tree | 65e6f0998c6b4940fdee03f640c2a3e1308eee31 /contrib/netbsd-tests | |
parent | 4e2c8a8ae0090b2855f8bd07da04456f07047955 (diff) | |
download | FreeBSD-src-7f45fd4285f093e1bc42f1d9253689c951802cd7.zip FreeBSD-src-7f45fd4285f093e1bc42f1d9253689c951802cd7.tar.gz |
getitimer on FreeBSD returns the last set time instead of the remaining time;
test for that instead
Submitted by: pho
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 b384541..0e4e7b6 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) |