From patchwork Tue Mar 21 11:17:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 665544 Delivered-To: patch@linaro.org Received: by 2002:a5d:5602:0:0:0:0:0 with SMTP id l2csp1579204wrv; Tue, 21 Mar 2023 04:18:37 -0700 (PDT) X-Google-Smtp-Source: AK7set9deI/uUbSwsiEvyCuzCeL1ebjzQNn4hdGrGdzP7tM/YVINFBdEuPI0+PFVxXpahlnO7LlU X-Received: by 2002:a05:6214:501a:b0:5c6:cd00:aaa1 with SMTP id jo26-20020a056214501a00b005c6cd00aaa1mr3561285qvb.39.1679397516906; Tue, 21 Mar 2023 04:18:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679397516; cv=none; d=google.com; s=arc-20160816; b=jkNN/G42hfGFZZlERSzFmFImFegn9tGxTxqxverIMfOkTnp3ad5xWBDDy3qeh5gkCu +1Zs7cT2+mzW+2eQxrtG7w5sU5C+fUou4A0/ZeVcj+27Ou6uFCfM8AClTYhSjjlldfRa fSxt5J3rmKiXi2qjcm0EmhLRqV7RlB5jo9BVWy3zlHGO5VHJNHlrJkPoiwi5oLvd1Fn/ HiYAy5WPjzC+3eX4pSUElkNLO7I5g3Ov9NJEW98P9f6xC7+W1u6YCY+DGp6L/KhN/m2Y 5j2XjnnMqbZ7an7424PLl7n3JOwOGLJ90dqpyZuGhkNexmnX4vJSvp3iUD1RmlIYEap1 Je/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=dtMdpGocr62ge5sh3wVlQKfA9cyOF99U8VoIMH9fQsk=; b=Im7gqH6Qjcs1D3/ef5aJ1HtxSR+9VfKGmiGdFhFR9cwBZgS8tBCY5TDAzQaYIN/7RN TUZDYjZd4Q2Dj0eIVEyWAVf4QmmgExpEklR8TUpOG2zWzVYWgF95yKaKDeYnTmrHeUnH eRwY2A04G6W9Gay+Ae/AQrQA2MnosBXOuZDZQqOMN1iiaPwwj2NAT4gBwLgqb/CU/qNb el29bN939MBFgzW8YHkilJwTWjlEo4L9trQnr/lShMZ6YL15gCArbwVpqMZ/oZI70hFB nLt/jDVjJdzUhS6g1VRpuS8z5LB6no54BTVe/0gNXersxObymN6ef/Gza4x9Lnnj9yz1 8bVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ALStwZu+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k9-20020a0cfa49000000b005a3b301ac6esi8060263qvo.403.2023.03.21.04.18.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Mar 2023 04:18:36 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ALStwZu+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pea0A-0006Rk-5O; Tue, 21 Mar 2023 07:18:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pea08-0006RV-BM for qemu-devel@nongnu.org; Tue, 21 Mar 2023 07:18:00 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pea06-0002Uf-JD for qemu-devel@nongnu.org; Tue, 21 Mar 2023 07:17:59 -0400 Received: by mail-wr1-x42d.google.com with SMTP id m2so13253859wrh.6 for ; Tue, 21 Mar 2023 04:17:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679397476; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=dtMdpGocr62ge5sh3wVlQKfA9cyOF99U8VoIMH9fQsk=; b=ALStwZu+KZOp2yoQ51qjkjlVPwzpJt7D4zyWIHIvr6PachMCE9mw/N7wTzqe4NjbQK rJv8HkKZHIDCVHekHNFRCAlOCY2Pm76mDsonItc5OoPXlLBRJyVp8VDip1LMrxVeg460 H5RN1lVDN6V5ZHLPb7BgQiAfuQjnSA/PZYcWq7KEVf9jGzKjSfCbwkWG5ffK3HOpusgo 57Dzg0+RnBWpyU5kSAGzLoFSM7h/CAEfCE2hPwJiTcFHRgzSVPGrfWCL12SGo9tdItgQ nF6AuWnb+LrNBmbvREXKn09oTJyZZXLxcbIXQN6uvOSXzxqdvE5nSODaBjLtaomPBQXs /CmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679397476; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dtMdpGocr62ge5sh3wVlQKfA9cyOF99U8VoIMH9fQsk=; b=KISk+qmiDtX2g3kx13O1cP1Vq/tJQyHCyHuAPyv9tYwNJ3rc/V2lpolSP/ryL8jEld nAo5G7dgEsVWFeqGAKZwyvE1i3hEmqpbb+kgKJQ0n7o05L3mWqrHDtjlFdF/uBl91cuO rUinqZmMsmWrbiYDgEHwgNKOcikW+do5l0enCdZ1OaOOhtLcOExQApce7Dt6JkBB6vSe 23a9607ALEsnu0pJCrRTCCWO+1ya2G0hrA5/+Qtz9dC/tiEDO/NRao+qn+1g4DLWLSmi 68LdPAPelPy3BRFFlQMNrHVIOyhuoka8hcz6Jg8I7ppyFrqc7PVvVQrYSS61vFV7wI4B Zw0g== X-Gm-Message-State: AO0yUKWLjZCYaj2eP+FW+GM4M31O3yq2bwUDLNf5KL0G8D16JL7GwlFF VWk04twEJdzkauCKJKnfGRQ/7Q== X-Received: by 2002:a5d:654a:0:b0:2c7:1a86:aecd with SMTP id z10-20020a5d654a000000b002c71a86aecdmr1908802wrv.2.1679397476592; Tue, 21 Mar 2023 04:17:56 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id e8-20020adffc48000000b002c8476dde7asm11028605wrs.114.2023.03.21.04.17.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 04:17:56 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D5CC51FFB7; Tue, 21 Mar 2023 11:17:55 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Elena Ufimtseva , Jagannathan Raman , John G Johnson , Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [RFC PATCH] tests/avocado: probe for multi-process support before running test Date: Tue, 21 Mar 2023 11:17:52 +0000 Message-Id: <20230321111752.2681128-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org A recent attempt to let avocado run more tests on the CentOS stream build failed because there was no gating on the multiprocess feature. Like missing accelerators avocado should gracefully skip when the feature is not enabled. In this case we use the existence of the proxy device as a proxy for multi-process support. Signed-off-by: Alex Bennée Cc: Elena Ufimtseva Cc: Jagannathan Raman Cc: John G Johnson Reviewed-by: Philippe Mathieu-Daudé --- tests/avocado/avocado_qemu/__init__.py | 10 ++++++++++ tests/avocado/multiprocess.py | 1 + 2 files changed, 11 insertions(+) diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado_qemu/__init__.py index a313e88c07..cb71f50db9 100644 --- a/tests/avocado/avocado_qemu/__init__.py +++ b/tests/avocado/avocado_qemu/__init__.py @@ -309,6 +309,16 @@ def require_netdev(self, netdevname): if netdevhelp.find('\n' + netdevname + '\n') < 0: self.cancel('no support for user networking') + def require_multiprocess(self): + """ + Test for the presence of the x-pci-proxy-dev which is required + to support multiprocess. + """ + devhelp = run_cmd([self.qemu_bin, + '-M', 'none', '-device', 'help'])[0]; + if devhelp.find('x-pci-proxy-dev') < 0: + self.cancel('no support for multiprocess device emulation') + def _new_vm(self, name, *args): self._sd = tempfile.TemporaryDirectory(prefix="qemu_") vm = QEMUMachine(self.qemu_bin, base_temp_dir=self.workdir, diff --git a/tests/avocado/multiprocess.py b/tests/avocado/multiprocess.py index 80a3b8f442..9112a4cacc 100644 --- a/tests/avocado/multiprocess.py +++ b/tests/avocado/multiprocess.py @@ -22,6 +22,7 @@ def do_test(self, kernel_url, initrd_url, kernel_command_line, machine_type): """Main test method""" self.require_accelerator('kvm') + self.require_multiprocess() # Create socketpair to connect proxy and remote processes proxy_sock, remote_sock = socket.socketpair(socket.AF_UNIX,