ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
c2dfb7
From 0bef8805c81eecfe3960bf00b6022837e4979198 Mon Sep 17 00:00:00 2001
c2dfb7
From: Frantisek Sumsal <fsumsal@redhat.com>
c2dfb7
Date: Tue, 3 Mar 2020 15:54:29 +0100
c2dfb7
Subject: [PATCH] test: replace cursor file with a plain cursor
c2dfb7
c2dfb7
systemd in RHEL 8 doesn't support the --cursor-file option, so let's
c2dfb7
fall back to a plain cursor string
c2dfb7
c2dfb7
Related: #1808940
c2dfb7
rhel-only
c2dfb7
---
c2dfb7
 test/TEST-36-NUMAPOLICY/test.sh      | 2 +-
c2dfb7
 test/TEST-36-NUMAPOLICY/testsuite.sh | 6 +++---
c2dfb7
 2 files changed, 4 insertions(+), 4 deletions(-)
c2dfb7
c2dfb7
diff --git a/test/TEST-36-NUMAPOLICY/test.sh b/test/TEST-36-NUMAPOLICY/test.sh
c2dfb7
index 3b3b120423..7cc909765b 100755
c2dfb7
--- a/test/TEST-36-NUMAPOLICY/test.sh
c2dfb7
+++ b/test/TEST-36-NUMAPOLICY/test.sh
c2dfb7
@@ -17,7 +17,7 @@ test_setup() {
c2dfb7
         eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
c2dfb7
 
c2dfb7
         setup_basic_environment
c2dfb7
-        dracut_install mktemp
c2dfb7
+        dracut_install mktemp awk
c2dfb7
 
c2dfb7
         # mask some services that we do not want to run in these tests
c2dfb7
         ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
c2dfb7
diff --git a/test/TEST-36-NUMAPOLICY/testsuite.sh b/test/TEST-36-NUMAPOLICY/testsuite.sh
c2dfb7
index a5ac788178..bffac4ffe6 100755
c2dfb7
--- a/test/TEST-36-NUMAPOLICY/testsuite.sh
c2dfb7
+++ b/test/TEST-36-NUMAPOLICY/testsuite.sh
c2dfb7
@@ -30,7 +30,7 @@ journalSleep=5
c2dfb7
 sleepAfterStart=1
c2dfb7
 
c2dfb7
 # Journal cursor for easier navigation
c2dfb7
-journalCursorFile="jounalCursorFile"
c2dfb7
+journalCursor=""
c2dfb7
 
c2dfb7
 startStrace() {
c2dfb7
     coproc strace -qq -p 1 -o $straceLog -e set_mempolicy -s 1024 $1
c2dfb7
@@ -46,7 +46,7 @@ stopStrace() {
c2dfb7
 
c2dfb7
 startJournalctl() {
c2dfb7
     # Save journal's cursor for later navigation
c2dfb7
-    journalctl --no-pager --cursor-file="$journalCursorFile" -n0 -ocat
c2dfb7
+    journalCursor="$(journalctl --no-pager --show-cursor -n0 -ocat | awk '{print $3}')"
c2dfb7
 }
c2dfb7
 
c2dfb7
 stopJournalctl() {
c2dfb7
@@ -55,7 +55,7 @@ stopJournalctl() {
c2dfb7
     # the --sync wait until the synchronization is complete
c2dfb7
     echo "Force journald to write all queued messages"
c2dfb7
     journalctl --sync
c2dfb7
-    journalctl -u $unit --cursor-file="$journalCursorFile" > "$journalLog"
c2dfb7
+    journalctl -u $unit --after-cursor="$journalCursor" > "$journalLog"
c2dfb7
 }
c2dfb7
 
c2dfb7
 checkNUMA() {