diff --git a/src/systemd/meson.build b/src/systemd/meson.build index dde0aaf781..e0c967efc5 100644 --- a/src/systemd/meson.build +++ b/src/systemd/meson.build @@ -65,11 +65,11 @@ if cxx.found() endif endif -foreach header : _systemd_headers + _not_installed_headers +foreach header : _systemd_headers + _not_installed_headers + ['../libudev/libudev.h'] foreach opt : opts - name = ''.join([header, ':'] + opt) + name = ''.join(['cc-', header.split('/')[-1], ':'] + opt) if want_tests != 'false' - test('cc-' + name, + test(name, check_compilation_sh, args : cc.cmd_array() + ['-c', '-x'] + opt + ['-Werror', '-include', diff --git a/test/TEST-02-CRYPTSETUP/test.sh b/test/TEST-02-CRYPTSETUP/test.sh index 545602e17a..71709f7d58 100755 --- a/test/TEST-02-CRYPTSETUP/test.sh +++ b/test/TEST-02-CRYPTSETUP/test.sh @@ -45,6 +45,14 @@ test_setup() { setup_basic_environment + # mask some services that we do not want to run in these tests + ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket + ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service + # setup the testsuite service cat >$initdir/etc/systemd/system/testsuite.service <$initdir/etc/systemd/system/testsuite.service <$initdir/etc/systemd/system/testsuite.service <$initdir/etc/systemd/system.conf <$initdir/etc/systemd/system/testsuite.service <$initdir/etc/systemd/system/testsuite.service [Unit] Description=Testsuite service -After=multi-user.target [Service] ExecStart=/test-selinux-checks.sh diff --git a/test/TEST-07-ISSUE-1981/test.sh b/test/TEST-07-ISSUE-1981/test.sh index 88d143e479..499a36038c 100755 --- a/test/TEST-07-ISSUE-1981/test.sh +++ b/test/TEST-07-ISSUE-1981/test.sh @@ -21,11 +21,18 @@ test_setup() { setup_basic_environment + # mask some services that we do not want to run in these tests + ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket + ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service + # setup the testsuite service cat >$initdir/etc/systemd/system/testsuite.service <$initdir/etc/systemd/system/testsuite.service < /testok; systemctl poweroff' diff --git a/test/TEST-09-ISSUE-2691/test.sh b/test/TEST-09-ISSUE-2691/test.sh index 40eac30076..01eb4dbac8 100755 --- a/test/TEST-09-ISSUE-2691/test.sh +++ b/test/TEST-09-ISSUE-2691/test.sh @@ -24,7 +24,6 @@ test_setup() { cat >$initdir/etc/systemd/system/testsuite.service <<'EOF' [Unit] Description=Testsuite service -After=multi-user.target [Service] Type=oneshot diff --git a/test/TEST-10-ISSUE-2467/test.sh b/test/TEST-10-ISSUE-2467/test.sh index e61f5acd3c..d8959187a1 100755 --- a/test/TEST-10-ISSUE-2467/test.sh +++ b/test/TEST-10-ISSUE-2467/test.sh @@ -23,7 +23,6 @@ test_setup() { cat >$initdir/etc/systemd/system/testsuite.service <<'EOF' [Unit] Description=Testsuite service -After=multi-user.target [Service] Type=oneshot diff --git a/test/TEST-11-ISSUE-3166/test.sh b/test/TEST-11-ISSUE-3166/test.sh index 8aae4d5ed9..6cde7fd7ea 100755 --- a/test/TEST-11-ISSUE-3166/test.sh +++ b/test/TEST-11-ISSUE-3166/test.sh @@ -20,11 +20,18 @@ test_setup() { setup_basic_environment dracut_install false touch + # mask some services that we do not want to run in these tests + ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket + ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service + # setup the testsuite service cat >$initdir/etc/systemd/system/testsuite.service <$initdir/etc/systemd/system/testsuite.service <$initdir/test-socket-group.sh <<'EOF' #!/bin/bash set -x diff --git a/test/TEST-13-NSPAWN-SMOKE/test.sh b/test/TEST-13-NSPAWN-SMOKE/test.sh index f485a9259c..75e214c008 100755 --- a/test/TEST-13-NSPAWN-SMOKE/test.sh +++ b/test/TEST-13-NSPAWN-SMOKE/test.sh @@ -20,6 +20,14 @@ test_setup() { setup_basic_environment dracut_install busybox chmod rmdir unshare ip + # mask some services that we do not want to run in these tests + ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket + ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service + cp create-busybox-container $initdir/ ./create-busybox-container $initdir/nc-container @@ -29,7 +37,6 @@ test_setup() { cat >$initdir/etc/systemd/system/testsuite.service <$initdir/etc/systemd/system/testsuite.service < /failed ; echo OK > /testok' diff --git a/test/TEST-15-DROPIN/testsuite.service b/test/TEST-15-DROPIN/testsuite.service index d9790c2610..4c9f65e2b1 100644 --- a/test/TEST-15-DROPIN/testsuite.service +++ b/test/TEST-15-DROPIN/testsuite.service @@ -1,6 +1,5 @@ [Unit] Description=Testsuite service -After=multi-user.target [Service] ExecStart=/test-dropin.sh diff --git a/test/TEST-17-UDEV-WANTS/test.sh b/test/TEST-17-UDEV-WANTS/test.sh index 24989ebcf6..074771ab75 100755 --- a/test/TEST-17-UDEV-WANTS/test.sh +++ b/test/TEST-17-UDEV-WANTS/test.sh @@ -6,7 +6,7 @@ TEST_DESCRIPTION="UDEV SYSTEMD_WANTS property" TEST_NO_NSPAWN=1 . $TEST_BASE_DIR/test-functions -QEMU_TIMEOUT=180 +QEMU_TIMEOUT=300 test_setup() { create_empty_image diff --git a/test/TEST-18-FAILUREACTION/test.sh b/test/TEST-18-FAILUREACTION/test.sh index e48ba9bac3..783b3aac6e 100755 --- a/test/TEST-18-FAILUREACTION/test.sh +++ b/test/TEST-18-FAILUREACTION/test.sh @@ -35,6 +35,13 @@ EOF ) || return 1 setup_nspawn_root + # mask some services that we do not want to run in these tests + ln -s /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service + ln -s /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service + ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.service + ln -s /dev/null $initdir/etc/systemd/system/systemd-networkd.socket + ln -s /dev/null $initdir/etc/systemd/system/systemd-resolved.service + ddebug "umount $TESTDIR/root" umount $TESTDIR/root } diff --git a/test/TEST-19-DELEGATE/test.sh b/test/TEST-19-DELEGATE/test.sh index 75e13f8cf2..bb0c5057b2 100755 --- a/test/TEST-19-DELEGATE/test.sh +++ b/test/TEST-19-DELEGATE/test.sh @@ -20,6 +20,14 @@ test_setup() { setup_basic_environment + # mask some services that we do not want to run in these tests + ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket + ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service + # setup the testsuite service cat >$initdir/etc/systemd/system/testsuite.service <$initdir/etc/systemd/system/testsuite.service <$initdir/etc/systemd/system/testsuite.service <