classifier: Fix segfault iterating with rules that differ only in priority.
[sliver-openvswitch.git] / tests / timeval.at
1 AT_BANNER([timeval unit tests])
2
3 AT_SETUP([check that time advances])
4 AT_KEYWORDS([timeval])
5 AT_CHECK([test-timeval plain], [0])
6 AT_CLEANUP
7
8 AT_SETUP([check that time advances after daemonize()])
9 AT_KEYWORDS([timeval])
10 AT_CHECK([test-timeval daemon], [0])
11 AT_CHECK(
12   [# First try a quick sleep, so that the test completes very quickly
13    # in the normal case.  POSIX doesn't require fractional times to
14    # work, so this might not work.
15    sleep 0.1; if test -e test-timeval.success; then echo success; exit 0; fi
16    # Then wait up to 2 seconds.
17    sleep 1; if test -e test-timeval.success; then echo success; exit 0; fi
18    sleep 1; if test -e test-timeval.success; then echo success; exit 0; fi
19    echo failure; exit 1],
20   [0], [success
21 ], [])
22 AT_CLEANUP