kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH] scripts/runtime: Replace "|&" with "2>&1 |"
@ 2020-07-31  6:09 Thomas Huth
  2020-07-31  6:32 ` Andrew Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Huth @ 2020-07-31  6:09 UTC (permalink / raw)
  To: kvm; +Cc: pbonzini, drjones

The "|&" only works with newer versions of the bash. For compatibility
with older versions, we should use "2>&1 |" instead.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 scripts/runtime.bash | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/runtime.bash b/scripts/runtime.bash
index c88e246..35689a7 100644
--- a/scripts/runtime.bash
+++ b/scripts/runtime.bash
@@ -172,7 +172,7 @@ function run()
 # "arm/arm64: KVM: Remove 'config KVM_ARM_MAX_VCPUS'". So, at some
 # point when maintaining the while loop gets too tiresome, we can
 # just remove it...
-while $RUNTIME_arch_run _NO_FILE_4Uhere_ -smp $MAX_SMP \
-		|& grep -qi 'exceeds max CPUs'; do
+while $RUNTIME_arch_run _NO_FILE_4Uhere_ -smp $MAX_SMP 2>&1 \
+		| grep -qi 'exceeds max CPUs'; do
 	MAX_SMP=$((MAX_SMP >> 1))
 done
-- 
2.18.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-07-31  8:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-31  6:09 [kvm-unit-tests PATCH] scripts/runtime: Replace "|&" with "2>&1 |" Thomas Huth
2020-07-31  6:32 ` Andrew Jones
2020-07-31  7:13   ` Thomas Huth
2020-07-31  7:17     ` Paolo Bonzini
2020-07-31  7:45       ` Andrew Jones
2020-07-31  8:07         ` Thomas Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).