Wireshark mailing list archives

Re: Builds without PCAP fail the unit tests


From: Peter Wu <peter () lekensteyn nl>
Date: Wed, 19 Dec 2018 21:34:45 +0100

On Tue, Dec 18, 2018 at 07:47:39PM +0000, Antoine d'Otreppe wrote:
On Tuesday, December 18, 2018 8:45 PM, Guy Harris <guy () alum mit edu> wrote:

On Dec 18, 2018, at 11:18 AM, Antoine d'Otreppe a.dotreppe () aspyct org wrote:

Half of my builds, those without PCAP, failed recently on travis during the test step:
https://travis-ci.org/aspyct/wireshark/builds/469639514

If by "the unit tests" you're referring to the tests in the "test" subdirectory of the source tree, this should not 
be surprising, given that one of those tests is in test/suite_capture.py, and "capture" means "we test packet 
capturing".

Only one of the tests have been failing, the text2pcap one. It turns out
to be an issue where the -c option was not handled correctly when
ENABLE_PCAP=OFF. Proposed fix: https://code.wireshark.org/review/31130

If we're going to support running the unit tests on builds without libpcap/WinPcap/Npcap, we should have the test 
suite somehow figure out whether Wireshark was built with the pcap library and only run the capture tests if it was.

Since the recent refactoring in the Python test suite, this is already
possible :-)

When running pytest, you will see the reason why certain tests are
skipped. From the above logs:

    =========================== short test summary info ============================
    FAIL ../test/suite_text2pcap.py::case_text2pcap_other_options::test_text2pcap_option_N
    SKIP [33] /Users/travis/build/aspyct/wireshark/test/fixtures.py:369: Program dumpcap is not available
    SKIP [1] /Users/travis/build/aspyct/wireshark/test/fixtures.py:369: Program rawshark is not available
    SKIP [1] suite_dissection.py:57: MSP splitting is not implemented yet
    SKIP [1] suite_wslua.py:259: GRegex tests are broken since PCRE 8.34, see bug 12997.
    SKIP [1] suite_dfilter/group_tvb.py:33: This doesn't work yet in Wireshark
    SKIP [1] suite_dfilter/group_tvb.py:38: This doesn't work yet in Wireshark

Note that Dario (crondaemon) periodically sync with Github and thereby
triggers regular travis builds. This made it easy to quickly identify
the commit that broke the tests:
https://travis-ci.org/crondaemon/wireshark/builds/467781922
-- 
Kind regards,
Peter Wu
https://lekensteyn.nl
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: