[PATCH] perf: fix test_export with SHELL=zsh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Unlike other shells, zsh doesn't do word-splitting on variables.  This
is documented in https://zsh.sourceforge.io/FAQ/zshfaq03.html#31.  That
breaks the perf function test_export because it uses a space-separated
variable as a poor man's array, and as a consequence p0000 fails with
"not ok 3 - test_export works".  Pass the value through an unquoted
command substitution to force word-splitting even in zsh.

Signed-off-by: René Scharfe <l.s.r@xxxxxx>
---
 t/perf/perf-lib.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh
index f5ed092ee5..f74cfd35d6 100644
--- a/t/perf/perf-lib.sh
+++ b/t/perf/perf-lib.sh
@@ -165,7 +165,7 @@ test_export () {
 '"$1"'
 ret=$?
 needles=
-for v in $test_export_
+for v in $(echo "$test_export_")
 do
 	needles="$needles;s/^$v=/export $v=/p"
 done
--
2.33.0




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux