From ef10cc74d1bb73b82418c71eabc77c0f4381eb7d Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Wed, 9 Dec 2020 09:13:42 -0800 Subject: [PATCH] CI: Fix Ubuntu tests. The wireshark/wireshark-ubuntu-dev image was recently upgraded to Ubuntu 20.04. Since then the following tests have been failing: ---- FAILED test/suite_capture.py::case_wireshark_capture::test_wireshark_capture_from_fifo FAILED test/suite_capture.py::case_wireshark_capture::test_wireshark_capture_from_stdin FAILED test/suite_capture.py::case_tshark_capture::test_tshark_capture_from_fifo FAILED test/suite_capture.py::case_tshark_capture::test_tshark_capture_from_stdin FAILED test/suite_capture.py::case_dumpcap_capture::test_dumpcap_capture_from_fifo FAILED test/suite_capture.py::case_dumpcap_capture::test_dumpcap_capture_from_stdin FAILED test/suite_capture.py::case_dumpcap_autostop::test_dumpcap_autostop_filesize FAILED test/suite_capture.py::case_dumpcap_autostop::test_dumpcap_autostop_packets FAILED test/suite_capture.py::case_dumpcap_ringbuffer::test_dumpcap_ringbuffer_filesize FAILED test/suite_capture.py::case_dumpcap_ringbuffer::test_dumpcap_ringbuffer_packets FAILED test/suite_capture.py::case_dumpcap_pcapng_sections::test_dumpcap_pcapng_multi_in_multi_out FAILED test/suite_capture.py::case_dumpcap_pcapng_sections::test_dumpcap_pcapng_multi_in_single_out FAILED test/suite_capture.py::case_dumpcap_pcapng_sections::test_dumpcap_pcapng_single_in_multi_out FAILED test/suite_capture.py::case_dumpcap_pcapng_sections::test_dumpcap_pcapng_single_in_single_out FAILED test/suite_clopts.py::case_dumpcap_options::test_dumpcap_interface_chars FAILED test/suite_clopts.py::case_dumpcap_options::test_dumpcap_invalid_chars FAILED test/suite_clopts.py::case_dumpcap_options::test_dumpcap_valid_chars ---- This is because dumpcap can't load our local libraries after setting cap_net_raw+cap_net_admin: ---- -- Begin stderr for command ('/builds/wireshark/wireshark/build/run/dumpcap', '-D') -- /builds/wireshark/wireshark/build/run/dumpcap: error while loading shared libraries: libwsutil.so.0: cannot open shared object file: No such file or directory -- End stderr for command ('/builds/wireshark/wireshark/build/run/dumpcap', '-D') -- ---- Add $(pwd)/run to our rpath. --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 35aa557114..ee62ed6ddc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -35,11 +35,13 @@ - mkdir build - cd build script: - - cmake -GNinja $CMAKE_ARGS .. + # setcap restricts our library paths + - CFLAGS=-Wl,-rpath=$(pwd)/run CXXFLAGS=-Wl,-rpath=$(pwd)/run cmake -GNinja $CMAKE_ARGS .. - ninja - ninja test-programs - chown -R user . - if [ -f run/dumpcap ]; then setcap cap_net_raw,cap_net_admin+eip run/dumpcap; fi + - if [ -f run/dumpcap ]; then su user -c "run/dumpcap -D" ; fi - su user -c pytest-3 .build-rpm: &build-rpm