From nobody Tue Feb 10 20:48:23 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.49 as permitted sender) client-ip=209.85.128.49; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f49.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.49 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1632760295; cv=none; d=zohomail.com; s=zohoarc; b=eyGprRMy03Yuw4xNhMEtw7hlOQM9y7+Gj0RCtVyeU+2RJlFZAJ8B65vBPC12+KR3ClfjNUpn6yeSm0jIluG2XydC1r9dwKR/d93oWiwxSEZS7bYONG7fGpWjRt69by+VwZI5NKNUgSBLV45QgbSiOY0a/+bGtEFdNn6/j1eGuJQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632760295; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rrZcRAqwbX1CgOU4/ghYIXImscGfB+p01+/+JsHL8L4=; b=Tpy5FISIZXsUHnpi8MxPPj3rHbohjwbtawwC2etTrsCpr8MXYu6b2gnAzTVOC45206hvuYKLpHomEoqC9+gqh+WhAdca0kmkxJX4D9qoit83VGCp7wbw9CeMeRgk+lQwHHEbXMi6Y6RuRogjcUw1CXO+QnyDAzxglexZQbQGDhQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.49 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mx.zohomail.com with SMTPS id 1632760295040349.9433433096166; Mon, 27 Sep 2021 09:31:35 -0700 (PDT) Received: by mail-wm1-f49.google.com with SMTP id b192so1019096wmb.2 for ; Mon, 27 Sep 2021 09:31:34 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (118.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.118]) by smtp.gmail.com with ESMTPSA id t16sm691286wry.0.2021.09.27.09.31.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 09:31:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rrZcRAqwbX1CgOU4/ghYIXImscGfB+p01+/+JsHL8L4=; b=fs+6upgVoe/3ZOqqYgzLYXU3AzouMLtbaC8RNg1yGELCQ9F5cp412j8o7Ha2h97kFA r/2kAGriD6Gz81zn2XV5vzhTrtglR1m3muwOtaC/Sm5GC48pfX3sKU1vlS+J6O+h6G+W NE9/MsWQ1khI2t7jgkhNmTWd5o1QcrK93Gm9AxbNQKnbiV9SVAD0zdOX15paesEBnb17 9nx3dPeEuXmBc25Hxurn0+Bipk5l7uq8PNlodqvhLGkA1D9yOdcmF73ZdLnhQDQZqWbv 5F0tRezhvlxIbv28bKiXNV939Z3KsXANMjYghIfcmK/8H8viSiYYQzOTpqfeEM7kkmxt Of/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=rrZcRAqwbX1CgOU4/ghYIXImscGfB+p01+/+JsHL8L4=; b=47CGMn4yXChs4WXQ5/og4+/a2FW9Qn32pucWYXkFv/M8FoR8nK2mk2QIvEhsFE2LZ7 p5awTiTF1JdXuyq+0GMh3uFeFglRPF5Gg+/ZAO5n8iPbmhkDhLhkXBoYc8Out7egHHAi MptPUu1NAWH9jZHL7zNvb1f1Upaz0t7RB267YDFsG7HE0IgfjVgvK8D1ezPH4e7G/4Qr bPuFTvDnilyLqfYxNRJKTPpA3vzy6mzJGbYLTCMeV9A1yrIp28aSkhtm3ArXEmMj8EJf 7z4pu+eHsTGUBOOB93A5rIp7SPOPAfXSkICP5oCMa9120LQJZ3PhkkGQ1XVCr2jToLiq 5PtQ== X-Gm-Message-State: AOAM531AGvJ4mCna4Agwa1JKt9Z+hoUl4ZhO/aevS2CjAPgKSqEgm8oa M3eO52XqwlVZ2xX7sX4nND4= X-Google-Smtp-Source: ABdhPJxOLc9mOMQcnGywAfc/RxVO1EwPe5c8xjxKFiJ3u0/3RLS290LuyH8Kd/rIwaYczwRy3+U4yA== X-Received: by 2002:a05:600c:2282:: with SMTP id 2mr3018269wmf.47.1632760293268; Mon, 27 Sep 2021 09:31:33 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Willian Rampazzo , Laurent Vivier , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Warner Losh , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 3/6] tests/acceptance: Introduce QemuUserTest base class Date: Mon, 27 Sep 2021 18:31:13 +0200 Message-Id: <20210927163116.1998349-4-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210927163116.1998349-1-f4bug@amsat.org> References: <20210927163116.1998349-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1632760296176100001 Similarly to the 'System' Test base class with methods for testing system emulation, the QemuUserTest class contains methods useful to test user-mode emulation. Reviewed-by: Wainer dos Santos Moschetta Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Willian Rampazzo --- tests/acceptance/avocado_qemu/__init__.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_qemu/__init__.py index 2b9b5dd27fe..2f59e171e49 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -20,6 +20,7 @@ from avocado.utils import cloudinit from avocado.utils import datadrainer from avocado.utils import network +from avocado.utils import process from avocado.utils import ssh from avocado.utils import vmimage from avocado.utils.path import find_command @@ -300,6 +301,23 @@ def tearDown(self): self._sd =3D None =20 =20 +class QemuUserTest(QemuBaseTest): + """Facilitates user-mode emulation tests.""" + + def setUp(self): + self._ldpath =3D [] + super(QemuUserTest, self).setUp('qemu-') + + def add_ldpath(self, ldpath): + self._ldpath +=3D [os.path.abspath(ldpath)] + + def run(self, bin_path, args=3D[]): + qemu_args =3D " ".join(["-L %s" % ldpath for ldpath in self._ldpat= h]) + bin_args =3D " ".join(args) + return process.run("%s %s %s %s" % (self.qemu_bin, qemu_args, + bin_path, bin_args)) + + class LinuxSSHMixIn: """Contains utility methods for interacting with a guest via SSH.""" =20 --=20 2.31.1