source: test/do-tests.sh @ bf1029a

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since bf1029a was 376c785, checked in by Shane Alcock <salcock@…>, 8 years ago
  • Added test cases for the rawerf format
  • Property mode set to 100755
File size: 4.2 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 legacyatm
45do_test ./test-format legacyatm
46do_test ./test-decode legacyatm
47
48echo \* Read legacyeth
49do_test ./test-format legacyeth
50do_test ./test-decode legacyeth
51
52echo \* Read legacypos
53do_test ./test-format legacypos
54do_test ./test-decode legacypos
55
56echo \* Read tsh
57do_test ./test-format tsh
58do_test ./test-decode tsh
59
60echo \* Read rawerf
61do_test ./test-format rawerf
62do_test ./test-decode rawerf
63
64
65echo \* Testing pcap-bpf
66do_test ./test-pcap-bpf
67
68echo \* Testing payload length
69do_test ./test-plen
70
71echo \* Testing event framework
72do_test ./test-event
73
74echo \* Testing time conversions
75do_test ./test-time
76
77echo \* Testing directions
78do_test ./test-dir
79
80echo \* Testing wireless
81do_test ./test-wireless
82
83echo \* Testing error handling
84do_test ./test-errors
85
86echo \* Testing drop counters for erf
87do_test ./test-drops erf
88
89echo \* Testing drop counters for pcapfile
90do_test ./test-drops pcapfile
91
92echo \* Testing drop counters for duck
93do_test ./test-drops duck
94
95echo \* Testing drop counters for legacyatm
96do_test ./test-drops legacyatm
97
98echo \* Testing drop counters for legacypos
99do_test ./test-drops legacypos
100
101echo \* Testing drop counters for legacyeth
102do_test ./test-drops legacyeth
103
104echo \* Testing drop counters for tsh
105do_test ./test-drops tsh
106
107echo \* Testing larger trace file
108do_test ./test-drops legacylarge
109
110echo \* Testing writing erf
111do_test ./test-write erf
112
113echo \* Testing write pcap
114do_test ./test-write pcap
115
116echo \* Testing write pcapfile
117do_test ./test-write pcapfile
118
119# Not all types are convertable, for instance libtrace doesn't
120# do rtclient output, and erf doesn't support 802.11
121echo \* Conversions
122echo " * erf -> erf"
123rm -f traces/*.out.*
124do_test ./test-convert erf erf
125
126echo " * erf -> pcap"
127do_test ./test-convert erf pcap
128
129echo " * pcap -> erf"
130rm -f traces/*.out.*
131do_test ./test-convert pcap erf
132
133echo " * pcapfile -> erf"
134rm -f traces/*.out.*
135do_test ./test-convert pcapfile erf
136
137echo " * pcapfile -> pcapfile"
138rm -f traces/*.out.*
139do_test ./test-convert pcapfile pcapfile
140
141echo " * pcap -> pcapfile"
142rm -f traces/*.out.*
143do_test ./test-convert pcap pcapfile
144
145echo " * erf -> pcapfile"
146rm -f traces/*.out.*
147do_test ./test-convert erf pcapfile
148
149echo " * pcap (sll) -> erf    raw IP"
150rm -f traces/*.out.*
151do_test ./test-convert sll1 erf
152
153echo " * pcap (sll) -> erf    loopback"
154rm -f traces/*.out.*
155do_test ./test-convert sll2 erf
156
157
158#./test-convert rtclient erf
159#./test-convert rtclient pcap
160
161# This doesn't work because pcap doesn't support legacyatm's linktype
162# so the packet is converted to a raw IP packet, which when read
163# back in again doesn't match legacyatm's original packet.
164#echo " * legacyatm -> pcapfile"
165#rm -f traces/*.out.*
166#./test-convert legacyatm pcapfile
167
168echo " * legacyeth -> pcapfile"
169rm -f traces/*.out.*
170do_test ./test-convert legacyeth pcapfile
171
172echo " * legacypos -> pcapfile"
173rm -f traces/*.out.*
174do_test ./test-convert legacypos pcapfile
175
176echo " * duck -> duck"
177rm -f traces/*.out.*
178do_test ./test-convert duck duck
179
180echo " * tsh -> pcapfile"
181rm -f traces/*.out.*
182do_test ./test-convert tsh pcapfile
183
184echo " * tsh -> pcap"
185rm -f traces/*.out.*
186do_test ./test-convert tsh pcap
187
188echo " * format autodetection - uncompressed"
189do_test ./test-autodetect traces/5_packets.erf
190echo " * format autodetection - gzip"
191do_test ./test-autodetect traces/5_packets.erf.gz
192echo " * format autodetection - bzip2"
193do_test ./test-autodetect traces/5_packets.erf.bz2
194
195echo
196echo "Tests passed: $OK"
197echo "Tests failed: $FAIL"
Note: See TracBrowser for help on using the repository browser.