integration-tests: several cleanups (#37394)

This commit is contained in:
Yu Watanabe
2025-05-15 01:45:10 +09:00
committed by GitHub
9 changed files with 29 additions and 21 deletions

View File

@@ -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 \

View File

@@ -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
#####################################################################

View File

@@ -6,5 +6,6 @@ integration_tests += [
integration_test_template + {
'name' : fs.name(meson.current_source_dir()),
'storage' : 'persistent',
'priority' : 10,
},
]

View File

@@ -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.'

View File

@@ -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',
},
]

View File

@@ -32,7 +32,7 @@ foreach testcase : [
'TEST_MATCH_TESTCASE': testcase,
}
},
'priority' : 10,
'priority' : testcase == 'NetworkdDHCPClientTests' ? 10 : 0,
'vm' : true,
},
]

View File

@@ -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')

View File

@@ -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

View File

@@ -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)