From 76281c640821b0a165b79d75ada78e43c51cf031 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 30 Oct 2018 02:12:13 +0900 Subject: [PATCH 1/4] test: also run compile tests for libudev.h --- src/systemd/meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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', From f775f613adaf8fb6005c5082eb387499370c4fd9 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 1 Nov 2018 19:54:48 +0900 Subject: [PATCH 2/4] test: increase timeout for TEST-17-UDEV-WANTS As the test randomly fails with timeout. This may fix #10274. --- test/TEST-17-UDEV-WANTS/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 056ae88152a722bdbea54ff33db815d585c8b9c6 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 1 Nov 2018 17:26:36 +0900 Subject: [PATCH 3/4] test: mask several unnecessary services This may make CIs run faster. --- test/TEST-02-CRYPTSETUP/test.sh | 8 ++++++++ test/TEST-03-JOBS/test.sh | 8 ++++++++ test/TEST-04-JOURNAL/test.sh | 8 ++++++++ test/TEST-05-RLIMITS/test.sh | 8 ++++++++ test/TEST-07-ISSUE-1981/test.sh | 8 ++++++++ test/TEST-11-ISSUE-3166/test.sh | 8 ++++++++ test/TEST-12-ISSUE-3171/test.sh | 8 ++++++++ test/TEST-13-NSPAWN-SMOKE/test.sh | 8 ++++++++ test/TEST-18-FAILUREACTION/test.sh | 7 +++++++ test/TEST-19-DELEGATE/test.sh | 8 ++++++++ test/TEST-20-MAINPIDGAMES/test.sh | 8 ++++++++ test/TEST-23-TYPE-EXEC/test.sh | 8 ++++++++ 12 files changed, 95 insertions(+) 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 <$initdir/etc/systemd/system/testsuite.service <$initdir/etc/systemd/system/testsuite.service <$initdir/etc/systemd/system/testsuite.service <$initdir/etc/systemd/system/testsuite.service < Date: Fri, 2 Nov 2018 10:27:56 +0900 Subject: [PATCH 4/4] test: drop 'After=multi-user.target' from most of testsuite.service --- test/TEST-04-JOURNAL/test.sh | 1 - test/TEST-05-RLIMITS/test.sh | 1 - test/TEST-06-SELINUX/test.sh | 1 - test/TEST-07-ISSUE-1981/test.sh | 1 - test/TEST-08-ISSUE-2730/test.sh | 1 - test/TEST-09-ISSUE-2691/test.sh | 1 - test/TEST-10-ISSUE-2467/test.sh | 1 - test/TEST-11-ISSUE-3166/test.sh | 1 - test/TEST-12-ISSUE-3171/test.sh | 1 - test/TEST-13-NSPAWN-SMOKE/test.sh | 1 - test/TEST-14-MACHINE-ID/test.sh | 1 - test/TEST-15-DROPIN/testsuite.service | 1 - test/TEST-22-TMPFILES/testsuite.service | 2 +- 13 files changed, 1 insertion(+), 13 deletions(-) diff --git a/test/TEST-04-JOURNAL/test.sh b/test/TEST-04-JOURNAL/test.sh index 80e5fb0a73..33bfcbf681 100755 --- a/test/TEST-04-JOURNAL/test.sh +++ b/test/TEST-04-JOURNAL/test.sh @@ -30,7 +30,6 @@ test_setup() { cat >$initdir/etc/systemd/system/testsuite.service <$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 8d3ed04712..499a36038c 100755 --- a/test/TEST-07-ISSUE-1981/test.sh +++ b/test/TEST-07-ISSUE-1981/test.sh @@ -33,7 +33,6 @@ test_setup() { 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 e6e96101aa..6cde7fd7ea 100755 --- a/test/TEST-11-ISSUE-3166/test.sh +++ b/test/TEST-11-ISSUE-3166/test.sh @@ -32,7 +32,6 @@ test_setup() { cat >$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 0659a68cf0..75e214c008 100755 --- a/test/TEST-13-NSPAWN-SMOKE/test.sh +++ b/test/TEST-13-NSPAWN-SMOKE/test.sh @@ -37,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-22-TMPFILES/testsuite.service b/test/TEST-22-TMPFILES/testsuite.service index 123b12790f..a19174e795 100644 --- a/test/TEST-22-TMPFILES/testsuite.service +++ b/test/TEST-22-TMPFILES/testsuite.service @@ -1,6 +1,6 @@ [Unit] Description=Testsuite service -After=multi-user.target +After=systemd-tmpfiles-setup.service [Service] WorkingDirectory=/testsuite