source: test/do-tests.sh @ ccef50c

cachetimestampsdevelopdpdk-ndagetsiliverc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformance
Last change on this file since ccef50c was ccef50c, checked in by Shane Alcock <salcock@…>, 3 years ago

Add /usr/local/lib to LD_LIBRARY_PATH for test scripts

  • Property mode set to 100755
File size: 5.9 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:/usr/local/lib/"
17export DYLD_LIBRARY_PATH="${libdir}"
18echo SLL Decoder
19do_test ./test-decode2 pcap:traces/100_sll.pcap
20do_test ./test-decode2 pcapfile:traces/sll.pcap.gz
21
22echo 802.1x decoder
23do_test ./test-decode2 pcap:traces/8021x.pcap
24
25echo MPLS Decoder
26do_test ./test-decode2 pcap:traces/10_mpls_ip.pcap
27
28echo Radius Decoder
29do_test ./test-decode2 pcap:traces/radius.pcap
30
31rm -f traces/*.out.*
32echo \* Read erf
33do_test ./test-format erf
34do_test ./test-decode erf
35
36echo \* Read pcap
37do_test ./test-format pcap
38do_test ./test-decode pcap
39
40echo \* Read pcapfile
41do_test ./test-format pcapfile
42do_test ./test-decode pcapfile
43
44echo \* Read pcapfilens
45do_test ./test-format pcapfilens
46do_test ./test-decode pcapfilens
47
48echo \* Read legacyatm
49do_test ./test-format legacyatm
50do_test ./test-decode legacyatm
51
52echo \* Read legacyeth
53do_test ./test-format legacyeth
54do_test ./test-decode legacyeth
55
56echo \* Read legacypos
57do_test ./test-format legacypos
58do_test ./test-decode legacypos
59
60echo \* Read tsh
61do_test ./test-format tsh
62do_test ./test-decode tsh
63
64echo \* Read rawerf
65do_test ./test-format rawerf
66do_test ./test-decode rawerf
67
68echo \* Read pcapng
69do_test ./test-format pcapng
70do_test ./test-decode pcapng
71
72
73echo \* Testing pcap-bpf
74do_test ./test-pcap-bpf
75
76echo \* Testing payload length
77do_test ./test-plen
78
79echo \* Testing port numbers
80do_test ./test-ports
81
82echo \* Testing fragment parsing
83do_test ./test-fragment
84
85echo \* Testing event framework
86do_test ./test-event
87
88echo \* Testing time conversions
89echo \* ERF
90do_test ./test-time erf
91echo \* pcapfile
92do_test ./test-time pcapfile
93echo \* pcapfilens
94do_test ./test-time pcapfilens
95echo \* legacyatm
96do_test ./test-time legacyatm
97echo \* legacypos
98do_test ./test-time legacypos
99echo \* legacyeth
100do_test ./test-time legacyeth
101echo \* pcap
102do_test ./test-time pcap
103echo \* rawerf
104do_test ./test-time rawerf
105echo \* tsh
106do_test ./test-time tsh
107echo \* pcapng
108do_test ./test-time pcapng
109
110echo \* Testing directions
111do_test ./test-dir
112
113echo \* Testing wireless
114do_test ./test-wireless
115
116echo \* Testing error handling
117do_test ./test-errors
118
119echo \* Testing drop counters for erf
120do_test ./test-drops erf
121
122echo \* Testing drop counters for pcapfile
123do_test ./test-drops pcapfile
124
125echo \* Testing drop counters for duck
126do_test ./test-drops duck
127
128echo \* Testing drop counters for legacyatm
129do_test ./test-drops legacyatm
130
131echo \* Testing drop counters for legacypos
132do_test ./test-drops legacypos
133
134echo \* Testing drop counters for legacyeth
135do_test ./test-drops legacyeth
136
137echo \* Testing drop counters for tsh
138do_test ./test-drops tsh
139
140echo \* Testing larger trace file
141do_test ./test-drops legacylarge
142
143echo \* Testing writing erf
144do_test ./test-write erf
145
146echo \* Testing write pcap
147do_test ./test-write pcap
148
149echo \* Testing write pcapfile
150do_test ./test-write pcapfile
151
152# Not all types are convertable, for instance libtrace doesn't
153# do rtclient output, and erf doesn't support 802.11
154echo \* Conversions
155echo " * erf -> erf"
156rm -f traces/*.out.*
157do_test ./test-convert erf erf
158
159echo " * erf -> pcap"
160do_test ./test-convert erf pcap
161
162echo " * pcap -> erf"
163rm -f traces/*.out.*
164do_test ./test-convert pcap erf
165
166echo " * pcapfile -> erf"
167rm -f traces/*.out.*
168do_test ./test-convert pcapfile erf
169
170echo " * pcapfile -> pcapfile"
171rm -f traces/*.out.*
172do_test ./test-convert pcapfile pcapfile
173
174echo " * pcapfilens -> pcapfile"
175rm -f traces/*.out.*
176do_test ./test-convert pcapfilens pcapfile
177
178echo " * pcapfilens -> erf"
179rm -f traces/*.out.*
180do_test ./test-convert pcapfilens erf
181
182echo " * pcap -> pcapfile"
183rm -f traces/*.out.*
184do_test ./test-convert pcap pcapfile
185
186echo " * erf -> pcapfile"
187rm -f traces/*.out.*
188do_test ./test-convert erf pcapfile
189
190echo " * pcapng -> pcapfile"
191rm -f traces/*.out.*
192do_test ./test-convert pcapng pcapfile
193
194echo " * pcapng -> erf"
195rm -f traces/*.out.*
196do_test ./test-convert pcapng erf
197
198echo " * pcap (sll) -> erf    raw IP"
199rm -f traces/*.out.*
200do_test ./test-convert sll1 erf
201
202echo " * pcap (sll) -> erf    loopback"
203rm -f traces/*.out.*
204do_test ./test-convert sll2 erf
205
206
207#./test-convert rtclient erf
208#./test-convert rtclient pcap
209
210# This doesn't work because pcap doesn't support legacyatm's linktype
211# so the packet is converted to a raw IP packet, which when read
212# back in again doesn't match legacyatm's original packet.
213#echo " * legacyatm -> pcapfile"
214#rm -f traces/*.out.*
215#./test-convert legacyatm pcapfile
216
217echo " * legacyeth -> pcapfile"
218rm -f traces/*.out.*
219do_test ./test-convert legacyeth pcapfile
220
221echo " * legacypos -> pcapfile"
222rm -f traces/*.out.*
223do_test ./test-convert legacypos pcapfile
224
225# Don't bother with this anymore -- DUCK qualifies as 'meta' so
226# doesn't get written at the moment.
227#echo " * duck -> duck"
228#rm -f traces/*.out.*
229#do_test ./test-convert duck duck
230
231echo " * tsh -> pcapfile"
232rm -f traces/*.out.*
233do_test ./test-convert tsh pcapfile
234
235echo " * tsh -> pcap"
236rm -f traces/*.out.*
237do_test ./test-convert tsh pcap
238
239echo \* Testing packet truncation
240echo " * pcap "
241rm -f traces/*.out.*
242do_test ./test-setcaplen pcap pcapfile
243
244echo " * pcapfile "
245rm -f traces/*.out.*
246do_test ./test-setcaplen pcapfile pcapfile
247
248echo " * erf "
249rm -f traces/*.out.*
250do_test ./test-setcaplen erf erf
251
252echo " * pcapng "
253rm -f traces/*.out.*
254do_test ./test-setcaplen pcapng pcapfile
255
256echo " * pcapfilens "
257rm -f traces/*.out.*
258do_test ./test-setcaplen pcapfilens pcapfile
259
260
261
262echo " * format autodetection - uncompressed"
263do_test ./test-autodetect traces/5_packets.erf
264echo " * format autodetection - gzip"
265do_test ./test-autodetect traces/5_packets.erf.gz
266echo " * format autodetection - bzip2"
267do_test ./test-autodetect traces/5_packets.erf.bz2
268echo " * format autodetection - lzma"
269do_test ./test-autodetect traces/5_packets.erf.xz
270
271echo " * VXLan decode"
272do_test ./test-vxlan
273
274echo
275echo "Tests passed: $OK"
276echo "Tests failed: $FAIL"
Note: See TracBrowser for help on using the repository browser.