Date: Thu, 1 Oct 2020 21:52:57 +0000 (UTC) From: Eric van Gyzen <vangyzen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366346 - head/contrib/netbsd-tests/lib/libc/sys Message-ID: <202010012152.091Lqvoh029652@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: vangyzen Date: Thu Oct 1 21:52:57 2020 New Revision: 366346 URL: https://svnweb.freebsd.org/changeset/base/366346 Log: 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 Modified: head/contrib/netbsd-tests/lib/libc/sys/t_getitimer.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_getitimer.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_getitimer.c Thu Oct 1 21:48:22 2020 (r366345) +++ head/contrib/netbsd-tests/lib/libc/sys/t_getitimer.c Thu Oct 1 21:52:57 2020 (r366346) @@ -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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010012152.091Lqvoh029652>