From patchwork Tue Dec 21 09:21:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 1571528 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=WSbw42Qe; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=kvm-ppc-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4JJ9v91JpJz9s1l for ; Tue, 21 Dec 2021 20:21:41 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234490AbhLUJVk (ORCPT ); Tue, 21 Dec 2021 04:21:40 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:22462 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232251AbhLUJVk (ORCPT ); Tue, 21 Dec 2021 04:21:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640078499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=E+nU5g3WvlXrnBIx5xzr54f9zPjEKnDM/lB43a3RtfA=; b=WSbw42QexBsyDtFfFXf61Wgj7/QxJyDughxpVWVWmdWrh1R8zJpgyJz2gZS74pc7TUOSUR 7pa3AML17wM4nCOF/IUkrcvHtte8fQG0PrzZO3PkEoH3WeRhMFQlFOPzK016mfbL4KBm/v VgBBbvXhddBh4mOtuGKaaz3aOSljfGA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-656-SvE9ufMBNNCTNRLW58Hm0g-1; Tue, 21 Dec 2021 04:21:36 -0500 X-MC-Unique: SvE9ufMBNNCTNRLW58Hm0g-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D32301006AA3; Tue, 21 Dec 2021 09:21:35 +0000 (UTC) Received: from thuth.com (dhcp-192-183.str.redhat.com [10.33.192.183]) by smtp.corp.redhat.com (Postfix) with ESMTP id AE8AD5BE0E; Tue, 21 Dec 2021 09:21:31 +0000 (UTC) From: Thomas Huth To: kvm@vger.kernel.org, Laurent Vivier , Andrew Jones , Paolo Bonzini Cc: kvm-ppc@vger.kernel.org, Eric Auger Subject: [kvm-unit-tests PATCH] scripts/arch-run: Mark migration tests as SKIP if ncat is not available Date: Tue, 21 Dec 2021 10:21:30 +0100 Message-Id: <20211221092130.444225-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org 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 Reviewed-by: Andrew Jones --- 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)