From cc4338e435b1d83d7d2cd572e72036d37e12af96 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 5 Jun 2018 21:27:01 +0200 Subject: [PATCH 1/4] tests: tighten check for TEST-06-SELINUX dependencies a bit As it turns out /usr/share/selinux/devel/ is now included in more RPMs than just selinux-policy-devel (specifically container-selinux, which is pulled in by various container related RPMs). Let's hence tighten the dependency check a bit and look for systemd's .if file, which is what we actually care about. --- test/TEST-06-SELINUX/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/TEST-06-SELINUX/test.sh b/test/TEST-06-SELINUX/test.sh index 18856c2459..604ede5b2b 100755 --- a/test/TEST-06-SELINUX/test.sh +++ b/test/TEST-06-SELINUX/test.sh @@ -11,7 +11,7 @@ TEST_NO_NSPAWN=1 # selinux-policy-devel # Check if selinux-policy-devel is installed, and if it isn't bail out early instead of failing -test -d /usr/share/selinux/devel || exit 0 +test -f /usr/share/selinux/devel/include/system/systemd.if || exit 0 . $TEST_BASE_DIR/test-functions SETUP_SELINUX=yes From 3edc0c590d3a9212267d0a7cf56e95efa7f61039 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 5 Jun 2018 21:30:19 +0200 Subject: [PATCH 2/4] test: disable QEMU based testing for TEST-16-EXTEND-TIMEOUT The test is heavily dependent on timeouts, and if we are run in potentially very slow QEMU instances there's a good chance we'll miss some which we normally wouldn't miss. Hence, let's test this one in nspawn only. Given that the test is purely in service management it shouldn't matter whether it runs in nspawn or qemu, hence keep running it in nspawn, but don't bother with qemu. Similar, do this for TEST-03-JOBS, too, which operates with relatively short sleep times internally. Fixes: #9123 --- test/TEST-03-JOBS/test.sh | 1 + test/TEST-16-EXTEND-TIMEOUT/test.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/test/TEST-03-JOBS/test.sh b/test/TEST-03-JOBS/test.sh index 88bbf3cdac..65a8893fea 100755 --- a/test/TEST-03-JOBS/test.sh +++ b/test/TEST-03-JOBS/test.sh @@ -3,6 +3,7 @@ # ex: ts=8 sw=4 sts=4 et filetype=sh set -e TEST_DESCRIPTION="Job-related tests" +TEST_NO_QEMU=1 . $TEST_BASE_DIR/test-functions diff --git a/test/TEST-16-EXTEND-TIMEOUT/test.sh b/test/TEST-16-EXTEND-TIMEOUT/test.sh index 4544672066..e7bb5430c0 100755 --- a/test/TEST-16-EXTEND-TIMEOUT/test.sh +++ b/test/TEST-16-EXTEND-TIMEOUT/test.sh @@ -4,6 +4,7 @@ set -e TEST_DESCRIPTION="EXTEND_TIMEOUT_USEC=usec start/runtime/stop tests" SKIP_INITRD=yes +TEST_NO_QEMU=1 . $TEST_BASE_DIR/test-functions From efd0b6cccae2a6108a1e418caaa627e09bfa9c99 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 6 Jun 2018 10:16:42 +0200 Subject: [PATCH 3/4] test: make sure output of test TEST-03 test service ends up on console --- test/TEST-03-JOBS/test-jobs.sh | 2 +- test/TEST-03-JOBS/test.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/test/TEST-03-JOBS/test-jobs.sh b/test/TEST-03-JOBS/test-jobs.sh index 4c954d0397..e66ea53621 100755 --- a/test/TEST-03-JOBS/test-jobs.sh +++ b/test/TEST-03-JOBS/test-jobs.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/bash -ex # Test merging of a --job-mode=ignore-dependencies job into a previously # installed job. diff --git a/test/TEST-03-JOBS/test.sh b/test/TEST-03-JOBS/test.sh index 65a8893fea..08e5cfe6c8 100755 --- a/test/TEST-03-JOBS/test.sh +++ b/test/TEST-03-JOBS/test.sh @@ -28,6 +28,8 @@ After=multi-user.target [Service] ExecStart=/test-jobs.sh Type=oneshot +StandardOutput=tty +StandardError=tty EOF # copy the units used by this test From b2ad25d388d54d6638279b88ae0ca0e42335e02d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 6 Jun 2018 10:17:01 +0200 Subject: [PATCH 4/4] test: turn off the kernel's passive agressive /dev/kmsg ratelimit for our tests --- test/test-functions | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test-functions b/test/test-functions index 6535099047..e69420aeca 100644 --- a/test/test-functions +++ b/test/test-functions @@ -124,6 +124,7 @@ loglevel=2 \ init=$ROOTLIBDIR/systemd \ console=ttyS0 \ selinux=0 \ +printk.devkmsg=on \ $_cgroup_args \ $KERNEL_APPEND \ "