kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com
Subject: Re: [kvm-unit-tests PATCH] scripts/runtime: Replace "|&" with "2>&1 |"
Date: Fri, 31 Jul 2020 08:32:00 +0200	[thread overview]
Message-ID: <20200731063200.ylvid4qrtvyduagr@kamzik.brq.redhat.com> (raw)
In-Reply-To: <20200731060909.1163-1-thuth@redhat.com>

On Fri, Jul 31, 2020 at 08:09:09AM +0200, Thomas Huth wrote:
> The "|&" only works with newer versions of the bash. For compatibility
> with older versions, we should use "2>&1 |" instead.

Hi Thomas,

Which bash version are you targeting with this change?

I think it's time we pick a bash version that we want to support
(thoroughly test all the scripts with it) and then document it. As
part of the CI we should test with both that version and with the
latest released version (394d1421 ("run_migration: Implement our own
wait") is an example of why only testing with our supported version
wouldn't be sufficient, unless we required everyone to use that
version when running the tests, and I don't want to do that.)

> 
> 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
>

Anyway
 
Reviewed-by: Andrew Jones <drjones@redhat.com>


  reply	other threads:[~2020-07-31  6:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-31  6:09 [kvm-unit-tests PATCH] scripts/runtime: Replace "|&" with "2>&1 |" Thomas Huth
2020-07-31  6:32 ` Andrew Jones [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200731063200.ylvid4qrtvyduagr@kamzik.brq.redhat.com \
    --to=drjones@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).