From nobody Thu May 2 00:16:52 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1679397517; cv=none; d=zohomail.com; s=zohoarc; b=Yh05xiDLdg6ZcqC7CHZhrQWgZrNBwjuvYLnLEc5h92nzEqRb+461M3E//+RG276wAGr8u8K+BDXIJGKrxNphZjpYTPzmAjQGdsbclBaoGEIkfs1y+ij/G1m56kckdcYSbcwknNkZGIlwaENVEgvpCJa9HbeXZnGYu6wQMxuMPQ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1679397517; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=dtMdpGocr62ge5sh3wVlQKfA9cyOF99U8VoIMH9fQsk=; b=Lb9mAEsOgna8Dq4tcHg/ExKdlUaeUPI6CHyqU3mly9Pugzm0XFhNuJ3YdImvmzMJaylTxioi/YgT0jsuKBYWs3jaZYhpLDLB9qQAqEZ06ChB/LzRxVy+G7062SP52fnpVsVEIepc2kchxk382INZoYrMeVTeNQ+aTF9Nm74LkYQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1679397517434540.7009698789077; Tue, 21 Mar 2023 04:18:37 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: AK7set+Z+eQUYmgqln7LxTmF4GRkBIrSyX1vLrU6rLuhFVBEufJuBeNHBdBN1mA+dEmtyxjpTlLh2g== 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) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Elena Ufimtseva , Jagannathan Raman , John G Johnson , Cleber Rosa , =?UTF-8?q?Philippe=20Mathieu-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1679397519858100001 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=C3=A9e Cc: Elena Ufimtseva Cc: Jagannathan Raman Cc: John G Johnson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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') =20 + def require_multiprocess(self): + """ + Test for the presence of the x-pci-proxy-dev which is required + to support multiprocess. + """ + devhelp =3D 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 =3D tempfile.TemporaryDirectory(prefix=3D"qemu_") vm =3D QEMUMachine(self.qemu_bin, base_temp_dir=3Dself.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() =20 # Create socketpair to connect proxy and remote processes proxy_sock, remote_sock =3D socket.socketpair(socket.AF_UNIX, --=20 2.39.2