Blob Blame History Raw
From 14563ef132ddaa44083d5b2452ef036abb203493 Mon Sep 17 00:00:00 2001
From: Ed Santiago <santiago@redhat.com>
Date: Tue, 18 Oct 2022 10:24:46 -0600
Subject: [PATCH] system tests: fix broken bashisms

gating tests failing on rawhide, and will probably fail
on f36 and f37 due to long-broken bugs that are now
caught by (bats, I think? new version of bash? who knows).

This is a partial cherry-pick of #16220, omitting the
change to testimage (not needed here)

Signed-off-by: Ed Santiago <santiago@redhat.com>
---
 test/system/260-sdnotify.bats          | 2 ++
 test/system/270-socket-activation.bats | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/test/system/260-sdnotify.bats b/test/system/260-sdnotify.bats
index c4724d60528..970a2e3c7c5 100644
--- a/test/system/260-sdnotify.bats
+++ b/test/system/260-sdnotify.bats
@@ -41,7 +41,9 @@ function teardown() {
 function _start_socat() {
     _SOCAT_LOG="$PODMAN_TMPDIR/socat.log"
 
+    # Reset socat logfile to empty
     rm -f $_SOCAT_LOG
+    touch $_SOCAT_LOG
     # Execute in subshell so we can close fd3 (which BATS uses).
     # This is a superstitious ritual to try to avoid leaving processes behind,
     # and thus prevent CI hangs.
diff --git a/test/system/270-socket-activation.bats b/test/system/270-socket-activation.bats
index 6d582be180f..a8ae2343315 100644
--- a/test/system/270-socket-activation.bats
+++ b/test/system/270-socket-activation.bats
@@ -101,7 +101,7 @@ function teardown() {
         die "Pause pid file does not exist: $pause_pid_file"
     fi
 
-    echo "kill -9 $(< pause_pid_file)"
+    echo "kill -9 $(< $pause_pid_file) [pause process]"
     kill -9 $(< $pause_pid_file)
 
     run curl -s --max-time 3 --unix-socket $SERVICE_SOCK_ADDR $_PING