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:
Enji Cooper 2014-11-01 17:22:53 +00:00
parent 4dc3ed6a7b
commit a8b9bac8b5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=273938

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)