]> git.proxmox.com Git - mirror_ovs.git/blob - tests/library.at
418b279753e81ef9fa1d079997b071120493ebfd
[mirror_ovs.git] / tests / library.at
1 AT_BANNER([library unit tests])
2
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
6 ])
7 AT_CLEANUP
8
9 AT_SETUP([test TCP/IP checksumming])
10 AT_CHECK([test-csum], [0], [ignore])
11 AT_CLEANUP
12
13 AT_SETUP([test hash functions])
14 AT_CHECK([test-hash], [0], [ignore])
15 AT_CLEANUP
16
17 AT_SETUP([test hash map])
18 AT_CHECK([test-hmap], [0], [ignore])
19 AT_CLEANUP
20
21 AT_SETUP([test linked lists])
22 AT_CHECK([test-list], [0], [ignore])
23 AT_CLEANUP
24
25 AT_SETUP([test SHA-1])
26 AT_CHECK([test-sha1], [0], [ignore])
27 AT_CLEANUP
28
29 AT_SETUP([test type properties])
30 AT_CHECK([test-type-props], [0], [ignore])
31 AT_CLEANUP
32
33 AT_SETUP([test strtok_r bug fix])
34 AT_CHECK([test-strtok_r], [0], [ignore])
35 AT_CLEANUP
36
37 AT_SETUP([test byte order conversion])
38 AT_KEYWORDS([byte order])
39 AT_CHECK([test-byte-order], [0], [ignore])
40 AT_CLEANUP
41
42 AT_SETUP([test random number generator])
43 AT_CHECK([test-random], [0], [dnl
44 average=7fa2014f
45
46 bit 0 1
47 0 4946 5054
48 1 4939 5061
49 2 4947 5053
50 3 4935 5065
51 4 5004 4996
52 5 4998 5002
53 6 5062 4938
54 7 5009 4991
55 8 5001 4999
56 9 5022 4978
57 10 5006 4994
58 11 5039 4961
59 12 4940 5060
60 13 5048 4952
61 14 4930 5070
62 15 4973 5027
63 16 4954 5046
64 17 5043 4957
65 18 5020 4980
66 19 5104 4896
67 20 5051 4949
68 21 5003 4997
69 22 5110 4890
70 23 4950 5050
71 24 5016 4984
72 25 5019 4981
73 26 4948 5052
74 27 4995 5005
75 28 4995 5005
76 29 4969 5031
77 30 5109 4891
78 31 4984 5016
79 (expected values are 5000)
80
81 nibble 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
82 0 640 589 610 613 588 632 650 613 582 646 627 640 612 650 637 671
83 1 626 642 663 620 630 609 617 602 615 638 614 644 641 597 598 644
84 2 667 611 617 613 609 629 642 651 604 641 594 659 651 610 617 585
85 3 621 662 594 605 618 644 616 613 613 616 611 608 614 660 653 652
86 4 641 668 621 664 619 624 625 642 624 629 607 566 599 639 618 614
87 5 666 629 620 621 581 615 598 620 630 651 671 622 628 603 657 588
88 6 620 640 621 606 603 644 628 633 620 597 653 591 637 658 634 615
89 7 636 645 679 593 598 609 612 612 623 626 638 669 603 629 606 622
90 (expected values are 625)
91 ])
92 AT_CLEANUP
93
94 AT_SETUP([test unix socket -- short pathname])
95 AT_CHECK([test-unix-socket x])
96 AT_CLEANUP
97
98 dnl Unix sockets with long names are problematic because the name has to
99 dnl go in a fixed-length field in struct sockaddr_un. Generally the limit
100 dnl is about 100 bytes. On Linux, we work around this by indirecting through
101 dnl a directory fd using /proc/self/fd/<dirfd>. We do not have a workaround
102 dnl for other platforms, so we skip the test there.
103 AT_SETUP([test unix socket -- long pathname])
104 AT_CHECK([dnl
105 case `uname` in dnl (
106 *[[lL]]inux*)
107 exit 0
108 ;; dnl (
109 *)
110 dnl Magic exit code to tell Autotest to skip this test.
111 exit 77
112 ;;
113 esac
114 ])
115 dnl Linux has a 108 byte limit; this is 150 bytes long.
116 mkdir 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
117 cd 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
118 AT_CHECK([test-unix-socket ../012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789/socket socket])
119 AT_CLEANUP