teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

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

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