From 29d5cc053f4e91545e4c0b414b80a786e2f82dd9 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Wed, 23 Mar 2022 13:00:10 -0400 Subject: [PATCH] vmcheck/history: delete journal hack This is a racy hack because the journal could still be flushing things while we try to delete it. But anyway, it was needed when we would reuse the same VM for multiple vmcheck tests. This is no longer the case since rebasing on top of `kola`. So just nuke it. --- tests/vmcheck/test-history.sh | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tests/vmcheck/test-history.sh b/tests/vmcheck/test-history.sh index cc1e50fed7..c2df180985 100755 --- a/tests/vmcheck/test-history.sh +++ b/tests/vmcheck/test-history.sh @@ -94,18 +94,9 @@ fi # get the most recent entry entry=$(tail -n 1 entries.txt) -# And now nuke all the journal entries except the latest, but we don't want to -# actually lose everything since e.g. some of the previous vmcheck tests that -# ran on this machine may have failed and we would've rendered the journal -# useless for debugging. So hack around that... yeah, would be cleaner if we -# could just spawn individual VMs per test. -vm_cmd systemctl stop systemd-journald.service -vm_cmd cp -r /var/log/journal{,.bak} +# And now nuke all the journal entries except the latest. vm_cmd journalctl --vacuum-time=$((entry - 1))s vm_rpmostree cleanup -b -vm_cmd systemctl stop systemd-journald.service -vm_cmd rm -rf /var/log/journal -vm_cmd mv /var/log/journal{.bak,} vm_cmd ls -l /var/lib/rpm-ostree/history > entries.txt if [ $(wc -l entries.txt) != 1 ]; then