]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: enable debug logging of systemd-oomd
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 2 Jul 2021 17:04:31 +0000 (02:04 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 2 Jul 2021 20:04:59 +0000 (05:04 +0900)
test/units/testsuite-55.sh

index 63549c8a7850a5fec986e39d7007d1dd33fca1df..a6931a436171ad485bae7b15553bc648f01b2d06 100755 (executable)
@@ -23,6 +23,16 @@ rm -rf /etc/systemd/system/testsuite-55-testbloat.service.d
 
 echo "DefaultMemoryPressureDurationSec=5s" >>/etc/systemd/oomd.conf
 
+mkdir -p /etc/systemd/system/systemd-oomd.service.d/
+echo -e "[Service]\nEnvironment=SYSTEMD_LOG_LEVEL=debug" >/etc/systemd/system/systemd-oomd.service.d/debug.conf
+
+systemctl daemon-reload
+
+# if oomd is already running for some reasons, then restart it to make sure the above settings to be applied
+if systemctl is-active systemd-oomd.service; then
+    systemctl restart systemd-oomd.service
+fi
+
 systemctl start testsuite-55-testchill.service
 systemctl start testsuite-55-testbloat.service