source: test/do-tests.sh @ afaf6e8

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