From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Date: Tue, 18 Jan 2022 14:24:40 +0000 Subject: Re: [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available Message-Id: <743735a5-e9fb-1ae8-27d9-048d35148a38@redhat.com> List-Id: References: <20211221092130.444225-1-thuth@redhat.com> In-Reply-To: <20211221092130.444225-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Thomas Huth , kvm@vger.kernel.org, Laurent Vivier , Andrew Jones Cc: kvm-ppc@vger.kernel.org, Eric Auger On 12/21/21 10:21, Thomas Huth wrote: > Instead of failing the tests, we should rather skip them if ncat is > not available. > While we're at it, also mention ncat in the README.md file as a > requirement for the migration tests. > > Resolves: https://gitlab.com/kvm-unit-tests/kvm-unit-tests/-/issues/4 > Signed-off-by: Thomas Huth > --- > README.md | 4 ++++ > scripts/arch-run.bash | 2 +- > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/README.md b/README.md > index 6e6a9d0..a82da56 100644 > --- a/README.md > +++ b/README.md > @@ -54,6 +54,10 @@ ACCEL=name environment variable: > > ACCEL=kvm ./x86-run ./x86/msr.flat > > +For running tests that involve migration from one QEMU instance to another > +you also need to have the "ncat" binary (from the nmap.org project) installed, > +otherwise the related tests will be skipped. > + > # Tests configuration file > > The test case may need specific runtime configurations, for > diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash > index 43da998..cd92ed9 100644 > --- a/scripts/arch-run.bash > +++ b/scripts/arch-run.bash > @@ -108,7 +108,7 @@ run_migration () > { > if ! command -v ncat >/dev/null 2>&1; then > echo "${FUNCNAME[0]} needs ncat (netcat)" >&2 > - return 2 > + return 77 > fi > > migsock=$(mktemp -u -t mig-helper-socket.XXXXXXXXXX) Queued, thanks. Paolo