aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/fixtures_ws.py2
-rw-r--r--test/suite_capture.py9
-rw-r--r--test/suite_clopts.py4
3 files changed, 10 insertions, 5 deletions
diff --git a/test/fixtures_ws.py b/test/fixtures_ws.py
index a7d9a33fde..49db5a0c2a 100644
--- a/test/fixtures_ws.py
+++ b/test/fixtures_ws.py
@@ -38,7 +38,7 @@ def capture_interface(request, cmd_dumpcap):
# Matches: "lo (Loopback)" (Linux), "lo0 (Loopback)" (macOS) or
# "\Device\NPF_{...} (Npcap Loopback Adapter)" (Windows)
print('"dumpcap -D" output:\n%s' % (outs,))
- m = re.search(r'^(\d+)\. .*\(.*Loopback.*\)', outs, re.MULTILINE)
+ m = re.search(r'^(\d+)\. .*\(.*Loopback.*\)', outs, re.MULTILINE|re.IGNORECASE)
if not m:
fixtures.skip('Test requires a capture interface.')
iface = m.group(1)
diff --git a/test/suite_capture.py b/test/suite_capture.py
index af4d5f88a5..11217f2fbe 100644
--- a/test/suite_capture.py
+++ b/test/suite_capture.py
@@ -19,6 +19,7 @@ import sys
import threading
import time
import uuid
+import sysconfig
capture_duration = 5
@@ -75,8 +76,6 @@ def capture_command(*args, shell=False):
if type(cmd_args[0]) != str:
# Assume something like ['wireshark', '-k']
cmd_args = list(cmd_args[0]) + list(cmd_args)[1:]
- if sys.platform == "win32":
- cmd_args[0] = '"{}"'.format(cmd_args[0])
if shell:
cmd_args = ' '.join(cmd_args)
return cmd_args
@@ -169,6 +168,8 @@ def check_capture_stdin(cmd_dumpcap, result_file):
is_gui = type(cmd) != str and '-k' in cmd[0]
if is_gui:
capture_cmd += ' --log-level=info'
+ if sysconfig.get_platform().startswith('mingw'):
+ fixtures.skip('FIXME Pipes are broken with the MSYS2 shell')
pipe_proc = self.assertRun(slow_dhcp_cmd + ' | ' + capture_cmd, shell=True)
if is_gui:
self.assertTrue(self.grepOutput('Wireshark is up and ready to go'), 'No startup message.')
@@ -252,6 +253,8 @@ def check_dumpcap_autostop_stdin(cmd_dumpcap, result_file):
'-w', testout_file,
'-a', condition,
))
+ if sysconfig.get_platform().startswith('mingw'):
+ fixtures.skip('FIXME Pipes are broken with the MSYS2 shell')
pipe_proc = self.assertRun(cat100_dhcp_cmd + ' | ' + capture_cmd, shell=True)
self.assertTrue(os.path.isfile(testout_file))
@@ -288,6 +291,8 @@ def check_dumpcap_ringbuffer_stdin(cmd_dumpcap):
'-a', 'files:2',
'-b', condition,
))
+ if sysconfig.get_platform().startswith('mingw'):
+ fixtures.skip('FIXME Pipes are broken with the MSYS2 shell')
pipe_proc = self.assertRun(cat100_dhcp_cmd + ' | ' + capture_cmd, shell=True)
rb_files = glob.glob(testout_glob)
diff --git a/test/suite_clopts.py b/test/suite_clopts.py
index 1150ff311d..a10845ca58 100644
--- a/test/suite_clopts.py
+++ b/test/suite_clopts.py
@@ -62,7 +62,7 @@ class case_dumpcap_capture_clopts(subprocesstest.SubprocessTestCase):
# $DUMPCAP -i invalid_interface -w './testout.pcap' > ./testout.txt 2>&1
testout_file = result_file(testout_pcap)
self.runProcess((cmd_dumpcap, '-i', invalid_interface, '-w', testout_file))
- self.assertTrue(self.grepOutput('There is no device named "__invalid_interface"'))
+ self.assertTrue(self.grepOutput('The capture session could not be initiated on capture device "__invalid_interface"'))
def test_dumpcap_invalid_interface_index(self, cmd_dumpcap, capture_interface, result_file):
'''Invalid capture interface index'''
@@ -128,7 +128,7 @@ class case_tshark_capture_clopts(subprocesstest.SubprocessTestCase):
# $TSHARK -i invalid_interface -w './testout.pcap' > ./testout.txt 2>&1
testout_file = result_file(testout_pcap)
self.runProcess((cmd_tshark, '-i', invalid_interface, '-w', testout_file))
- self.assertTrue(self.grepOutput('There is no device named "__invalid_interface"'))
+ self.assertTrue(self.grepOutput('The capture session could not be initiated on capture device "__invalid_interface"'))
def test_tshark_invalid_interface_index(self, cmd_tshark, capture_interface, result_file):
'''Invalid capture interface index'''