Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openvas-scanner tests fail with libjson-glib-dev version 1.10.0+ds-1 in Debian Unstable #1724

Open
sbrun opened this issue Sep 18, 2024 · 0 comments · May be fixed by #1756
Open

openvas-scanner tests fail with libjson-glib-dev version 1.10.0+ds-1 in Debian Unstable #1724

sbrun opened this issue Sep 18, 2024 · 0 comments · May be fixed by #1756
Labels
bug Something isn't working

Comments

@sbrun
Copy link

sbrun commented Sep 18, 2024

Expected behavior

The tests should be successful.

Actual behavior

When I tried to build the package openvas-scanner (version 23.8.5) in Debian Unstable, the tests fail:

Running tests...
/usr/bin/ctest --force-new-ctest-process --verbose -j16
UpdateCTestConfiguration  from :/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/DartConfiguration.tcl
UpdateCTestConfiguration  from :/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/DartConfiguration.tcl
Test project /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 1
    Start 1: pcap-test

1: Test command: /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/misc/pcap-test
1: Working Directory: /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/misc
1: Test timeout computed to be: 10000000
test 2
    Start 2: ipc-openvas-test

2: Test command: /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/misc/ipc-openvas-test
2: Working Directory: /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/misc
2: Test timeout computed to be: 10000000
test 3
    Start 3: lsc-test

3: Test command: /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/misc/lsc-test
3: Working Directory: /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/misc
3: Test timeout computed to be: 10000000
test 4
    Start 4: attack-test

4: Test command: /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src/attack-test
4: Working Directory: /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src
4: Test timeout computed to be: 10000000
1: Running "main" (8 tests)...
1: lib  misc-Message: 08:30:22.638: Failed to determine your configured interfaces!
1: lib  misc-Message: 08:30:22.638: Failed to find interface enp5s0 mentioned in /proc/net/route
1: lib  misc-Message: 08:30:22.638: Failed to find interface wlp3s0 mentioned in /proc/net/route
1: lib  misc-Message: 08:30:22.638: Failed to find interface docker0 mentioned in /proc/net/route
1: lib  misc-Message: 08:30:22.638: Failed to find interface enp5s0 mentioned in /proc/net/route
1: lib  misc-Message: 08:30:22.638: Failed to find interface wlp3s0 mentioned in /proc/net/route
1: lib  misc-Message: 08:30:22.639: Failed to determine your configured interfaces!
1: lib  misc-Message: 08:30:22.639: Failed to find interface enp5s0 mentioned in /proc/net/route
1: lib  misc-Message: 08:30:22.639: Failed to find interface wlp3s0 mentioned in /proc/net/route
1: lib  misc-Message: 08:30:22.639: Failed to find interface docker0 mentioned in /proc/net/route
1: lib  misc-Message: 08:30:22.639: Failed to find interface enp5s0 mentioned in /proc/net/route
1: lib  misc-Message: 08:30:22.639: Failed to find interface wlp3s0 mentioned in /proc/net/route
1: lib  misc-Message: 08:30:22.639: Failed to determine your configured interfaces!
1: lib  misc-Message: 08:30:22.641: ipaddr2devname passed a NULL dest address
2: Running "main" (4 tests)...
1: lib  misc-Message: 08:30:22.643: ipaddr2devname passed a NULL dest address
1: lib  misc-Message: 08:30:22.643: Failed to determine your configured interfaces!
1: lib  misc-Message: 08:30:22.643: Failed to find interface enp5s0 mentioned in /proc/net/route
1: lib  misc-Message: 08:30:22.643: Failed to find interface wlp3s0 mentioned in /proc/net/route
1: lib  misc-Message: 08:30:22.643: Failed to find interface docker0 mentioned in /proc/net/route
1: lib  misc-Message: 08:30:22.643: Failed to find interface enp5s0 mentioned in /proc/net/route
1: lib  misc-Message: 08:30:22.643: Failed to find interface wlp3s0 mentioned in /proc/net/route
1: lib  misc-Message: 08:30:22.643: Failed to determine your configured interfaces!
1: openvas_routethrough -> routethrough_src_globalsource_set : Learned mocks are
1:      expect(__wrap_socket, when(domain, is_equal_to(2)), when(type, is_equal_to(2)), when(protocol, is_equal_to(0)));
1:      expect(__wrap_socket, when(domain, is_equal_to(2)), when(type, is_equal_to(2)), when(protocol, is_equal_to(0)));
2:
2: (process:690474): lib  misc-WARNING **: 08:30:22.643: ipc_data_from_json: Unable to parse json ({"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":). Reason: <data>:1:957: Parse error: unexpected end of file, expected character `}'
1: lib  misc-Message: 08:30:22.644: ipaddr2devname passed a NULL dest address
1: lib  misc-Message: 08:30:22.644: Failed to determine your configured interfaces!
1: lib  misc-Message: 08:30:22.644: Failed to find interface enp5s0 mentioned in /proc/net/route
1: lib  misc-Message: 08:30:22.644: Failed to find interface wlp3s0 mentioned in /proc/net/route
1: lib  misc-Message: 08:30:22.644: Failed to find interface docker0 mentioned in /proc/net/route
1: lib  misc-Message: 08:30:22.644: Failed to find interface enp5s0 mentioned in /proc/net/route
1: lib  misc-Message: 08:30:22.644: Failed to find interface wlp3s0 mentioned in /proc/net/route
2: ./misc/ipc_openvas_tests.c:119: Failure: ipc_data_from_json_parse_many_objects
2:      Expected [ipc_get_hostname_from_data (data_r)] to [equal string] ["localhost"]
2:              actual value:                   ["(null)"]
2:              expected to equal:              ["localhost"]
2:
2: ./misc/ipc_openvas_tests.c:121: Failure: ipc_data_from_json_parse_many_objects
2:      Expected [ipc_get_hostname_source_from_data (data_r)] to [equal string] ["TLS certificate"]
2:              actual value:                   ["(null)"]
2:              expected to equal:              ["TLS certificate"]
2:
2:   "main": 11 passes, 2 failures in 6ms.
2: Completed "main": 11 passes, 2 failures in 6ms.
1/4 Test #2: ipc-openvas-test .................***Failed    0.01 sec
Running "main" (4 tests)...

(process:690474): lib  misc-WARNING **: 08:30:22.643: ipc_data_from_json: Unable to parse json ({"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":2,"user-agent":"Mozilla/5.0 [en] (X11, U; Greenbone OS 22.04.4)"}{"type":). Reason: <data>:1:957: Parse error: unexpected end of file, expected character `}'
./misc/ipc_openvas_tests.c:119: Failure: ipc_data_from_json_parse_many_objects
        Expected [ipc_get_hostname_from_data (data_r)] to [equal string] ["localhost"]
                actual value:                   ["(null)"]
                expected to equal:              ["localhost"]

./misc/ipc_openvas_tests.c:121: Failure: ipc_data_from_json_parse_many_objects
        Expected [ipc_get_hostname_source_from_data (data_r)] to [equal string] ["TLS certificate"]
                actual value:                   ["(null)"]
                expected to equal:              ["TLS certificate"]

  "main": 11 passes, 2 failures in 6ms.
Completed "main": 11 passes, 2 failures in 6ms.

1:   "openvas_routethrough": 150 passes in 11ms.
1: Completed "main": 150 passes in 11ms.
2/4 Test #1: pcap-test ........................   Passed    0.02 sec
4: Running "main" (3 tests)...
3: Running "main" (2 tests)...
4:   "main": 8 passes in 10ms.
4: Completed "main": 8 passes in 10ms.
3:   "main": 11 passes in 7ms.
3: Completed "main": 11 passes in 7ms.
3/4 Test #4: attack-test ......................   Passed    0.03 sec
4/4 Test #3: lsc-test .........................   Passed    0.03 sec

75% tests passed, 1 tests failed out of 4

Total Test time (real) =   0.04 sec

The following tests FAILED:
          2 - ipc-openvas-test (Failed)
Errors while running CTest
make[2]: *** [Makefile:94: test] Error 8

Steps to reproduce

The tests fail when I built openvas-scanner version 23.8.5, but also when I built the previous version (23.4.1)
I built the package on Debian Unstable with libjson-glib-dev version 1.10.0+ds-1.

The tests don't fail when I use libjson-glib-dev version 1.8.0-2+b1.

Environment

Build from source on Debian Unstable

@sbrun sbrun added the bug Something isn't working label Sep 18, 2024
@jjnicola jjnicola linked a pull request Nov 5, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant