1 AT_BANNER([library unit tests])
3 AT_SETUP([test flow extractor])
4 AT_CHECK([$PERL `which flowgen.pl` >/dev/null 3>flows 4>pcap])
5 AT_CHECK([test-flows <flows 3<pcap], [0], [checked 247 packets, 0 errors
9 AT_SETUP([test TCP/IP checksumming])
10 AT_CHECK([test-csum], [0], [....#....#....###................................#................................#
14 AT_SETUP([test hash functions])
18 AT_SETUP([test hash map])
19 AT_CHECK([test-hmap], [0], [.........
23 AT_SETUP([test hash index])
24 AT_CHECK([test-hindex], [0], [.....................
28 AT_SETUP([test atomic operations])
29 AT_CHECK([test-atomic])
32 AT_SETUP([test linked lists])
33 AT_CHECK([test-list], [0], [..
37 AT_SETUP([test packet library])
38 AT_CHECK([test-packets])
41 AT_SETUP([test SHA-1])
42 AT_CHECK([test-sha1], [0], [.........
46 AT_SETUP([test type properties])
47 AT_CHECK([test-type-props])
50 AT_SETUP([test strtok_r bug fix])
51 AT_CHECK([test-strtok_r], [0], [NULL NULL
55 AT_SETUP([test byte order conversion])
56 AT_KEYWORDS([byte order])
57 AT_CHECK([test-byte-order])
60 AT_SETUP([test random number generator])
61 AT_CHECK([test-random], [0], [dnl
97 (expected values are 5000)
99 nibble 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
100 0 640 589 610 613 588 632 650 613 582 646 627 640 612 650 637 671
101 1 626 642 663 620 630 609 617 602 615 638 614 644 641 597 598 644
102 2 667 611 617 613 609 629 642 651 604 641 594 659 651 610 617 585
103 3 621 662 594 605 618 644 616 613 613 616 611 608 614 660 653 652
104 4 641 668 621 664 619 624 625 642 624 629 607 566 599 639 618 614
105 5 666 629 620 621 581 615 598 620 630 651 671 622 628 603 657 588
106 6 620 640 621 606 603 644 628 633 620 597 653 591 637 658 634 615
107 7 636 645 679 593 598 609 612 612 623 626 638 669 603 629 606 622
108 (expected values are 625)
123 [bitwise_is_all_zeros],
125 [AT_SETUP([testname[()] function])
126 AT_KEYWORDS([testname])
127 AT_CHECK([test-util testname], [0], [], [])
130 AT_SETUP([test unix socket, short pathname - C])
131 AT_CHECK([test-unix-socket x])
134 dnl Unix sockets with long names are problematic because the name has to
135 dnl go in a fixed-length field in struct sockaddr_un. Generally the limit
136 dnl is about 100 bytes. On Linux, we work around this by indirecting through
137 dnl a directory fd using /proc/self/fd/<dirfd>. We do not have a workaround
138 dnl for other platforms, so we skip the test there.
139 AT_SETUP([test unix socket, long pathname - C])
140 dnl Linux has a 108 byte limit; this is 150 bytes long.
141 longname=012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
144 AT_CHECK([test-unix-socket ../$longname/socket socket])
147 AT_SETUP([test unix socket, short pathname - Python])
148 AT_SKIP_IF([test $HAVE_PYTHON = no])
149 AT_CHECK([$PYTHON $srcdir/test-unix-socket.py x])
152 dnl Unix sockets with long names are problematic because the name has to
153 dnl go in a fixed-length field in struct sockaddr_un. Generally the limit
154 dnl is about 100 bytes. On Linux, we work around this by indirecting through
155 dnl a directory fd using /proc/self/fd/<dirfd>. We do not have a workaround
156 dnl for other platforms, so we skip the test there.
157 AT_SETUP([test unix socket, long pathname - Python])
158 AT_SKIP_IF([test $HAVE_PYTHON = no])
159 dnl Linux has a 108 byte limit; this is 150 bytes long.
160 longname=012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
163 AT_CHECK([$PYTHON $abs_srcdir/test-unix-socket.py ../$longname/socket socket])
166 AT_SETUP([ovs_assert])
167 OVS_LOGDIR=`pwd`; export OVS_LOGDIR
168 AT_CHECK([test-util -voff -vfile:info '-vPATTERN:file:%c|%p|%m' --log-file assert || kill -l $?],
172 AT_CHECK([sed 's/\(opened log file\) .*/\1/
173 s/|[[^|]]*: /|/' test-util.log], [0], [dnl
174 vlog|INFO|opened log file
175 util|EMER|assertion false failed in test_assert()
178 AT_CHECK([sed 's/.*: //
180 [assertion false failed in test_assert()
186 AT_CHECK([test-util snprintf])