From: Yu Watanabe Date: Tue, 16 Aug 2022 20:20:27 +0000 (+0900) Subject: test: do not use sysctl.d to store test conf X-Git-Tag: v252-rc1~428^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f75892dd25651653a9736a26e9f7768ac5a636b;p=thirdparty%2Fsystemd.git test: do not use sysctl.d to store test conf Otherwise, late invocations of systemd-sysctl, especially through udev rules may fail. --- diff --git a/test/units/testsuite-76.sh b/test/units/testsuite-76.sh index 6ebdbc6a549..3095b8fc342 100755 --- a/test/units/testsuite-76.sh +++ b/test/units/testsuite-76.sh @@ -5,12 +5,12 @@ set -o pipefail export SYSTEMD_LOG_LEVEL=debug -echo "foo.bar=42" > /etc/sysctl.d/foo.conf -[[ $(/usr/lib/systemd/systemd-sysctl /etc/sysctl.d/foo.conf)$? -eq 0 ]] -[[ $(/usr/lib/systemd/systemd-sysctl --strict /etc/sysctl.d/foo.conf)$? -ne 0 ]] +echo "foo.bar=42" > /tmp/foo.conf +[[ $(/usr/lib/systemd/systemd-sysctl /tmp/foo.conf)$? -eq 0 ]] +[[ $(/usr/lib/systemd/systemd-sysctl --strict /tmp/foo.conf)$? -ne 0 ]] -echo "-foo.foo=42" > /etc/sysctl.d/foo.conf -[[ $(/usr/lib/systemd/systemd-sysctl /etc/sysctl.d/foo.conf)$? -eq 0 ]] -[[ $(/usr/lib/systemd/systemd-sysctl --strict /etc/sysctl.d/foo.conf)$? -eq 0 ]] +echo "-foo.foo=42" > /tmp/foo.conf +[[ $(/usr/lib/systemd/systemd-sysctl /tmp/foo.conf)$? -eq 0 ]] +[[ $(/usr/lib/systemd/systemd-sysctl --strict /tmp/foo.conf)$? -eq 0 ]] touch /testok