source: test/do-tests.sh @ 99425f8

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since 99425f8 was 99425f8, checked in by Shane Alcock <salcock@…>, 11 years ago
  • Added a new test for an SLL trace where the Ethernet header has NOT been included in the capture
  • Check tracesets test now just checks a single trace from each set by default
  • Property mode set to 100755
File size: 3.7 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#./test-convert rtclient erf
144#./test-convert rtclient pcap
145
146# This doesn't work because pcap doesn't support legacyatm's linktype
147# so the packet is converted to a raw IP packet, which when read
148# back in again doesn't match legacyatm's original packet.
149#echo " * legacyatm -> pcapfile"
150#rm -f traces/*.out.*
151#./test-convert legacyatm pcapfile
152
153echo " * legacyeth -> pcapfile"
154rm -f traces/*.out.*
155do_test ./test-convert legacyeth pcapfile
156
157echo " * legacypos -> pcapfile"
158rm -f traces/*.out.*
159do_test ./test-convert legacypos pcapfile
160
161echo " * duck -> duck"
162rm -f traces/*.out.*
163do_test ./test-convert duck duck
164
165echo " * tsh -> pcapfile"
166rm -f traces/*.out.*
167do_test ./test-convert tsh pcapfile
168
169echo " * tsh -> pcap"
170rm -f traces/*.out.*
171do_test ./test-convert tsh pcap
172
173echo
174echo "Tests passed: $OK"
175echo "Tests failed: $FAIL"
Note: See TracBrowser for help on using the repository browser.