KVM Archive on lore.kernel.org
 help / color / 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	[flat|nested] 6+ messages in thread

end of thread, back to index

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

KVM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kvm/0 kvm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kvm kvm/ https://lore.kernel.org/kvm \
		kvm@vger.kernel.org
	public-inbox-index kvm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.kvm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git