Blame SOURCES/0001-Fix-regressions.sh-make-parameter-passing-consistent.patch

e18b07
From 1d2a7b8d059d4f090b351b8decca0ddf274c82a0 Mon Sep 17 00:00:00 2001
e18b07
From: Klaus Wenninger <klaus.wenninger@aon.at>
e18b07
Date: Wed, 20 Nov 2019 15:20:19 +0100
e18b07
Subject: [PATCH] Fix: regressions.sh: make parameter passing consistent
e18b07
e18b07
---
e18b07
 tests/regressions.sh | 24 ++++++++++++------------
e18b07
 1 file changed, 12 insertions(+), 12 deletions(-)
e18b07
e18b07
diff --git a/tests/regressions.sh b/tests/regressions.sh
e18b07
index 6cfb303..7ab80be 100755
e18b07
--- a/tests/regressions.sh
e18b07
+++ b/tests/regressions.sh
e18b07
@@ -32,7 +32,7 @@
e18b07
 : ${SBD_USE_DM:="yes"}
e18b07
 
e18b07
 sbd() {
e18b07
-	LD_PRELOAD=${SBD_PRELOAD} SBD_WATCHDOG_TIMEOUT=5 SBD_DEVICE="${SBD_DEVICE}" SBD_PRELOAD_LOG=${SBD_PRELOAD_LOG} SBD_WATCHDOG_DEV=/dev/watchdog setsid ${SBD_BINARY} -p ${SBD_PIDFILE} $*
e18b07
+	LD_PRELOAD=${SBD_PRELOAD} SBD_WATCHDOG_TIMEOUT=5 SBD_DEVICE="${SBD_DEVICE}" SBD_PRELOAD_LOG=${SBD_PRELOAD_LOG} SBD_WATCHDOG_DEV=/dev/watchdog setsid ${SBD_BINARY} -p ${SBD_PIDFILE} "$@"
e18b07
 }
e18b07
 
e18b07
 sbd_wipe_disk() {
e18b07
@@ -98,26 +98,26 @@ sbd_daemon_cleanup() {
e18b07
 	pkill -TERM --pidfile ${SBD_PIDFILE} 2>/dev/null
e18b07
 	sleep 5
e18b07
 	pkill -KILL --pidfile ${SBD_PIDFILE} 2>/dev/null
e18b07
-	pkill -KILL --parent $(cat ${SBD_PIDFILE} 2>/dev/null) 2>/dev/null
e18b07
+	pkill -KILL --parent "$(cat ${SBD_PIDFILE} 2>/dev/null)" 2>/dev/null
e18b07
 	echo > ${SBD_PIDFILE}
e18b07
 }
e18b07
 
e18b07
 _ok() {
e18b07
-	echo -- $@
e18b07
-	$@
e18b07
+	echo "-- $*"
e18b07
+	"$@"
e18b07
 	rc=$?
e18b07
 	if [ $rc -ne 0 ]; then
e18b07
-		echo "$@ failed with $rc"
e18b07
+		echo "$* failed with $rc"
e18b07
 		exit $rc
e18b07
 	fi
e18b07
 }
e18b07
 
e18b07
 _no() {
e18b07
-	echo -- $@
e18b07
-	$@
e18b07
+	echo "-- $*"
e18b07
+	"$@"
e18b07
 	rc=$?
e18b07
 	if [ $rc -eq 0 ]; then
e18b07
-		echo "$@ did NOT fail ($rc)"
e18b07
+		echo "$* did NOT fail ($rc)"
e18b07
 		exit $rc
e18b07
 	fi
e18b07
 	return 0
e18b07
@@ -126,7 +126,7 @@ _no() {
e18b07
 _in_log() {
e18b07
 	grep "$@" ${SBD_PRELOAD_LOG} >/dev/null
e18b07
 	if [ $? -ne 0 ]; then
e18b07
-		echo "didn't find '$@' in log:"
e18b07
+		echo "didn't find '$*' in log:"
e18b07
 		cat ${SBD_PRELOAD_LOG}
e18b07
 		sbd_daemon_cleanup
e18b07
 		exit 1
e18b07
@@ -227,10 +227,10 @@ test_stall_inquisitor() {
e18b07
 	sbd_daemon_cleanup
e18b07
 	sbd -d ${D[1]} -d ${D[2]} -d ${D[3]} -n test-1 watch
e18b07
 	sleep 10
e18b07
-	_ok kill -0 $(cat ${SBD_PIDFILE})
e18b07
-	kill -STOP $(cat ${SBD_PIDFILE})
e18b07
+	_ok kill -0 "$(cat ${SBD_PIDFILE})"
e18b07
+	kill -STOP "$(cat ${SBD_PIDFILE})"
e18b07
 	sleep 10
e18b07
-	kill -CONT $(cat ${SBD_PIDFILE}) 2>/dev/null
e18b07
+	kill -CONT "$(cat ${SBD_PIDFILE})" 2>/dev/null
e18b07
 	_in_log "watchdog fired"
e18b07
 }
e18b07
 
e18b07
-- 
e18b07
1.8.3.1
e18b07