]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: replace cursor file with a plain cursor v239-28
authorFrantisek Sumsal <fsumsal@redhat.com>
Tue, 3 Mar 2020 14:54:29 +0000 (15:54 +0100)
committerJan Synacek <jan.synacek@gmail.com>
Wed, 11 Mar 2020 11:32:25 +0000 (12:32 +0100)
systemd in RHEL 8 doesn't support the --cursor-file option, so let's
fall back to a plain cursor string

Related: #1808940
rhel-only

test/TEST-36-NUMAPOLICY/test.sh
test/TEST-36-NUMAPOLICY/testsuite.sh

index 3b3b120423b5c65d9c11265d941e7064ac7831eb..7cc909765bc7d1aa6efce431f190dfb2b19f4ccd 100755 (executable)
@@ -17,7 +17,7 @@ test_setup() {
         eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
 
         setup_basic_environment
-        dracut_install mktemp
+        dracut_install mktemp awk
 
         # mask some services that we do not want to run in these tests
         ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service
index a5ac788178ec84672a7fd58472f083724b95f6d6..bffac4ffe6914bd47e11c965be7d21ded0dd40d1 100755 (executable)
@@ -30,7 +30,7 @@ journalSleep=5
 sleepAfterStart=1
 
 # Journal cursor for easier navigation
-journalCursorFile="jounalCursorFile"
+journalCursor=""
 
 startStrace() {
     coproc strace -qq -p 1 -o $straceLog -e set_mempolicy -s 1024 $1
@@ -46,7 +46,7 @@ stopStrace() {
 
 startJournalctl() {
     # Save journal's cursor for later navigation
-    journalctl --no-pager --cursor-file="$journalCursorFile" -n0 -ocat
+    journalCursor="$(journalctl --no-pager --show-cursor -n0 -ocat | awk '{print $3}')"
 }
 
 stopJournalctl() {
@@ -55,7 +55,7 @@ stopJournalctl() {
     # the --sync wait until the synchronization is complete
     echo "Force journald to write all queued messages"
     journalctl --sync
-    journalctl -u $unit --cursor-file="$journalCursorFile" > "$journalLog"
+    journalctl -u $unit --after-cursor="$journalCursor" > "$journalLog"
 }
 
 checkNUMA() {