getitimer on FreeBSD returns the last set time instead of the remaining time;

test for that instead

Submitted by: pho
This commit is contained in:
ngie 2014-11-01 17:22:53 +00:00
parent 4e2c8a8ae0
commit 7f45fd4285

View File

@ -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)