source: test/do-tests.sh @ 09dd4f1

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since 09dd4f1 was 09dd4f1, checked in by Shane Alcock <salcock@…>, 10 years ago
  • Disabled direct read for trace set testing (as direct read seems to cause issues)
  • Added test-case for threading bug fixed in r1685
  • Property mode set to 100755
File size: 3.6 KB
Line 
1#!/bin/bash
2
3OK=0
4FAIL=""
5
6do_test() {
7        if $@; then
8                OK=$[ $OK + 1 ]
9        else
10                FAIL="$FAIL
11$@"
12        fi
13}
14
15libdir=../lib/.libs:../libpacketdump/.libs
16export LD_LIBRARY_PATH="$libdir"
17export DYLD_LIBRARY_PATH="${libdir}"
18echo SLL Decoder
19do_test ./test-decode2 pcap:traces/100_sll.pcap
20
21echo 802.1x decoder
22do_test ./test-decode2 pcap:traces/8021x.pcap
23
24echo MPLS Decoder
25do_test ./test-decode2 pcap:traces/10_mpls_ip.pcap
26
27echo Radius Decoder
28do_test ./test-decode2 pcap:traces/radius.pcap
29
30rm -f traces/*.out.*
31echo \* Read erf
32do_test ./test-format erf
33do_test ./test-decode erf
34
35echo \* Read pcap
36do_test ./test-format pcap
37do_test ./test-decode pcap
38
39echo \* Read pcapfile
40do_test ./test-format pcapfile
41do_test ./test-decode pcapfile
42
43echo \* Read legacyatm
44do_test ./test-format legacyatm
45do_test ./test-decode legacyatm
46
47echo \* Read legacyeth
48do_test ./test-format legacyeth
49do_test ./test-decode legacyeth
50
51echo \* Read legacypos
52do_test ./test-format legacypos
53do_test ./test-decode legacypos
54
55echo \* Read tsh
56do_test ./test-format tsh
57do_test ./test-decode tsh
58
59echo \* Testing pcap-bpf
60do_test ./test-pcap-bpf
61
62echo \* Testing payload length
63do_test ./test-plen
64
65echo \* Testing event framework
66do_test ./test-event
67
68echo \* Testing time conversions
69do_test ./test-time
70
71echo \* Testing directions
72do_test ./test-dir
73
74echo \* Testing wireless
75do_test ./test-wireless
76
77echo \* Testing error handling
78do_test ./test-errors
79
80echo \* Testing drop counters for erf
81do_test ./test-drops erf
82
83echo \* Testing drop counters for pcapfile
84do_test ./test-drops pcapfile
85
86echo \* Testing drop counters for duck
87do_test ./test-drops duck
88
89echo \* Testing drop counters for legacyatm
90do_test ./test-drops legacyatm
91
92echo \* Testing drop counters for legacypos
93do_test ./test-drops legacypos
94
95echo \* Testing drop counters for legacyeth
96do_test ./test-drops legacyeth
97
98echo \* Testing drop counters for tsh
99do_test ./test-drops tsh
100
101echo \* Testing larger trace file
102do_test ./test-drops legacylarge
103
104echo \* Testing writing erf
105do_test ./test-write erf
106
107echo \* Testing write pcap
108do_test ./test-write pcap
109
110echo \* Testing write pcapfile
111do_test ./test-write pcapfile
112
113# Not all types are convertable, for instance libtrace doesn't
114# do rtclient output, and erf doesn't support 802.11
115echo \* Conversions
116echo " * erf -> erf"
117rm -f traces/*.out.*
118do_test ./test-convert erf erf
119
120echo " * erf -> pcap"
121do_test ./test-convert erf pcap
122
123echo " * pcap -> erf"
124rm -f traces/*.out.*
125do_test ./test-convert pcap erf
126
127echo " * pcapfile -> erf"
128rm -f traces/*.out.*
129do_test ./test-convert pcapfile erf
130
131echo " * pcapfile -> pcapfile"
132rm -f traces/*.out.*
133do_test ./test-convert pcapfile pcapfile
134
135echo " * pcap -> pcapfile"
136rm -f traces/*.out.*
137do_test ./test-convert pcap pcapfile
138
139echo " * erf -> pcapfile"
140rm -f traces/*.out.*
141do_test ./test-convert erf pcapfile
142#./test-convert rtclient erf
143#./test-convert rtclient pcap
144
145# This doesn't work because pcap doesn't support legacyatm's linktype
146# so the packet is converted to a raw IP packet, which when read
147# back in again doesn't match legacyatm's original packet.
148#echo " * legacyatm -> pcapfile"
149#rm -f traces/*.out.*
150#./test-convert legacyatm pcapfile
151
152echo " * legacyeth -> pcapfile"
153rm -f traces/*.out.*
154do_test ./test-convert legacyeth pcapfile
155
156echo " * legacypos -> pcapfile"
157rm -f traces/*.out.*
158do_test ./test-convert legacypos pcapfile
159
160echo " * duck -> duck"
161rm -f traces/*.out.*
162do_test ./test-convert duck duck
163
164echo " * tsh -> pcapfile"
165rm -f traces/*.out.*
166do_test ./test-convert tsh pcapfile
167
168echo " * tsh -> pcap"
169rm -f traces/*.out.*
170do_test ./test-convert tsh pcap
171
172echo
173echo "Tests passed: $OK"
174echo "Tests failed: $FAIL"
Note: See TracBrowser for help on using the repository browser.