2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-29 15:28:56 +00:00
Files
openvswitch/tests/timeval.at

23 lines
758 B
Plaintext

AT_BANNER([timeval unit tests])
AT_SETUP([check that time advances])
AT_KEYWORDS([timeval])
AT_CHECK([test-timeval plain], [0])
AT_CLEANUP
AT_SETUP([check that time advances after daemonize()])
AT_KEYWORDS([timeval])
AT_CHECK([test-timeval daemon], [0])
AT_CHECK(
[# First try a quick sleep, so that the test completes very quickly
# in the normal case. POSIX doesn't require fractional times to
# work, so this might not work.
sleep 0.1; if test -e test-timeval.success; then echo success; exit 0; fi
# Then wait up to 2 seconds.
sleep 1; if test -e test-timeval.success; then echo success; exit 0; fi
sleep 1; if test -e test-timeval.success; then echo success; exit 0; fi
echo failure; exit 1],
[0], [success
], [])
AT_CLEANUP