|
|
594167 |
From da2408f522a4ea65b30fb86619dd3f11e1308ac4 Mon Sep 17 00:00:00 2001
|
|
|
594167 |
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
|
|
594167 |
Date: Fri, 17 Jun 2022 15:06:59 +0200
|
|
|
594167 |
Subject: [PATCH] test: don't flush debug logs to the console
|
|
|
594167 |
|
|
|
594167 |
Let's keep the debug logs in the journal, while logging only
|
|
|
594167 |
testsute-*.sh stdout/stderr to the console (ba7abf7). This should make
|
|
|
594167 |
the test output log a bit more readable and potentially the tests itself
|
|
|
594167 |
a bit faster by avoiding console oversaturation.
|
|
|
594167 |
|
|
|
594167 |
Also, it should significantly reduce the size of artifacts kept by CIs.
|
|
|
594167 |
|
|
|
594167 |
(cherry picked from commit c84d1c9822bd181c37a5bd26b607edd67096839f)
|
|
|
594167 |
|
|
|
594167 |
Related: #2087652
|
|
|
594167 |
---
|
|
|
594167 |
test/units/testsuite-20.sh | 1 -
|
|
|
594167 |
test/units/testsuite-23.sh | 1 -
|
|
|
594167 |
test/units/testsuite-27.sh | 1 -
|
|
|
594167 |
test/units/testsuite-30.sh | 1 -
|
|
|
594167 |
test/units/testsuite-32.sh | 1 -
|
|
|
594167 |
test/units/testsuite-34.sh | 1 -
|
|
|
594167 |
test/units/testsuite-38.sh | 1 -
|
|
|
594167 |
test/units/testsuite-39.sh | 1 -
|
|
|
594167 |
test/units/testsuite-40.sh | 1 -
|
|
|
594167 |
test/units/testsuite-41.sh | 1 -
|
|
|
594167 |
test/units/testsuite-46.sh | 1 -
|
|
|
594167 |
test/units/testsuite-47.sh | 1 -
|
|
|
594167 |
test/units/testsuite-52.sh | 1 -
|
|
|
594167 |
test/units/testsuite-55.sh | 1 -
|
|
|
594167 |
test/units/testsuite-59.sh | 1 -
|
|
|
594167 |
test/units/testsuite-62.sh | 1 -
|
|
|
594167 |
test/units/testsuite-66.sh | 1 -
|
|
|
594167 |
17 files changed, 17 deletions(-)
|
|
|
594167 |
|
|
|
594167 |
diff --git a/test/units/testsuite-20.sh b/test/units/testsuite-20.sh
|
|
|
594167 |
index fc87c18c4c..338769aacc 100755
|
|
|
594167 |
--- a/test/units/testsuite-20.sh
|
|
|
594167 |
+++ b/test/units/testsuite-20.sh
|
|
|
594167 |
@@ -4,7 +4,6 @@ set -eux
|
|
|
594167 |
set -o pipefail
|
|
|
594167 |
|
|
|
594167 |
systemd-analyze log-level debug
|
|
|
594167 |
-systemd-analyze log-target console
|
|
|
594167 |
|
|
|
594167 |
test "$(systemctl show -P MainPID testsuite-20.service)" -eq $$
|
|
|
594167 |
|
|
|
594167 |
diff --git a/test/units/testsuite-23.sh b/test/units/testsuite-23.sh
|
|
|
594167 |
index 46e45c8780..e8f99ff60d 100755
|
|
|
594167 |
--- a/test/units/testsuite-23.sh
|
|
|
594167 |
+++ b/test/units/testsuite-23.sh
|
|
|
594167 |
@@ -4,7 +4,6 @@ set -eux
|
|
|
594167 |
set -o pipefail
|
|
|
594167 |
|
|
|
594167 |
systemd-analyze log-level debug
|
|
|
594167 |
-systemd-analyze log-target console
|
|
|
594167 |
|
|
|
594167 |
# Create a binary for which execve() will fail
|
|
|
594167 |
touch /tmp/brokenbinary
|
|
|
594167 |
diff --git a/test/units/testsuite-27.sh b/test/units/testsuite-27.sh
|
|
|
594167 |
index 3b2f925153..c0701f35c3 100755
|
|
|
594167 |
--- a/test/units/testsuite-27.sh
|
|
|
594167 |
+++ b/test/units/testsuite-27.sh
|
|
|
594167 |
@@ -4,7 +4,6 @@ set -eux
|
|
|
594167 |
set -o pipefail
|
|
|
594167 |
|
|
|
594167 |
systemd-analyze log-level debug
|
|
|
594167 |
-systemd-analyze log-target console
|
|
|
594167 |
|
|
|
594167 |
systemd-run --wait --unit=test27-one \
|
|
|
594167 |
-p StandardOutput=file:/tmp/stdout \
|
|
|
594167 |
diff --git a/test/units/testsuite-30.sh b/test/units/testsuite-30.sh
|
|
|
594167 |
index 51b9bdd093..57f46669f9 100755
|
|
|
594167 |
--- a/test/units/testsuite-30.sh
|
|
|
594167 |
+++ b/test/units/testsuite-30.sh
|
|
|
594167 |
@@ -4,7 +4,6 @@ set -eux
|
|
|
594167 |
set -o pipefail
|
|
|
594167 |
|
|
|
594167 |
systemd-analyze log-level debug
|
|
|
594167 |
-systemd-analyze log-target console
|
|
|
594167 |
|
|
|
594167 |
systemctl disable --now systemd-timesyncd.service
|
|
|
594167 |
|
|
|
594167 |
diff --git a/test/units/testsuite-32.sh b/test/units/testsuite-32.sh
|
|
|
594167 |
index 20ab67f6f1..5c289d0abf 100755
|
|
|
594167 |
--- a/test/units/testsuite-32.sh
|
|
|
594167 |
+++ b/test/units/testsuite-32.sh
|
|
|
594167 |
@@ -11,7 +11,6 @@ set -o pipefail
|
|
|
594167 |
|
|
|
594167 |
if test -f /sys/fs/cgroup/system.slice/testsuite-32.service/memory.oom.group; then
|
|
|
594167 |
systemd-analyze log-level debug
|
|
|
594167 |
- systemd-analyze log-target console
|
|
|
594167 |
|
|
|
594167 |
# Run a service that is guaranteed to be the first candidate for OOM killing
|
|
|
594167 |
systemd-run --unit=oomtest.service \
|
|
|
594167 |
diff --git a/test/units/testsuite-34.sh b/test/units/testsuite-34.sh
|
|
|
594167 |
index 57a7b950a0..e6171beaa6 100755
|
|
|
594167 |
--- a/test/units/testsuite-34.sh
|
|
|
594167 |
+++ b/test/units/testsuite-34.sh
|
|
|
594167 |
@@ -4,7 +4,6 @@ set -eux
|
|
|
594167 |
set -o pipefail
|
|
|
594167 |
|
|
|
594167 |
systemd-analyze log-level debug
|
|
|
594167 |
-systemd-analyze log-target console
|
|
|
594167 |
|
|
|
594167 |
function test_directory() {
|
|
|
594167 |
local directory="$1"
|
|
|
594167 |
diff --git a/test/units/testsuite-38.sh b/test/units/testsuite-38.sh
|
|
|
594167 |
index f2f61b961f..438990d1c5 100755
|
|
|
594167 |
--- a/test/units/testsuite-38.sh
|
|
|
594167 |
+++ b/test/units/testsuite-38.sh
|
|
|
594167 |
@@ -5,7 +5,6 @@ set -eux
|
|
|
594167 |
set -o pipefail
|
|
|
594167 |
|
|
|
594167 |
systemd-analyze log-level debug
|
|
|
594167 |
-systemd-analyze log-target console
|
|
|
594167 |
|
|
|
594167 |
unit=testsuite-38-sleep.service
|
|
|
594167 |
|
|
|
594167 |
diff --git a/test/units/testsuite-39.sh b/test/units/testsuite-39.sh
|
|
|
594167 |
index 03abf391f1..5b77bbbaf1 100755
|
|
|
594167 |
--- a/test/units/testsuite-39.sh
|
|
|
594167 |
+++ b/test/units/testsuite-39.sh
|
|
|
594167 |
@@ -4,7 +4,6 @@ set -eux
|
|
|
594167 |
set -o pipefail
|
|
|
594167 |
|
|
|
594167 |
systemd-analyze log-level debug
|
|
|
594167 |
-systemd-analyze log-target console
|
|
|
594167 |
|
|
|
594167 |
export SYSTEMD_PAGER=
|
|
|
594167 |
SERVICE_PATH="$(mktemp /etc/systemd/system/execreloadXXX.service)"
|
|
|
594167 |
diff --git a/test/units/testsuite-40.sh b/test/units/testsuite-40.sh
|
|
|
594167 |
index dd54fa174c..cec1fd3a7a 100755
|
|
|
594167 |
--- a/test/units/testsuite-40.sh
|
|
|
594167 |
+++ b/test/units/testsuite-40.sh
|
|
|
594167 |
@@ -4,7 +4,6 @@ set -eux
|
|
|
594167 |
set -o pipefail
|
|
|
594167 |
|
|
|
594167 |
systemd-analyze log-level debug
|
|
|
594167 |
-systemd-analyze log-target console
|
|
|
594167 |
|
|
|
594167 |
declare -A property
|
|
|
594167 |
|
|
|
594167 |
diff --git a/test/units/testsuite-41.sh b/test/units/testsuite-41.sh
|
|
|
594167 |
index 3b41db03f5..13bc684c2d 100755
|
|
|
594167 |
--- a/test/units/testsuite-41.sh
|
|
|
594167 |
+++ b/test/units/testsuite-41.sh
|
|
|
594167 |
@@ -7,7 +7,6 @@ set -o pipefail
|
|
|
594167 |
MAX_SECS=60
|
|
|
594167 |
|
|
|
594167 |
systemd-analyze log-level debug
|
|
|
594167 |
-systemd-analyze log-target console
|
|
|
594167 |
|
|
|
594167 |
# test one: Restart=on-failure should restart the service
|
|
|
594167 |
systemd-run --unit=one -p Type=oneshot -p Restart=on-failure /bin/bash -c "exit 1" \
|
|
|
594167 |
diff --git a/test/units/testsuite-46.sh b/test/units/testsuite-46.sh
|
|
|
594167 |
index 3724a3b5f6..658613abb6 100755
|
|
|
594167 |
--- a/test/units/testsuite-46.sh
|
|
|
594167 |
+++ b/test/units/testsuite-46.sh
|
|
|
594167 |
@@ -34,7 +34,6 @@ wait_for_state() {
|
|
|
594167 |
}
|
|
|
594167 |
|
|
|
594167 |
systemd-analyze log-level debug
|
|
|
594167 |
-systemd-analyze log-target console
|
|
|
594167 |
systemctl service-log-level systemd-homed debug
|
|
|
594167 |
|
|
|
594167 |
# Create a tmpfs to use as backing store for the home dir. That way we can enforce a size limit nicely.
|
|
|
594167 |
diff --git a/test/units/testsuite-47.sh b/test/units/testsuite-47.sh
|
|
|
594167 |
index ff10602df7..529e9617a5 100755
|
|
|
594167 |
--- a/test/units/testsuite-47.sh
|
|
|
594167 |
+++ b/test/units/testsuite-47.sh
|
|
|
594167 |
@@ -4,7 +4,6 @@ set -eux
|
|
|
594167 |
set -o pipefail
|
|
|
594167 |
|
|
|
594167 |
systemd-analyze log-level debug
|
|
|
594167 |
-systemd-analyze log-target console
|
|
|
594167 |
|
|
|
594167 |
systemctl start testsuite-47-repro
|
|
|
594167 |
sleep 4
|
|
|
594167 |
diff --git a/test/units/testsuite-52.sh b/test/units/testsuite-52.sh
|
|
|
594167 |
index 8a76ff6ed6..d78fdd53ba 100755
|
|
|
594167 |
--- a/test/units/testsuite-52.sh
|
|
|
594167 |
+++ b/test/units/testsuite-52.sh
|
|
|
594167 |
@@ -4,7 +4,6 @@ set -ex
|
|
|
594167 |
set -o pipefail
|
|
|
594167 |
|
|
|
594167 |
systemd-analyze log-level debug
|
|
|
594167 |
-systemd-analyze log-target console
|
|
|
594167 |
|
|
|
594167 |
systemctl enable test-honor-first-shutdown.service
|
|
|
594167 |
systemctl start test-honor-first-shutdown.service
|
|
|
594167 |
diff --git a/test/units/testsuite-55.sh b/test/units/testsuite-55.sh
|
|
|
594167 |
index 379ea9e569..74dd285460 100755
|
|
|
594167 |
--- a/test/units/testsuite-55.sh
|
|
|
594167 |
+++ b/test/units/testsuite-55.sh
|
|
|
594167 |
@@ -4,7 +4,6 @@ set -eux
|
|
|
594167 |
set -o pipefail
|
|
|
594167 |
|
|
|
594167 |
systemd-analyze log-level debug
|
|
|
594167 |
-systemd-analyze log-target console
|
|
|
594167 |
|
|
|
594167 |
# Loose checks to ensure the environment has the necessary features for systemd-oomd
|
|
|
594167 |
[[ -e /proc/pressure ]] || echo "no PSI" >>/skipped
|
|
|
594167 |
diff --git a/test/units/testsuite-59.sh b/test/units/testsuite-59.sh
|
|
|
594167 |
index 143e44ec63..83db053107 100755
|
|
|
594167 |
--- a/test/units/testsuite-59.sh
|
|
|
594167 |
+++ b/test/units/testsuite-59.sh
|
|
|
594167 |
@@ -28,7 +28,6 @@ wait_on_state_or_fail () {
|
|
|
594167 |
}
|
|
|
594167 |
|
|
|
594167 |
systemd-analyze log-level debug
|
|
|
594167 |
-systemd-analyze log-target console
|
|
|
594167 |
|
|
|
594167 |
|
|
|
594167 |
cat >/run/systemd/system/testservice-fail-59.service <
|
|
|
594167 |
diff --git a/test/units/testsuite-62.sh b/test/units/testsuite-62.sh
|
|
|
594167 |
index da40c2f1e7..04b79b7e77 100755
|
|
|
594167 |
--- a/test/units/testsuite-62.sh
|
|
|
594167 |
+++ b/test/units/testsuite-62.sh
|
|
|
594167 |
@@ -5,7 +5,6 @@ set -o pipefail
|
|
|
594167 |
|
|
|
594167 |
setup() {
|
|
|
594167 |
systemd-analyze log-level debug
|
|
|
594167 |
- systemd-analyze log-target console
|
|
|
594167 |
|
|
|
594167 |
for i in {0..3};
|
|
|
594167 |
do
|
|
|
594167 |
diff --git a/test/units/testsuite-66.sh b/test/units/testsuite-66.sh
|
|
|
594167 |
index fba42d15df..7a88e5bcba 100755
|
|
|
594167 |
--- a/test/units/testsuite-66.sh
|
|
|
594167 |
+++ b/test/units/testsuite-66.sh
|
|
|
594167 |
@@ -6,7 +6,6 @@ set -o pipefail
|
|
|
594167 |
RESULTS_FILE=/tmp/testsuite66serviceresults
|
|
|
594167 |
|
|
|
594167 |
systemd-analyze log-level debug
|
|
|
594167 |
-systemd-analyze log-target console
|
|
|
594167 |
|
|
|
594167 |
systemctl start testsuite-66-deviceisolation.service
|
|
|
594167 |
|