fix setitimer test for returned it_value
An old it_value of {4,3} is valid. Allow it. Reviewed by: bdrewery MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D26445
This commit is contained in:
parent
63c8336d4d
commit
01348ccda2
@ -195,8 +195,10 @@ 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");
|
||||
ATF_REQUIRE_MSG(ot.it_value.tv_sec < 4 ||
|
||||
ot.it_value.tv_sec == 4 && ot.it_value.tv_usec <= 3,
|
||||
"setitimer(2) returned invalid it_value: %jd %jd",
|
||||
(intmax_t)ot.it_value.tv_sec, (intmax_t)ot.it_value.tv_usec);
|
||||
#else
|
||||
if (ot.it_value.tv_sec != 4 || ot.it_value.tv_usec != 3)
|
||||
atf_tc_fail("setitimer(2) did not store old values");
|
||||
|
Loading…
Reference in New Issue
Block a user