diff options
author | Guy Harris <guy@alum.mit.edu> | 2010-05-28 01:09:28 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2010-05-28 01:09:28 +0000 |
commit | 8d949600afae5a913b192a33bfda4ee66ee46a07 (patch) | |
tree | e24bc4f968885383c519979541e82d0235c91b63 /test | |
parent | 69d739246716fd744aab79ce6d65919bc6393df9 (diff) |
Use return rather than exit in main().
Return 2 for a capture error - we mainly use 1 for command-line syntax
errors (rather than, say, filter syntax errors or an invalid interface).
Now that TShark exits with an error status when given an invalid capture
filter or invalid interface, check for "error" rather than "success" as
an exit status.
svn path=/trunk/; revision=33006
Diffstat (limited to 'test')
-rwxr-xr-x | test/suite-clopts.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/suite-clopts.sh b/test/suite-clopts.sh index 1a74ade55a..b0e496c56b 100755 --- a/test/suite-clopts.sh +++ b/test/suite-clopts.sh @@ -113,7 +113,7 @@ clopts_step_invalid_capfilter() { $TSHARK -f 'jkghg' -w './testout.pcap' > ./testout.txt 2>&1 RETURNVALUE=$? - if [ ! $RETURNVALUE -eq $EXIT_OK ]; then + if [ ! $RETURNVALUE -eq $EXIT_ERROR ]; then test_step_failed "exit status: $RETURNVALUE" else grep -i 'Invalid capture filter: "jkghg"' ./testout.txt > /dev/null @@ -131,7 +131,7 @@ clopts_step_invalid_capfilter() { clopts_step_invalid_interface() { $TSHARK -i invalid_interface -w './testout.pcap' > ./testout.txt 2>&1 RETURNVALUE=$? - if [ ! $RETURNVALUE -eq $EXIT_OK ]; then + if [ ! $RETURNVALUE -eq $EXIT_ERROR ]; then test_step_failed "exit status: $RETURNVALUE" else grep -i 'The capture session could not be initiated' ./testout.txt > /dev/null |