Blame SOURCES/0341-test-replace-cursor-file-with-a-plain-cursor.patch

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