diff options
author | Gerald Combs <gerald@wireshark.org> | 2012-03-30 18:19:35 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2012-03-30 18:19:35 +0000 |
commit | 005e724d27a7ad8dbdda44e285f67db5aa316940 (patch) | |
tree | b6a0ff72e11a05be3b20195f359e37b27209e6b9 /test | |
parent | 3a20e1061552455f5f3ddc32e0f95e82f3df5def (diff) |
Fix the location of dhcp.pcap.
svn path=/trunk/; revision=41857
Diffstat (limited to 'test')
-rwxr-xr-x | test/suite-capture.sh | 4 | ||||
-rwxr-xr-x | test/suite-clopts.sh | 4 | ||||
-rwxr-xr-x | test/suite-io.sh | 20 | ||||
-rwxr-xr-x | test/test.sh | 1 |
4 files changed, 14 insertions, 15 deletions
diff --git a/test/suite-capture.sh b/test/suite-capture.sh index 8fab50b270..9636f248c9 100755 --- a/test/suite-capture.sh +++ b/test/suite-capture.sh @@ -168,7 +168,7 @@ capture_step_10packets_stdout() { # capture packets via a fifo capture_step_fifo() { mkfifo 'fifo' - (cat $CAPFILE; sleep 1; tail -c +25 $CAPFILE) > fifo & + (cat "${CAPTURE_DIR}dhcp.pcap"; sleep 1; tail -c +25 "${CAPTURE_DIR}dhcp.pcap") > fifo & $DUT -i fifo $TRAFFIC_CAPTURE_PROMISC \ -w ./testout.pcap \ -a duration:$TRAFFIC_CAPTURE_DURATION \ @@ -201,7 +201,7 @@ capture_step_fifo() { # capture packets via a fifo capture_step_stdin() { - (cat $CAPFILE; sleep 1; tail -c +25 $CAPFILE) | \ + (cat "${CAPTURE_DIR}dhcp.pcap"; sleep 1; tail -c +25 "${CAPTURE_DIR}dhcp.pcap") | \ $DUT -i - $TRAFFIC_CAPTURE_PROMISC \ -w ./testout.pcap \ -a duration:$TRAFFIC_CAPTURE_DURATION \ diff --git a/test/suite-clopts.sh b/test/suite-clopts.sh index dc8107a991..88f984db80 100755 --- a/test/suite-clopts.sh +++ b/test/suite-clopts.sh @@ -48,7 +48,7 @@ test_single_char_options() # check exit status when reading an existing file clopts_step_existing_file() { - $TSHARK -r $CAPFILE > ./testout.txt 2>&1 + $TSHARK -r "${CAPTURE_DIR}dhcp.pcap" > ./testout.txt 2>&1 RETURNVALUE=$? if [ ! $RETURNVALUE -eq $EXIT_OK ]; then test_step_failed "exit status: $RETURNVALUE" @@ -182,7 +182,7 @@ clopts_step_valid_name_resolving() { # check exit status of some basic functions clopts_suite_basic() { - test_step_add "Exit status for existing file: \""$CAPFILE"\" must be 0" clopts_step_existing_file + test_step_add "Exit status for existing file: \"""${CAPTURE_DIR}dhcp.pcap""\" must be 0" clopts_step_existing_file test_step_add "Exit status for none existing files must be 2" clopts_step_nonexisting_file } diff --git a/test/suite-io.sh b/test/suite-io.sh index 51d4f0135b..65f34d1092 100755 --- a/test/suite-io.sh +++ b/test/suite-io.sh @@ -21,7 +21,7 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# +# # common exit status values @@ -32,7 +32,7 @@ EXIT_ERROR=2 # input of file io_step_input_file() { - $DUT -r dhcp.pcap -w ./testout.pcap > ./testout.txt 2>&1 + $DUT -r "${CAPTURE_DIR}dhcp.pcap" -w ./testout.pcap > ./testout.txt 2>&1 RETURNVALUE=$? if [ ! $RETURNVALUE -eq $EXIT_OK ]; then test_step_failed "exit status of $DUT: $RETURNVALUE" @@ -47,7 +47,7 @@ io_step_input_file() { test_step_failed "No output file!" return fi - + # ok, we got a capture file, does it contain exactly 10 packets? $CAPINFOS ./testout.pcap > ./testout.txt grep -Ei 'Number of packets:[[:blank:]]+4' ./testout.txt > /dev/null @@ -63,9 +63,9 @@ io_step_input_file() { fi } -# piping input file to stdout using "-w -" +# piping input file to stdout using "-w -" io_step_output_piping() { - $DUT -r dhcp.pcap -w - > ./testout.pcap 2>./testout.txt + $DUT -r "${CAPTURE_DIR}dhcp.pcap" -w - > ./testout.pcap 2>./testout.txt RETURNVALUE=$? if [ ! $RETURNVALUE -eq $EXIT_OK ]; then test_step_failed "exit status of $DUT: $RETURNVALUE" @@ -78,7 +78,7 @@ io_step_output_piping() { test_step_failed "No output file!" return fi - + # ok, we got a capture file, does it contain exactly 10 packets? $CAPINFOS ./testout.pcap > ./testout2.txt 2>&1 grep -Ei 'Number of packets:[[:blank:]]+4' ./testout2.txt > /dev/null @@ -93,9 +93,9 @@ io_step_output_piping() { fi } -# piping input file to stdout using "-w -" +# piping input file to stdout using "-w -" io_step_input_piping() { - cat -B dhcp.pcap | $DUT -r - -w ./testout.pcap 2>./testout.txt + cat -B "${CAPTURE_DIR}dhcp.pcap" | $DUT -r - -w ./testout.pcap 2>./testout.txt RETURNVALUE=$? if [ ! $RETURNVALUE -eq $EXIT_OK ]; then $TSHARK -D @@ -110,7 +110,7 @@ io_step_input_piping() { test_step_failed "No output file!" return fi - + # ok, we got a capture file, does it contain exactly 10 packets? $CAPINFOS ./testout.pcap > ./testout2.txt 2>&1 grep -Ei 'Number of packets:[[:blank:]]+4' ./testout2.txt > /dev/null @@ -141,7 +141,7 @@ tshark_io_suite() { dumpcap_io_suite() { #DUT="$DUMPCAP -Q" DUT=$DUMPCAP - + test_step_add "Input file" io_step_input_file } diff --git a/test/test.sh b/test/test.sh index 03186902f1..c7bd4fcce8 100755 --- a/test/test.sh +++ b/test/test.sh @@ -27,7 +27,6 @@ # # an existing capture file -CAPFILE=./dhcp.pcap USE_COLOR=1 RUN_SUITE="" PRINT_USAGE=0 |