1 AT_BANNER([library unit tests])
3 AT_SETUP([flow extractor])
4 AT_CHECK([$PYTHON3 $srcdir/flowgen.py >/dev/null])
5 AT_CHECK([ovstest test-flows flows pcap], [0], [checked 247 packets, 0 errors
9 AT_SETUP([TCP/IP checksumming])
10 AT_CHECK([ovstest test-csum], [0], [....#....#....####................................#................................#
14 AT_SETUP([hash functions])
15 AT_CHECK([ovstest test-hash])
20 AT_CHECK([ovstest test-hmap], [0], [............
24 AT_SETUP([hash index])
26 AT_CHECK([ovstest test-hindex], [0], [.....................
30 AT_SETUP([cuckoo hash])
32 AT_CHECK([ovstest test-cmap check 1], [0], [...
36 AT_SETUP([counting cuckoo hash])
38 AT_CHECK([ovstest test-ccmap check 1], [0], [...
42 AT_SETUP([atomic operations])
43 AT_CHECK([ovstest test-atomic])
46 AT_SETUP([test linked lists])
47 AT_CHECK([ovstest test-list], [0], [....
51 AT_SETUP([packet library])
52 AT_CHECK([ovstest test-packets])
57 AT_CHECK([ovstest test-sha1], [0], [..........
61 AT_SETUP([test skiplist])
62 AT_KEYWORDS([skiplist])
63 AT_CHECK([ovstest test-skiplist], [0], [skiplist insert
72 AT_SETUP([type properties])
73 AT_CHECK([test-type-props])
76 AT_SETUP([strtok_r bug fix])
77 AT_CHECK([test-strtok_r], [0], [NULL NULL
81 AT_SETUP([byte order conversion])
82 AT_KEYWORDS([byte order])
83 AT_CHECK([ovstest test-byte-order])
86 AT_SETUP([random number generator])
87 AT_CHECK([ovstest test-random], [0], [dnl
123 (expected values are 5000)
125 nibble 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
126 0 640 589 610 613 588 632 650 613 582 646 627 640 612 650 637 671
127 1 626 642 663 620 630 609 617 602 615 638 614 644 641 597 598 644
128 2 667 611 617 613 609 629 642 651 604 641 594 659 651 610 617 585
129 3 621 662 594 605 618 644 616 613 613 616 611 608 614 660 653 652
130 4 641 668 621 664 619 624 625 642 624 629 607 566 599 639 618 614
131 5 666 629 620 621 581 615 598 620 630 651 671 622 628 603 657 588
132 6 620 640 621 606 603 644 628 633 620 597 653 591 637 658 634 615
133 7 636 645 679 593 598 609 612 612 623 626 638 669 603 629 606 622
134 (expected values are 625)
149 [bitwise_is_all_zeros],
152 [AT_SETUP([testname[()] function])
153 AT_KEYWORDS([testname])
154 AT_CHECK([ovstest test-util testname], [0], [], [])
157 AT_SETUP([unix socket, short pathname - C])
158 AT_SKIP_IF([test "$IS_WIN32" = "yes"])
159 AT_CHECK([ovstest test-unix-socket x])
162 dnl Unix sockets with long names are problematic because the name has to
163 dnl go in a fixed-length field in struct sockaddr_un. Generally the limit
164 dnl is about 100 bytes. On Linux, we work around this by indirecting through
165 dnl a directory fd using /proc/self/fd/<dirfd>. We do not have a workaround
166 dnl for other platforms, so we skip the test there.
167 AT_SETUP([unix socket, long pathname - C])
168 AT_SKIP_IF([test "$IS_WIN32" = "yes"])
169 dnl Linux sockaddr_un has a 108-byte limit, so this needs to be longer.
170 dnl Linux "ecryptfs" has a 143-byte limit, so we use that many bytes.
171 longname=01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012
173 dnl Skip the test if the directory can't be created (presumably the file
174 dnl system doesn't support such long names).
175 AT_CHECK([mkdir $longname || exit 77])
177 AT_CHECK([cd $longname && ovstest test-unix-socket ../$longname/socket socket])
180 AT_SETUP([unix socket, short pathname - Python3])
181 AT_SKIP_IF([test "$IS_WIN32" = "yes"])
182 AT_KEYWORDS([python unixsocket])
183 AT_CHECK([$PYTHON3 $srcdir/test-unix-socket.py x])
186 dnl Unix sockets with long names are problematic because the name has to
187 dnl go in a fixed-length field in struct sockaddr_un. Generally the limit
188 dnl is about 100 bytes. On Linux, we work around this by indirecting through
189 dnl a directory fd using /proc/self/fd/<dirfd>. We do not have a workaround
190 dnl for other platforms, so we skip the test there.
191 AT_SETUP([unix socket, long pathname - Python3])
192 AT_SKIP_IF([test "$IS_WIN32" = "yes"])
193 AT_KEYWORDS([python unixsocket])
194 dnl Linux sockaddr_un has a 108-byte limit, so this needs to be longer.
195 dnl Linux "ecryptfs" has a 143-byte limit, so we use that many bytes.
196 longname=01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012
198 dnl Skip the test if the directory can't be created (presumably the file
199 dnl system doesn't support such long names).
200 AT_CHECK([mkdir $longname || exit 77])
201 AT_CHECK([cd $longname && $PYTHON3 $abs_srcdir/test-unix-socket.py ../$longname/socket socket])
204 AT_SETUP([ovs_assert])
205 if test "$IS_WIN32" = "yes"; then
211 AT_CHECK([ovstest test-util -voff -vfile:info '-vPATTERN:file:%c|%p|%m' --log-file assert],
212 [$exit_status], [], [stderr])
214 AT_CHECK([sed 's/\(opened log file\) .*/\1/
215 s/|[[^|]]*: /|/' test-util.log], [0], [dnl
216 vlog|INFO|opened log file
217 util|EMER|assertion false failed in test_assert()
220 AT_CHECK([sed 's/.*: //
222 [assertion false failed in test_assert()
227 AT_SETUP([saturating arithmetic])
228 AT_KEYWORDS([sat math sat_math])
229 AT_CHECK([ovstest test-util sat_math])
233 AT_CHECK([ovstest test-util snprintf])
236 AT_SETUP([bitmap functions])
237 AT_CHECK([ovstest test-bitmap check], [0], [..
241 AT_SETUP([use of public headers])
242 AT_CHECK([test-lib], [0], [])
245 AT_SETUP([ofpbuf module])
246 AT_CHECK([ovstest test-ofpbuf], [0], [])
250 AT_CHECK([ovstest test-rcu-quiesce], [0], [])
253 AT_SETUP([stopwatch module])
254 AT_CHECK([ovstest test-stopwatch], [0], [......