dcavalca / rpms / systemd

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