From e0deb1bdaf3a71cdda93d692e82341d1226e73a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Tue, 15 Mar 2022 00:31:00 +0100 Subject: [PATCH] beakerlib: fix systemd rate limiting for variables-support-in-profiles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jaroslav Škarvada --- tests/beakerlib/variables-support-in-profiles/runtest.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/beakerlib/variables-support-in-profiles/runtest.sh b/tests/beakerlib/variables-support-in-profiles/runtest.sh index b8423bb..b3000b9 100755 --- a/tests/beakerlib/variables-support-in-profiles/runtest.sh +++ b/tests/beakerlib/variables-support-in-profiles/runtest.sh @@ -22,12 +22,14 @@ PACKAGE="tuned" rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE + rlFileBackup --clean /etc/systemd/system.conf.d + rlRun "mkdir -p /etc/systemd/system.conf.d" + rlRun "echo -e '[Manager]\nDefaultStartLimitInterval=0' > /etc/systemd/system.conf.d/tuned.conf" 0 "Disable systemd rate limiting" + rlRun "systemctl daemon-reload" rlImport "tuned/basic" rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" rlRun "pushd $TmpDir" - sleep 2 rlServiceStart "tuned" - sleep 2 tunedProfileBackup rlFileBackup "/usr/lib/tuned/balanced/tuned.conf" @@ -56,8 +58,8 @@ vm.swappiness = \${SWAPPINESS2} rlRun "sysctl vm.swappiness=$OLD_SWAPPINESS" rlFileRestore tunedProfileRestore - sleep 2 rlServiceRestore "tuned" + rlRun "systemctl daemon-reload" rlRun "popd" rlRun "rm -r $TmpDir" 0 "Removing tmp directory" rlPhaseEnd