forked from osmocom/wireshark
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
This commit is contained in:
parent
6c6b37cada
commit
fd62af338d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue