diff mbox series

[kvm-unit-tests,GIT,PULL,11/13] s390x: Use local accel variable in arch_cmd_s390x

Message ID 20240424105935.184138-12-nrb@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series [kvm-unit-tests,GIT,PULL,01/13] s390x/Makefile: simplify Secure Execution boot image generation | expand

Commit Message

Nico Boehr April 24, 2024, 10:59 a.m. UTC
From: Nicholas Piggin <npiggin@gmail.com>

By the time we end up in arch_cmd_s390x() the global ACCEL variable
has already been processed and is passed to arch_cmd_s390x() as an
argument. We should use the local argument to achieve the correct
behavior and not rely on global variables.

Fix this by changing ACCEL to lower case.

Reported-by: shellcheck SC2153
Reviewed-by: Andrew Jones <andrew.jones@linux.dev>
Acked-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Link: https://lore.kernel.org/r/20240406122456.405139-2-npiggin@gmail.com
Message-ID: <20240406122456.405139-2-npiggin@gmail.com>
[frankja@linux.ibm.com: Improved commit message]
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
 scripts/s390x/func.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/scripts/s390x/func.bash b/scripts/s390x/func.bash
index 6c75e89a..fa47d019 100644
--- a/scripts/s390x/func.bash
+++ b/scripts/s390x/func.bash
@@ -21,7 +21,7 @@  function arch_cmd_s390x()
 	"$cmd" "$testname" "$groups" "$smp" "$kernel" "$opts" "$arch" "$check" "$accel" "$timeout"
 
 	# run PV test case
-	if [ "$ACCEL" = 'tcg' ] || grep -q "migration" <<< "$groups"; then
+	if [ "$accel" = 'tcg' ] || grep -q "migration" <<< "$groups"; then
 		return
 	fi
 	kernel=${kernel%.elf}.pv.bin