teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0338-test-give-strace-some-time-to-initialize.patch

c2dfb7
From 66f6f6304d87b2fe0c4f91373c7d1b836de1b054 Mon Sep 17 00:00:00 2001
c2dfb7
From: Frantisek Sumsal <frantisek@sumsal.cz>
c2dfb7
Date: Tue, 23 Jul 2019 00:56:04 +0200
c2dfb7
Subject: [PATCH] test: give strace some time to initialize
c2dfb7
c2dfb7
The `coproc` implementation seems to be a little bit different in older
c2dfb7
bash versions, so the `strace` is sometimes started AFTER `systemctl
c2dfb7
daemon-reload`, which causes unexpected fails. Let's help it a little by
c2dfb7
sleeping for a bit.
c2dfb7
c2dfb7
(cherry picked from commit c7367d7cfdfdcec98f8659f0ed3f1d7b77123903)
c2dfb7
c2dfb7
Related: #1808940
c2dfb7
---
c2dfb7
 test/TEST-36-NUMAPOLICY/testsuite.sh | 2 ++
c2dfb7
 1 file changed, 2 insertions(+)
c2dfb7
c2dfb7
diff --git a/test/TEST-36-NUMAPOLICY/testsuite.sh b/test/TEST-36-NUMAPOLICY/testsuite.sh
c2dfb7
index 4b715d305a..1c8cf7e6b6 100755
c2dfb7
--- a/test/TEST-36-NUMAPOLICY/testsuite.sh
c2dfb7
+++ b/test/TEST-36-NUMAPOLICY/testsuite.sh
c2dfb7
@@ -34,6 +34,8 @@ journalCursorFile="jounalCursorFile"
c2dfb7
 
c2dfb7
 startStrace() {
c2dfb7
     coproc strace -qq -p 1 -o $straceLog -e set_mempolicy -s 1024 $1
c2dfb7
+    # Wait for strace to properly "initialize"
c2dfb7
+    sleep $sleepAfterStart
c2dfb7
 }
c2dfb7
 
c2dfb7
 stopStrace() {