]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
integration tests: do not adjust log level in the test script
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 24 Sep 2025 15:46:35 +0000 (00:46 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 25 Sep 2025 22:20:04 +0000 (07:20 +0900)
We passes log level through kernel command line. It is not necessary to
set to debug level at the beginning, and set to info at the end.
This is important when a test has several subtests. If a subtest sets
log level to info at the end, then subsequent tests may not generate any
useful logs.

40 files changed:
test/units/TEST-07-PID1.poll-limit.sh
test/units/TEST-07-PID1.quota.sh
test/units/TEST-13-NSPAWN.importctl.sh
test/units/TEST-13-NSPAWN.machined.sh
test/units/TEST-19-CGROUP.ExitType-cgroup.sh
test/units/TEST-23-UNIT-FILE.ExecReload.sh
test/units/TEST-23-UNIT-FILE.ExecStopPost.sh
test/units/TEST-23-UNIT-FILE.ExtraFileDescriptors.sh
test/units/TEST-23-UNIT-FILE.JoinsNamespaceOf.sh
test/units/TEST-23-UNIT-FILE.StandardOutput.sh
test/units/TEST-23-UNIT-FILE.Upholds.sh
test/units/TEST-23-UNIT-FILE.exec-command-ex.sh
test/units/TEST-23-UNIT-FILE.oneshot-restart.sh
test/units/TEST-23-UNIT-FILE.openfile.sh
test/units/TEST-23-UNIT-FILE.success-failure.sh
test/units/TEST-23-UNIT-FILE.type-exec.sh
test/units/TEST-30-ONCLOCKCHANGE.sh
test/units/TEST-32-OOMPOLICY.sh
test/units/TEST-34-DYNAMICUSERMIGRATE.sh
test/units/TEST-36-NUMAPOLICY.sh
test/units/TEST-38-FREEZER.sh
test/units/TEST-43-PRIVATEUSER-UNPRIV.sh
test/units/TEST-44-LOG-NAMESPACE.sh
test/units/TEST-46-HOMED.sh
test/units/TEST-52-HONORFIRSTSHUTDOWN.sh
test/units/TEST-54-CREDS.sh
test/units/TEST-55-OOMD.sh
test/units/TEST-59-RELOADING-RESTART.sh
test/units/TEST-60-MOUNT-RATELIMIT.sh
test/units/TEST-62-RESTRICT-IFACES.sh
test/units/TEST-63-PATH.sh
test/units/TEST-65-ANALYZE.sh
test/units/TEST-66-DEVICE-ISOLATION.sh
test/units/TEST-68-PROPAGATE-EXIT-STATUS.sh
test/units/TEST-75-RESOLVED.sh
test/units/TEST-78-SIGQUEUE.sh
test/units/TEST-79-MEMPRESS.sh
test/units/TEST-80-NOTIFYACCESS.sh
test/units/TEST-82-SOFTREBOOT.sh
test/units/TEST-87-AUX-UTILS-VM.pstore.sh

index ca988b2321dd78fc02bd6391730d8c0034e51ac4..f7ccc3f8952035e2c0773bdf5ffd5e2c32bd0a17 100755 (executable)
@@ -3,8 +3,6 @@
 set -eux
 set -o pipefail
 
-systemd-analyze log-level debug
-
 cat >/run/systemd/system/floodme@.service <<EOF
 [Service]
 ExecStart=true
index a68d9dd53d495c4ec59ddf6cdcf15b79808ccf6b..7b93268afa153c50a4779f38804bd4139d1b375d 100755 (executable)
@@ -4,8 +4,6 @@
 set -eux
 set -o pipefail
 
-systemd-analyze log-level debug
-
 test_quotas() {
 
     local directory="$1"
@@ -90,6 +88,4 @@ EOF
 
 test_quotas "/var/lib/private" "StateDirectory=quotadir" "StateDirectoryQuota=1%"
 
-systemd-analyze log-level info
-
 touch /testok
index 080b42625cbfba54e360a3cac956a6dc269eb3f9..7eae005f85c73c80687f41bbd7755826bedc452c 100755 (executable)
@@ -20,8 +20,6 @@ at_exit() {
 
 trap at_exit EXIT
 
-systemctl service-log-level systemd-importd debug
-
 # Mount tmpfs over /var/lib/confexts to not pollute the image
 mkdir -p /var/lib/confexts
 mount -t tmpfs tmpfs /var/lib/confexts -o mode=755
index d93b3f0441fc921e4f98e07e293e2f011c03023f..add542882899932ab1ebf4ca139f05bc013cb00c 100755 (executable)
@@ -20,8 +20,6 @@ at_exit() {
 
 trap at_exit EXIT
 
-systemctl service-log-level systemd-machined debug
-systemctl service-log-level systemd-importd debug
 # per request in https://github.com/systemd/systemd/pull/35117
 systemctl edit --runtime --stdin 'systemd-nspawn@.service' --drop-in=debug.conf <<EOF
 [Service]
index 65c260639af3ce47cd6649222d2b21892e03a4d2..fd861904d478cde2e706c96cdec3441bc0ac3338 100755 (executable)
@@ -11,8 +11,6 @@ if [[ "$(get_cgroup_hierarchy)" != unified ]]; then
     exit 0
 fi
 
-systemd-analyze log-level debug
-
 # Multiple level process tree, parent process stays up
 cat >/tmp/test19-exit-cgroup.sh <<EOF
 #!/usr/bin/env bash
@@ -98,6 +96,3 @@ systemd-run --wait \
             --property="Type=notify" \
             --property="ExitType=cgroup" \
             /tmp/test19-exit-cgroup-parentless.sh 'systemctl kill --signal 9 six'
-
-
-systemd-analyze log-level info
index ae16871ffc1853834ed1f01371ea87cea680399a..f2f492edbf8c85f1eed551c1c390f0ee27c5b6d4 100755 (executable)
@@ -5,8 +5,6 @@ set -o pipefail
 
 # Test ExecReload= (PR #13098)
 
-systemd-analyze log-level debug
-
 export SYSTEMD_PAGER=
 SERVICE_PATH="$(mktemp /etc/systemd/system/execreloadXXX.service)"
 SERVICE_NAME="${SERVICE_PATH##*/}"
@@ -57,5 +55,3 @@ systemctl status "$SERVICE_NAME"
 systemctl reload "$SERVICE_NAME"
 systemctl status "$SERVICE_NAME"
 systemctl stop "$SERVICE_NAME"
-
-systemd-analyze log-level info
index 8d9fa670fd542ab7a14dd3c45f42d21e9a889c1b..f20af1a1418525080532d400310c7bce01d32537 100755 (executable)
@@ -4,8 +4,6 @@ set -eux
 
 # Test that ExecStopPost= is always run
 
-systemd-analyze log-level debug
-
 systemd-run --unit=simple1.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=simple \
     -p ExecStopPost='touch /run/simple1' true
 test -f /run/simple1
@@ -101,5 +99,3 @@ test -f /run/idle1
 (! systemd-run --unit=idle2.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=idle \
     -p ExecStopPost='touch /run/idle2' false)
 test -f /run/idle2
-
-systemd-analyze log-level info
index ddeeb854bca688acf1603c5a27b7a66fcd5d76d1..12efaf15dcb68c2fde957c234851be9833303b45 100755 (executable)
@@ -18,8 +18,6 @@ mkdir /tmp/test-extra-fd
 echo "Hello" > /tmp/test-extra-fd/1.txt
 echo "Extra" > /tmp/test-extra-fd/2.txt
 
-systemd-analyze log-level debug
-
 # Open files and assign FD to variables
 exec {TEST_FD1}</tmp/test-extra-fd/1.txt
 exec {TEST_FD2}</tmp/test-extra-fd/2.txt
@@ -61,5 +59,3 @@ assert_eq "$(systemctl show -P Result "$TEST_UNIT")" "success"
 assert_eq "$(systemctl show -P ExecMainStatus "$TEST_UNIT")" "0"
 
 systemctl stop "$TEST_UNIT"
-
-systemctl log-level info
index 4fd68d8b848e169f5cf1d226bd04b697e50106bf..1d27a24d8b5b82a746dd9beb799b023cbd6df42e 100755 (executable)
@@ -6,9 +6,6 @@ set -o pipefail
 
 # Test JoinsNamespaceOf= with PrivateTmp=yes
 
-systemd-analyze log-level debug
-systemd-analyze log-target journal
-
 # simple case
 systemctl start TEST-23-UNIT-FILE-joins-namespace-of-1.service
 systemctl start TEST-23-UNIT-FILE-joins-namespace-of-2.service
@@ -27,5 +24,3 @@ systemctl start TEST-23-UNIT-FILE-joins-namespace-of-8.service
 systemctl start TEST-23-UNIT-FILE-joins-namespace-of-9.service
 systemctl stop TEST-23-UNIT-FILE-joins-namespace-of-6.service
 systemctl stop TEST-23-UNIT-FILE-joins-namespace-of-8.service
-
-systemd-analyze log-level info
index a951b13b465d0f7f6d3ffa10c273788db7b39439..ec01e990be65e1e314cc374f18a791b111ef6c4e 100755 (executable)
@@ -5,8 +5,6 @@ set -o pipefail
 
 # Test StandardOutput=file:
 
-systemd-analyze log-level debug
-
 systemd-run --wait --unit=TEST-23-UNIT-FILE-standard-output-one \
             -p StandardOutput=file:/tmp/stdout \
             -p StandardError=file:/tmp/stderr \
@@ -56,5 +54,3 @@ EOF
 cmp /tmp/stderr <<EOF
 b
 EOF
-
-systemd-analyze log-level info
index b1fe897a43ca14f24a5c2dc863b42399576e1879..c62b33baa4b246431fc251613974423994381516 100755 (executable)
@@ -6,9 +6,6 @@ set -o pipefail
 
 # Test OnSuccess= + Uphold= + PropagatesStopTo= + BindsTo=
 
-systemd-analyze log-level debug
-systemd-analyze log-target journal
-
 # Idea is this:
 #    1. we start TEST-23-UNIT-FILE-success.service
 #    2. which through OnSuccess= starts TEST-23-UNIT-FILE-fail.service,
@@ -102,5 +99,3 @@ for _ in {1..120}; do
     fi
 done
 [[ "$sigrtmin1" == 1 ]]
-
-systemd-analyze log-level info
index 756d24848bbe6d2c06be91f4b18e243fe27765da..48f419271a8d606c27172ba72b25549daeae7d4a 100755 (executable)
@@ -5,8 +5,6 @@ set -o pipefail
 
 # Test ExecXYZEx= service unit dbus hookups
 
-systemd-analyze log-level debug
-
 declare -A property
 
 property[1_one]=ExecCondition
@@ -31,5 +29,3 @@ for c in "${!property[@]}"; do
     systemctl show -p "${property[$c]}" "$c" | grep -F "path=echo ; argv[]=echo \${$c} ; ignore_errors=no"
     systemctl show -p "${property[$c]}Ex" "$c" | grep -F "path=echo ; argv[]=echo \${$c} ; flags=no-env-expand"
 done
-
-systemd-analyze log-level info
index 9d2760ee8b762593c312681bb678eca2493fedd2..5e82641e5a4c6a18b45cc915f10d649611a08338 100755 (executable)
@@ -11,8 +11,6 @@ set -o pipefail
 # wait this many secs for each test service to succeed in what is being tested
 MAX_SECS=60
 
-systemctl log-level debug
-
 # test one: Restart=on-failure should restart the service
 (! systemd-run --unit=oneshot-restart-one -p Type=oneshot -p Restart=on-failure bash -c "exit 1")
 
@@ -97,5 +95,3 @@ EOF
 
 systemctl disable "$UNIT_NAME"
 rm "$TMP_FILE" /run/systemd/system/{"$UNIT_NAME","$ONSUCCESS_UNIT_NAME"} "$FIFO_FILE"
-
-systemctl log-level info
index 0e2e22a01d2a275950d2665e7e699f860bdd3834..2e8b9d9f54203220bf8794653de10b3482c0cad7 100755 (executable)
@@ -14,8 +14,6 @@ at_exit() {
 
 trap at_exit EXIT
 
-systemctl log-level debug
-
 # Existing files
 
 mkdir /tmp/test-open-file
@@ -51,5 +49,3 @@ systemctl stop TEST-23-UNIT-FILE-openfile-server.socket
 
 assert_rc 202 systemd-run -p OpenFile=/run/missing/foo:missing-file:read-only --wait true
 assert_rc 0 systemd-run -p OpenFile=/run/missing/foo:missing-file:read-only,graceful --wait true
-
-systemctl log-level info
index 8fc9596cc57e6a8531aee3b4c49705ccaa82778f..14276cc7726f758a0f9757f45842b1466f56047d 100755 (executable)
@@ -5,8 +5,6 @@ set -o pipefail
 
 # Test OnSuccess=/OnFailure= in combination
 
-systemd-analyze log-level debug
-
 # Start-up should fail, but the automatic restart should fix it
 (! systemctl start success-failure-test )
 
@@ -45,5 +43,3 @@ done
 test "$(systemctl is-active success-failure-test-failure)" = "inactive"
 
 systemctl stop success-failure-test success-failure-test-success
-
-systemd-analyze log-level info
index d5497efff2ac35ba1a0bc34010a6c7fbb84776ab..be877d771ec9128369c7ca855c1e8f5933d366fb 100755 (executable)
@@ -5,8 +5,6 @@ set -o pipefail
 
 # Test Type=exec
 
-systemd-analyze log-level debug
-
 # Create a binary for which execve() will fail
 touch /tmp/brokenbinary
 chmod +x /tmp/brokenbinary
@@ -59,5 +57,3 @@ busctl call \
         sleep 0         true \
         sleep 2 sleep 1 true \
     0)
-
-systemd-analyze log-level info
index bf796a2c0023bd50761fe5f7b0dc506f64a4e4ee..ecb6ed0a91f202318e0d52795cf322aef5a136c2 100755 (executable)
@@ -3,8 +3,6 @@
 set -eux
 set -o pipefail
 
-systemd-analyze log-level debug
-
 systemctl disable --now systemd-timesyncd.service
 
 timedatectl set-timezone Europe/Berlin
@@ -61,6 +59,4 @@ while test ! -f /tmp/timezone-changed-alternate-path-2 ; do sleep .5 ; done
 rm /run/systemd/system.conf /run/systemd/system/systemd-timedated.service.d/override.conf
 systemctl daemon-reload
 
-systemd-analyze log-level info
-
 touch /testok
index 046b8b954586ee8a7672b39c01649e338bcd7e1a..bb8823c1ad13e17e7e269117cf31b8126ca2abdc 100755 (executable)
@@ -10,8 +10,6 @@ set -o pipefail
 # kernels where the concept was still new.
 
 if test -f /sys/fs/cgroup/system.slice/TEST-32-OOMPOLICY.service/memory.oom.group; then
-    systemd-analyze log-level debug
-
     # Run a service that is guaranteed to be the first candidate for OOM killing
     systemd-run --unit=oomtest.service \
                 -p Type=exec -p OOMScoreAdjust=1000 -p OOMPolicy=stop -p MemoryAccounting=yes \
@@ -29,8 +27,6 @@ if test -f /sys/fs/cgroup/system.slice/TEST-32-OOMPOLICY.service/memory.oom.grou
 
     RESULT="$(systemctl show -P Result oomtest.service)"
     test "$RESULT" = "oom-kill"
-
-    systemd-analyze log-level info
 fi
 
 touch /testok
index 05d645c35efe81dc1c14a08fbaef6f1b92eaf251..e89c012dd37778f905082c98fb9baacf668237cd 100755 (executable)
@@ -3,8 +3,6 @@
 set -eux
 set -o pipefail
 
-systemd-analyze log-level debug
-
 test_directory() {
     local directory="$1"
     local path="$2"
@@ -239,6 +237,4 @@ if systemd-analyze compare-versions "$(uname -r)" ge 5.12; then
     test_check_idmapped_mounts_root
 fi
 
-systemd-analyze log-level info
-
 touch /testok
index fcd3d6dd8943b3f242828cec274e62a977f348f3..7e48b4739efb34aef29679d0d8d278b51f436c48 100755 (executable)
@@ -21,9 +21,6 @@ at_exit() {
 
 trap at_exit EXIT
 
-systemd-analyze log-level debug
-systemd-analyze log-target journal
-
 # Log files
 straceLog='strace.log'
 journalLog='journal.log'
@@ -352,6 +349,4 @@ fi
 rm -rf "$confDir"
 systemctl daemon-reload
 
-systemd-analyze log-level info
-
 touch /testok
index 31f28c9ef12002d7f6f220d5770d344464fea13e..5b1920dfb422194a3e4bda7de9ecfa7c96b2c811 100755 (executable)
@@ -12,8 +12,6 @@ if [[ -n "${COVERAGE_BUILD_DIR:-}" ]]; then
     exit 77
 fi
 
-systemd-analyze log-level debug
-
 unit=TEST-38-FREEZER-sleep.service
 
 start_test_service() {
index 0805a5caf9449e018e5eb7def2c9285376fab312..b28df65fe57e27bca129e83c5eb74863b113f0f4 100755 (executable)
@@ -13,13 +13,9 @@ fi
 
 install_extension_images
 
-systemd-analyze log-level debug
-
 runas testuser systemd-run --wait --user --unit=test-private-users \
     -p PrivateUsers=yes -P echo hello
 
-runas testuser systemctl --user log-level debug
-
 runas testuser systemd-run --wait --user --unit=test-private-tmp-innerfile \
     -p PrivateTmp=yes \
     -P touch /tmp/innerfile.txt
@@ -140,6 +136,4 @@ if unshare --mount --user --map-root-user mount -t overlay overlay /tmp/c -o low
         grep PORTABLE_PREFIXES=app1 /usr/lib/extension-release.d/extension-release.app2
 fi
 
-systemd-analyze log-level info
-
 touch /testok
index 0819a4b8433923b37a4d71f14ed082284fe3c465..0b214c9378568e6d5112c528e2d87fc478054349 100755 (executable)
@@ -2,8 +2,6 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 set -eux
 
-systemd-analyze log-level debug
-
 journalctl --list-namespaces -o json | jq .
 
 systemd-run --wait -p LogNamespace=foobar echo "hello world"
@@ -25,6 +23,4 @@ journalctl --list-namespaces -o json | jq .
 grep "^hello world$" /tmp/hello-world
 (! grep "^hello world$" /tmp/no-hello-world)
 
-systemd-analyze log-level info
-
 touch /testok
index b18a6c11f87e98a324ebca487ab0885e84c5334e..15a53b18f75af7ee808af720ffbfae5cacf964c5 100755 (executable)
@@ -40,9 +40,6 @@ FSTYPE="$(stat --file-system --format "%T" /)"
 
 systemctl start systemd-homed.service systemd-userdbd.socket
 
-systemd-analyze log-level debug
-systemctl service-log-level systemd-homed debug
-
 # Create a tmpfs to use as backing store for the home dir. That way we can enforce a size limit nicely.
 mkdir -p /home
 mount -t tmpfs tmpfs /home -o size=290M
@@ -848,6 +845,4 @@ homectl inspect matchtest
 homectl inspect matchtest | grep "Area: quux3"
 homectl remove matchtest
 
-systemd-analyze log-level info
-
 touch /testok
index 16ff507d0d2974a9b62a48161ff4421cf3b8383e..05c42ef72d4f1c9a852675a92bddd1f7fac62870 100755 (executable)
@@ -3,8 +3,6 @@
 set -ex
 set -o pipefail
 
-systemd-analyze log-level debug
-
 systemctl enable test-honor-first-shutdown.service
 systemctl start test-honor-first-shutdown.service
 
index d349b0f3e453ce81e56b6f9d325da2406f3d481e..b549745e0d45263cdcc7b64da6fac8ccd41e0bcf 100755 (executable)
@@ -6,8 +6,6 @@ set -eux
 # shellcheck source=test/units/util.sh
 . "$(dirname "$0")"/util.sh
 
-systemd-analyze log-level debug
-
 run_with_cred_compare() (
     local cred="${1:?}"
     local exp="${2?}"
@@ -529,6 +527,4 @@ run0 -u testuser --pipe mkdir -p /home/testuser/.config/credstore.encrypted
 run0 -u testuser --pipe systemd-creds encrypt --user --name=brummbaer - /home/testuser/.config/credstore.encrypted/brummbaer < /tmp/brummbaer.data
 run0 -u testuser --pipe systemd-run --user --pipe -p ImportCredential=brummbaer systemd-creds cat brummbaer | cmp /tmp/brummbaer.data
 
-systemd-analyze log-level info
-
 touch /testok
index a28c6856a54bc747496740c3e87ebd730a26f45d..90d40069f7409d0547304b6a6878858a566ccaca 100755 (executable)
@@ -8,8 +8,6 @@ set -o pipefail
 # shellcheck source=test/units/util.sh
 . "$(dirname "$0")"/util.sh
 
-systemd-analyze log-level debug
-
 # Ensure that the init.scope.d drop-in is applied on boot
 test "$(cat /sys/fs/cgroup/init.scope/memory.high)" != "max"
 
@@ -346,6 +344,4 @@ EOF
 
 run_testcases
 
-systemd-analyze log-level info
-
 touch /testok
index 7f79052cbb2138eff631926eb479c6e726e954f0..6600bd054dc075fb20efa1180cfbfe169b53371b 100755 (executable)
@@ -3,11 +3,6 @@
 set -eux
 set -o pipefail
 
-fail() {
-    systemd-analyze log-level info
-    exit 1
-}
-
 # Wait for a service to enter a state within a timeout period, if it doesn't
 # enter the desired state within the timeout period then this function will
 # exit the test case with a non zero exit code.
@@ -27,9 +22,6 @@ wait_on_state_or_fail() {
     done
 }
 
-systemd-analyze log-level debug
-
-
 cat >/run/systemd/system/testservice-fail-59.service <<EOF
 [Unit]
 Description=TEST-59-RELOADING-RESTART Normal exit
@@ -83,8 +75,6 @@ systemctl start testservice-abort-restart-59.service
 systemctl --signal=SIGABRT kill testservice-abort-restart-59.service
 wait_on_state_or_fail "testservice-abort-restart-59.service" "failed" "30"
 
-systemd-analyze log-level info
-
 # Test that rate-limiting daemon-reload works
 mkdir -p /run/systemd/system.conf.d/
 cat >/run/systemd/system.conf.d/50-test-59-reload.conf <<EOF
@@ -152,8 +142,6 @@ EOF
 
 chmod +x /run/notify-reload-test.sh
 
-systemd-analyze log-level debug
-
 systemd-run --unit notify-reload-test -p Type=notify-reload -p KillMode=process /run/notify-reload-test.sh
 systemctl reload notify-reload-test
 systemctl stop notify-reload-test
@@ -163,8 +151,6 @@ test "$(systemctl show -p ExecMainStatus --value notify-reload-test)" = 109
 systemctl reset-failed notify-reload-test
 rm /run/notify-reload-test.sh
 
-systemd-analyze log-level info
-
 # Ensure that, with system log level info, we get debug level messages when a unit fails to start and is
 # restarted with RestartMode=debug
 cat >/run/systemd/system/testservice-fail-restart-debug-59.service <<EOF
index d91e22225e17b94726a78cda9bb0fd17df7b2811..77d4899f87e4d944421cda04b15f9c42bf061234 100755 (executable)
@@ -168,9 +168,6 @@ testcase_mount_ratelimit() {
     timeout 2m bash -c 'while systemctl list-units -t mount tmp-meow* | grep -q tmp-meow; do systemctl daemon-reload; sleep 10; done'
 }
 
-systemd-analyze log-level debug
-systemd-analyze log-target journal
-
 mkdir -p /run/systemd/journald.conf.d
 cat >/run/systemd/journald.conf.d/99-ratelimit.conf <<EOF
 [Journal]
index 35ab862f32173d850f9ddc42465cb29d970e32b1..0c6a566d99a7d5f7dbdd951f18f8447c23a30163 100755 (executable)
@@ -4,8 +4,6 @@ set -ex
 set -o pipefail
 
 setup() {
-    systemd-analyze log-level debug
-
     for i in {0..3};
     do
         ip netns del "ns${i}" || true
@@ -30,8 +28,6 @@ teardown() {
         ip netns del "ns${i}"
         ip link del "veth${i}"
     done
-
-    systemd-analyze log-level info
 }
 
 if systemd-analyze compare-versions "$(uname -r)" lt 5.7; then
index cdd323cba65e16c5c1257a61a2f860358bb56270..fa58ff382c0a0ff21d78a5c576f611cba4567ae3 100755 (executable)
@@ -6,8 +6,6 @@ set -o pipefail
 # shellcheck source=test/units/util.sh
 . "$(dirname "$0")"/util.sh
 
-systemctl log-level debug
-
 # Test that a path unit continuously triggering a service that fails condition checks eventually fails with
 # the trigger-limit-hit error.
 rm -f /tmp/nonexistent
@@ -120,6 +118,4 @@ echo test2 > /tmp/copyme
 exec {lock}<&-
 timeout 30 bash -c 'until diff /tmp/copyme /tmp/copied >/dev/null; do sleep .2; done'
 
-systemctl log-level info
-
 touch /testok
index 233b79951a13b670678c19ee307ce3b56650644c..e391b765a3e0e765453bdee346a71f41fc3b4e04 100755 (executable)
@@ -6,7 +6,6 @@ set -eux
 # shellcheck source=test/units/util.sh
 . "$(dirname "$0")"/util.sh
 
-systemctl log-level debug
 export SYSTEMD_LOG_LEVEL=debug
 
 # Sanity checks
@@ -1147,6 +1146,4 @@ MAIN_PID=$(systemctl show -p MainPID --value "$UNIT_NAME")
 OUTPUT=$(systemd-analyze unit-shell "$UNIT_NAME" cat /tmp/testfile)
 assert_in "Hello from test unit" "$OUTPUT"
 
-systemd-analyze log-level info
-
 touch /testok
index ccdfcb274c1d9a09e74dd9ece99af6ee3ff29a46..eb954e3bb5c281721fd647756c7a071c2eb7da9e 100755 (executable)
@@ -5,8 +5,6 @@ set -o pipefail
 
 RESULTS_FILE=/tmp/TEST-66-DEVICE-ISOLATION.serviceresults
 
-systemd-analyze log-level debug
-
 systemctl start TEST-66-DEVICE-ISOLATION-device-isolation.service
 
 sleep 5
@@ -19,6 +17,4 @@ systemctl stop TEST-66-DEVICE-ISOLATION-device-isolation.service
 
 grep -q "thisshouldnotbehere" "$RESULTS_FILE" && exit 42
 
-systemd-analyze log-level info
-
 touch /testok
index 70743b78df15f4de640d2ef3661b7877bf4395d4..d8fa4a4cba9399a066286038c6366ca7e96bc1f1 100755 (executable)
@@ -14,7 +14,6 @@ wait_on_state_or_fail() {
     state=$(systemctl show "$service" --property=ActiveState --value)
     while [ "$state" != "$expected_state" ]; do
         if [ "$timeout" = "0" ]; then
-            systemd-analyze log-level info
             exit 1
         fi
         timeout=$((timeout - 1))
@@ -23,8 +22,6 @@ wait_on_state_or_fail() {
     done
 }
 
-systemd-analyze log-level debug
-
 cat >/run/systemd/system/testservice-failure-68.service <<EOF
 [Unit]
 OnFailure=testservice-failure-exit-handler-68.service
@@ -226,6 +223,4 @@ wait_on_state_or_fail "testservice-failure-exit-handler-68-template@testservice-
 systemctl start testservice-success-and-failure-68.service
 wait_on_state_or_fail "testservice-success-exit-handler-68.service" "inactive" "10"
 
-systemd-analyze log-level info
-
 touch /testok
index 5e4fa0647166c8b1fc00f98b28cf4a1a8f605670..cabd389f3cc22661c492c59bc3bbfbfe9b1f2499 100755 (executable)
@@ -70,7 +70,6 @@ restart_resolved() {
     # and can occasionally hit the default rate limit
     systemctl reset-failed systemd-resolved.service
     systemctl start systemd-resolved.service
-    systemctl service-log-level systemd-resolved.service debug
 }
 
 setup() {
@@ -1440,7 +1439,6 @@ EOF
 # PRE-SETUP
 systemctl unmask systemd-resolved.service
 systemctl enable --now systemd-resolved.service
-systemctl service-log-level systemd-resolved.service debug
 
 # Need to be run before SETUP, otherwise things will break
 manual_testcase_01_resolvectl
index 46afd3c4316669dec3ab119080217401a80f3557..552d61bb21b00a85ad5d88093263c76ae162abac 100755 (executable)
@@ -9,8 +9,6 @@ if ! env --block-signal=SIGUSR1 true 2> /dev/null ; then
     exit 0
 fi
 
-systemd-analyze log-level debug
-
 UNIT="test-sigqueue-$RANDOM.service"
 
 systemd-run -u "$UNIT" -p Type=notify -p DynamicUser=1 -- env --block-signal=SIGRTMIN+7 systemd-notify --exec --ready \; sleep infinity
@@ -30,6 +28,4 @@ test "$(grep SigQ: /proc/"$P"/status | cut -d: -f2 | cut -d/ -f1)" -eq 6
 
 systemctl stop $UNIT
 
-systemd-analyze log-level info
-
 touch /testok
index 0cf5c37416ee33c936138b2ceee75493c33a3e13..065916096682e82bf0366b6606edff4a6f706ba1 100755 (executable)
@@ -13,8 +13,6 @@ if ! cat /proc/pressure/memory >/dev/null ; then
     exit 0
 fi
 
-systemd-analyze log-level debug
-
 CGROUP=/sys/fs/cgroup/"$(systemctl show TEST-79-MEMPRESS.service -P ControlGroup)"
 test -d "$CGROUP"
 
@@ -63,6 +61,4 @@ systemd-run \
 
 rm "$SCRIPT"
 
-systemd-analyze log-level info
-
 touch /testok
index 355f6e7e30734401113ab6b5b2916af69b8f8514..a8ecd9fa7091a2c3fd0bbaf1d511c9f62950072e 100755 (executable)
@@ -98,8 +98,6 @@ systemd-analyze fdstore "$MYUNIT" --json=short | grep -P -q '\[{"fdname":"quux",
 systemctl stop "$MYUNIT"
 rm "$MYSCRIPT"
 
-systemd-analyze log-level debug
-
 # Test fdstore pinning (this will pull in fdstore-pin.service fdstore-nopin.service)
 systemctl start fdstore-pin.target
 
index 9d6a93f8e8e45e3cac90f7aa5609159a3963c892..274e54a1178007753dc3c1a6d8420f3316ec0bc3 100755 (executable)
@@ -71,8 +71,6 @@ check_device_property() {
     assert_eq "$count" "$expected_count"
 }
 
-systemd-analyze log-level debug
-
 export SYSTEMD_LOG_LEVEL=debug
 
 if [ -f /run/TEST-82-SOFTREBOOT.touch3 ]; then
@@ -325,7 +323,5 @@ EOF
     exec sleep infinity
 fi
 
-systemd-analyze log-level info
-
 touch /testok
 systemctl --no-block exit 123
index 043d0238565603df39f6ae6dbb7a347a3dbcb9b3..be5297fa52da90e91a992078938f26c0234dea29 100755 (executable)
@@ -3,8 +3,6 @@
 set -eux
 set -o pipefail
 
-systemctl log-level info
-
 (! systemd-detect-virt -cq)
 
 DUMMY_DMESG_0="$(mktemp)"