mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
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:
parent
4dc3ed6a7b
commit
a8b9bac8b5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=273938
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue