kvm-ppc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available
@ 2021-12-21  9:21 Thomas Huth
  2021-12-21  9:58 ` Paolo Bonzini
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Thomas Huth @ 2021-12-21  9:21 UTC (permalink / raw)
  To: kvm, Laurent Vivier, Andrew Jones, Paolo Bonzini; +Cc: kvm-ppc, Eric Auger

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 <thuth@redhat.com>
---
 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)
-- 
2.27.0

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

end of thread, other threads:[~2022-01-18 14:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-21  9:21 [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available Thomas Huth
2021-12-21  9:58 ` Paolo Bonzini
2021-12-21 10:12   ` Thomas Huth
2021-12-21 14:48     ` Eric Auger
2021-12-21 17:25     ` Paolo Bonzini
2021-12-23 15:46       ` Andrew Jones
2021-12-27 19:29       ` Thomas Huth
2021-12-23 15:50 ` Andrew Jones
2022-01-18 14:24 ` Paolo Bonzini

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