summaryrefslogtreecommitdiff
path: root/test/suite-clopts.sh
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-11-21 18:56:25 +0000
committerGuy Harris <guy@alum.mit.edu>2012-11-21 18:56:25 +0000
commitfd62af338d206b807abd71b23e9509b861598b99 (patch)
tree76d3050ae68d0f917579f640896bab24d342f382 /test/suite-clopts.sh
parent6c6b37cada66b260d66325e7900ab5b2e03951b2 (diff)
downloadwireshark-fd62af338d206b807abd71b23e9509b861598b99.tar.gz
If we're not on Windows, assume we don't have sufficient privileges to
open any capture devices, so "-i invalid_interface" will fail with a "no permission" error rather than a "no such device" error. svn path=/trunk/; revision=46115
Diffstat (limited to 'test/suite-clopts.sh')
-rwxr-xr-xtest/suite-clopts.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/suite-clopts.sh b/test/suite-clopts.sh
index c6118c559c..c19212da57 100755
--- a/test/suite-clopts.sh
+++ b/test/suite-clopts.sh
@@ -114,7 +114,11 @@ clopts_step_dumpcap_invalid_interfaces() {
if [ ! $RETURNVALUE -eq $EXIT_COMMAND_LINE ]; then
test_step_failed "exit status: $RETURNVALUE"
else
- grep -i 'The capture session could not be initiated (No such device exists).' ./testout.txt > /dev/null
+ if [ "$WS_SYSTEM" = "Windows" ] ; then
+ grep -i 'The capture session could not be initiated (No such device exists).' ./testout.txt > /dev/null
+ else
+ grep -i "The capture session could not be initiated (You don't have permission to capture on that device)." ./testout.txt > /dev/null
+ fi
if [ $? -eq 0 ]; then
test_step_output_print ./testout.txt
test_step_ok
@@ -233,7 +237,11 @@ clopts_step_tshark_invalid_interfaces() {
if [ ! $RETURNVALUE -eq $EXIT_COMMAND_LINE ]; then
test_step_failed "exit status: $RETURNVALUE"
else
- grep -i "Failed to match interface 'invalid_interface'" ./testout.txt > /dev/null
+ if [ "$WS_SYSTEM" = "Windows" ] ; then
+ grep -i 'The capture session could not be initiated (No such device exists).' ./testout.txt > /dev/null
+ else
+ grep -i "The capture session could not be initiated (You don't have permission to capture on that device)." ./testout.txt > /dev/null
+ fi
if [ $? -eq 0 ]; then
test_step_output_print ./testout.txt
test_step_ok