diff options
author | João Valverde <j@v6e.pt> | 2023-05-12 20:51:01 +0100 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2023-05-12 20:55:35 +0000 |
commit | df804f25afc8dd91269303fea974d3860cfdd516 (patch) | |
tree | 4a11680486b94f361e663832248e0167033a2973 /test/suite_clopts.py | |
parent | f8f9112f9a58985b7c8f081e8da19b089ad5065d (diff) |
Tests+MSVC: Fix capture test suite using Npcap 1.75
Npcap 1.75 and possibly earlier changed the loopback interface
string to:
\Device\NPF_Loopback (Adapter for loopback traffic capture)
The test suite expects:
\Device\NPF_Loopback (Npcap Loopback Adapter)
So the test is incorrectly skipped. Use a case insensitive
regular expression to fix the capture interface detection.
Remnove quoting command path to fix tests using cmd.exe on
windows. Pipes are broken with the MSYS2 shell without quoting.
Skip those tests for now.
Fix some broken tests with reformatted error messages.
Diffstat (limited to 'test/suite_clopts.py')
-rw-r--r-- | test/suite_clopts.py | 4 |
1 files changed, 2 insertions, 2 deletions
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''' |