diff --git a/.github/workflows/mkosi.yml b/.github/workflows/mkosi.yml index 511240435cf..a437dd87c94 100644 --- a/.github/workflows/mkosi.yml +++ b/.github/workflows/mkosi.yml @@ -61,7 +61,6 @@ jobs: cflags: "-O2 -D_FORTIFY_SOURCE=3" relabel: no vm: 1 - skip: TEST-21-DFUZZER - distro: debian release: testing sanitizers: "" @@ -69,7 +68,6 @@ jobs: cflags: "-Og" relabel: no vm: 0 - skip: TEST-21-DFUZZER - distro: ubuntu release: noble sanitizers: "" @@ -77,7 +75,6 @@ jobs: cflags: "-Og" relabel: no vm: 0 - skip: TEST-21-DFUZZER - distro: fedora release: "42" sanitizers: address,undefined @@ -92,15 +89,13 @@ jobs: cflags: "-Og" relabel: yes vm: 0 - skip: TEST-21-DFUZZER - - distro: opensuse - release: tumbleweed - sanitizers: "" - llvm: 0 - cflags: "-Og" - relabel: no - vm: 0 - skip: TEST-21-DFUZZER + # - distro: opensuse + # release: tumbleweed + # sanitizers: "" + # llvm: 0 + # cflags: "-Og" + # relabel: no + # vm: 0 - distro: centos release: "9" sanitizers: "" @@ -108,7 +103,6 @@ jobs: cflags: "-Og" relabel: yes vm: 0 - skip: TEST-21-DFUZZER - distro: centos release: "10" sanitizers: "" @@ -116,7 +110,6 @@ jobs: cflags: "-Og" relabel: yes vm: 0 - skip: TEST-21-DFUZZER steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 @@ -228,7 +221,6 @@ jobs: sudo --preserve-env mkosi sandbox -- \ env \ TEST_PREFER_QEMU=${{ matrix.vm }} \ - TEST_SKIP=${{ matrix.skip }} \ meson test \ -C build \ --no-rebuild \ diff --git a/meson.build b/meson.build index ebe24c6290f..81e494ee044 100644 --- a/meson.build +++ b/meson.build @@ -1969,7 +1969,7 @@ endif ##################################################################### if get_option('b_coverage') - userspace_c_args += ['-include', 'src/basic/coverage.h'] + userspace_c_args += ['-include', 'coverage.h'] endif ##################################################################### diff --git a/test/integration-tests/TEST-04-JOURNAL/meson.build b/test/integration-tests/TEST-04-JOURNAL/meson.build index 184f70ab720..d61cbcb0018 100644 --- a/test/integration-tests/TEST-04-JOURNAL/meson.build +++ b/test/integration-tests/TEST-04-JOURNAL/meson.build @@ -6,5 +6,6 @@ integration_tests += [ integration_test_template + { 'name' : fs.name(meson.current_source_dir()), 'storage' : 'persistent', + 'priority' : 10, }, ] diff --git a/test/integration-tests/TEST-64-UDEV-STORAGE/meson.build b/test/integration-tests/TEST-64-UDEV-STORAGE/meson.build index cbd6b697772..76b0ebeb87d 100644 --- a/test/integration-tests/TEST-64-UDEV-STORAGE/meson.build +++ b/test/integration-tests/TEST-64-UDEV-STORAGE/meson.build @@ -146,6 +146,7 @@ udev_storage_tests += udev_storage_test_template + { 'name' : 'simultaneous_events', 'cmdline' : cmdline, 'qemu-args' : qemu_args, + 'priority' : 10, } cmdline = [] @@ -256,7 +257,7 @@ foreach testcase : udev_storage_tests }, }, 'mkosi-args' : integration_test_template['mkosi-args'] + cmdline, - 'priority' : 10, + 'priority' : testcase.get('priority', 0), 'vm' : true, # Suppress ASan error # 'multipathd[1820]: ==1820==ERROR: AddressSanitizer: Joining already joined thread, aborting.' diff --git a/test/integration-tests/TEST-73-LOCALE/meson.build b/test/integration-tests/TEST-73-LOCALE/meson.build index e5b9f190151..8dec5f37e73 100644 --- a/test/integration-tests/TEST-73-LOCALE/meson.build +++ b/test/integration-tests/TEST-73-LOCALE/meson.build @@ -3,8 +3,5 @@ integration_tests += [ integration_test_template + { 'name' : fs.name(meson.current_source_dir()), - 'priority' : 10, - # TODO: Remove when https://github.com/systemd/systemd/issues/35335 is fixed. - 'coredump-exclude-regex' : '/systemd-localed', }, ] diff --git a/test/integration-tests/TEST-85-NETWORK/meson.build b/test/integration-tests/TEST-85-NETWORK/meson.build index 7bce51abbe7..cf3ea534694 100644 --- a/test/integration-tests/TEST-85-NETWORK/meson.build +++ b/test/integration-tests/TEST-85-NETWORK/meson.build @@ -32,7 +32,7 @@ foreach testcase : [ 'TEST_MATCH_TESTCASE': testcase, } }, - 'priority' : 10, + 'priority' : testcase == 'NetworkdDHCPClientTests' ? 10 : 0, 'vm' : true, }, ] diff --git a/test/integration-tests/integration-test-wrapper.py b/test/integration-tests/integration-test-wrapper.py index 77552cbfad6..5f456cd3e9f 100755 --- a/test/integration-tests/integration-test-wrapper.py +++ b/test/integration-tests/integration-test-wrapper.py @@ -490,6 +490,14 @@ def main() -> None: """ ) + if os.getenv('TEST_RUN_DFUZZER'): + dropin += textwrap.dedent( + f""" + [Service] + Environment=TEST_RUN_DFUZZER={os.environ['TEST_RUN_DFUZZER']} + """ + ) + if os.getenv('TEST_JOURNAL_USE_TMP', '0') == '1': if statfs(Path('/tmp')) != 'tmpfs' and statfs(Path('/dev/shm')) == 'tmpfs': tmp = Path('/dev/shm') diff --git a/test/units/TEST-21-DFUZZER.sh b/test/units/TEST-21-DFUZZER.sh index 08ebfd91eb6..ac49938c380 100755 --- a/test/units/TEST-21-DFUZZER.sh +++ b/test/units/TEST-21-DFUZZER.sh @@ -9,6 +9,11 @@ if ! command -v dfuzzer &>/dev/null; then exit 77 fi +if [[ ! -v ASAN_OPTIONS && ! -v UBSAN_OPTIONS && "${TEST_RUN_DFUZZER:-0}" == "0" ]]; then + echo "no sanitizer is enabled, skipping. (Hint: set TEST_RUN_DFUZZER=1 to run test forcibly)." + exit 77 +fi + # Save the end.service state before we start fuzzing, as it might get changed # on the fly by one of the fuzzers systemctl list-jobs | grep -F 'end.service' && SHUTDOWN_AT_EXIT=1 || SHUTDOWN_AT_EXIT=0 diff --git a/test/units/TEST-73-LOCALE.sh b/test/units/TEST-73-LOCALE.sh index de935183ad6..b070e99af16 100755 --- a/test/units/TEST-73-LOCALE.sh +++ b/test/units/TEST-73-LOCALE.sh @@ -210,6 +210,10 @@ testcase_vc_keymap() { for i in $(localectl list-keymaps); do # set VC keymap + + # Skip lv keymap and friends, otherwise the sanitizer detects heap-buffer-overflow in libxkbcommon. + [[ "$i" =~ ^lv ]] && continue + assert_rc 0 localectl set-keymap "$i" output=$(localectl)