source: test/do-tests.sh @ 3fc3267

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivelibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since 3fc3267 was 3fc3267, checked in by Shane Alcock <salcock@…>, 6 years ago

Add protocol decoder functions for GRE and VXLAN

Many thanks to Perry Lorier for providing this patch.

Includes a test-case for VXLAN parsing.

  • Property mode set to 100755
File size: 5.0 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
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
68
69echo \* Testing pcap-bpf
70do_test ./test-pcap-bpf
71
72echo \* Testing payload length
73do_test ./test-plen
74
75echo \* Testing port numbers
76do_test ./test-ports
77
78echo \* Testing fragment parsing
79do_test ./test-fragment
80
81echo \* Testing event framework
82do_test ./test-event
83
84echo \* Testing time conversions
85echo \* ERF
86do_test ./test-time erf
87echo \* pcapfile
88do_test ./test-time pcapfile
89echo \* pcapfilens
90do_test ./test-time pcapfilens
91echo \* legacyatm
92do_test ./test-time legacyatm
93echo \* legacypos
94do_test ./test-time legacypos
95echo \* legacyeth
96do_test ./test-time legacyeth
97echo \* pcap
98do_test ./test-time pcap
99echo \* rawerf
100do_test ./test-time rawerf
101echo \* tsh
102do_test ./test-time tsh
103
104echo \* Testing directions
105do_test ./test-dir
106
107echo \* Testing wireless
108do_test ./test-wireless
109
110echo \* Testing error handling
111do_test ./test-errors
112
113echo \* Testing drop counters for erf
114do_test ./test-drops erf
115
116echo \* Testing drop counters for pcapfile
117do_test ./test-drops pcapfile
118
119echo \* Testing drop counters for duck
120do_test ./test-drops duck
121
122echo \* Testing drop counters for legacyatm
123do_test ./test-drops legacyatm
124
125echo \* Testing drop counters for legacypos
126do_test ./test-drops legacypos
127
128echo \* Testing drop counters for legacyeth
129do_test ./test-drops legacyeth
130
131echo \* Testing drop counters for tsh
132do_test ./test-drops tsh
133
134echo \* Testing larger trace file
135do_test ./test-drops legacylarge
136
137echo \* Testing writing erf
138do_test ./test-write erf
139
140echo \* Testing write pcap
141do_test ./test-write pcap
142
143echo \* Testing write pcapfile
144do_test ./test-write pcapfile
145
146# Not all types are convertable, for instance libtrace doesn't
147# do rtclient output, and erf doesn't support 802.11
148echo \* Conversions
149echo " * erf -> erf"
150rm -f traces/*.out.*
151do_test ./test-convert erf erf
152
153echo " * erf -> pcap"
154do_test ./test-convert erf pcap
155
156echo " * pcap -> erf"
157rm -f traces/*.out.*
158do_test ./test-convert pcap erf
159
160echo " * pcapfile -> erf"
161rm -f traces/*.out.*
162do_test ./test-convert pcapfile erf
163
164echo " * pcapfile -> pcapfile"
165rm -f traces/*.out.*
166do_test ./test-convert pcapfile pcapfile
167
168echo " * pcapfilens -> pcapfile"
169rm -f traces/*.out.*
170do_test ./test-convert pcapfilens pcapfile
171
172echo " * pcapfilens -> erf"
173rm -f traces/*.out.*
174do_test ./test-convert pcapfilens erf
175
176echo " * pcap -> pcapfile"
177rm -f traces/*.out.*
178do_test ./test-convert pcap pcapfile
179
180echo " * erf -> pcapfile"
181rm -f traces/*.out.*
182do_test ./test-convert erf pcapfile
183
184echo " * pcap (sll) -> erf    raw IP"
185rm -f traces/*.out.*
186do_test ./test-convert sll1 erf
187
188echo " * pcap (sll) -> erf    loopback"
189rm -f traces/*.out.*
190do_test ./test-convert sll2 erf
191
192
193#./test-convert rtclient erf
194#./test-convert rtclient pcap
195
196# This doesn't work because pcap doesn't support legacyatm's linktype
197# so the packet is converted to a raw IP packet, which when read
198# back in again doesn't match legacyatm's original packet.
199#echo " * legacyatm -> pcapfile"
200#rm -f traces/*.out.*
201#./test-convert legacyatm pcapfile
202
203echo " * legacyeth -> pcapfile"
204rm -f traces/*.out.*
205do_test ./test-convert legacyeth pcapfile
206
207echo " * legacypos -> pcapfile"
208rm -f traces/*.out.*
209do_test ./test-convert legacypos pcapfile
210
211echo " * duck -> duck"
212rm -f traces/*.out.*
213do_test ./test-convert duck duck
214
215echo " * tsh -> pcapfile"
216rm -f traces/*.out.*
217do_test ./test-convert tsh pcapfile
218
219echo " * tsh -> pcap"
220rm -f traces/*.out.*
221do_test ./test-convert tsh pcap
222
223echo " * format autodetection - uncompressed"
224do_test ./test-autodetect traces/5_packets.erf
225echo " * format autodetection - gzip"
226do_test ./test-autodetect traces/5_packets.erf.gz
227echo " * format autodetection - bzip2"
228do_test ./test-autodetect traces/5_packets.erf.bz2
229echo " * format autodetection - lzma"
230do_test ./test-autodetect traces/5_packets.erf.xz
231
232echo " * VXLan decode"
233do_test ./test-vxlan
234
235echo
236echo "Tests passed: $OK"
237echo "Tests failed: $FAIL"
Note: See TracBrowser for help on using the repository browser.