From nobody Tue Feb 10 06:26:35 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.54 as permitted sender) client-ip=209.85.221.54; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f54.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.54 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1636122875; cv=none; d=zohomail.com; s=zohoarc; b=CWzNfHkUprll1XQYC7VKZxwwt0U6a+i/ZT5KX+Vma+N0XV+9edTGKzLgryK495kBFOGrf+jpcNPjp4aGae9+Dxhv58iSdUTIgtdSqAaPXNWAoD++Gi7nfy6s0Jo1CvSetjvArbFqotB0CTgDLI1EuA83oawh7thA2rbnPo2WgZ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1636122875; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=i7Uh9c2q7Auf6sUoXxHhubumuCyiIM9A6N1kq/ZvPUc=; b=NMpMtK0xy6Cqo01Xeg7iiXAv+7ALwAWktpP7wBRl5emFALZv034IFErzjmG2zGiBVn3slLMASwibHQr7EwDhDoL7SgMFDx5yUlczjg1OdmWg1zlf5pYyxZK5GE6lMAaf7MkQa2RY82P6XqMUS8SbFncsS6dYJSRbkANBmdCHXFc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.54 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mx.zohomail.com with SMTPS id 1636122875080372.55703820426356; Fri, 5 Nov 2021 07:34:35 -0700 (PDT) Received: by mail-wr1-f54.google.com with SMTP id u18so14054455wrg.5 for ; Fri, 05 Nov 2021 07:34:34 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (62.red-83-57-168.dynamicip.rima-tde.net. [83.57.168.62]) by smtp.gmail.com with ESMTPSA id y12sm8247266wrn.73.2021.11.05.07.34.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 07:34: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=i7Uh9c2q7Auf6sUoXxHhubumuCyiIM9A6N1kq/ZvPUc=; b=RjgYpLz1ECJBbk/R3IcUy20ge+TLwrOXuM9MsJ9VL/hLgRlYOXiLFU9eRNUQBrbRN8 nhH58Y012ECKzW/ShX0igg3bv6vzud7YyREEMImkoUCq6I7/Tymmag7hyQK42CHqq3mQ io9b1+/n/1AWcHkSePpYAIl//QJhIHa4kmTfWU/OqC/ijm6vrjaMRGMsw1EYUjBom+xn h6TahsHsuAWvAhkdj2+RuBoisAHZ60VlWAQymrAO6tCGHQ0eWaLobE+B7Pf7KWeRVmAp AUyC0L34v/lFlHMqAIlIcXuwVsHjezjgq5wjolfvNG06dfq2lazzz8afGp5CaWQzkivr dtcg== 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=i7Uh9c2q7Auf6sUoXxHhubumuCyiIM9A6N1kq/ZvPUc=; b=EmrhqFYfdqb4E/Xhy9eDd0VVlxw1NzIjLF8dp07FDDXlWkwRjZQazEGiBrGnQ5O0QQ wFwYtDTTuhksYEOozL2hHArtSeFtAllWjG4j1goa4onDDa/T6CmcjPsVJTijSu7XV1fc cG5BFBarHQI0IH7+436tTGPDHKZrahfsbmuCbsR02xDSwjJS3cb1PQB0QKIBW32M05I3 IPJGMCldkDtbNsyXEzcm8vnBQbmB22AiZcZm0400psyaxZHXMWD01hgVeC/L75wfTUFm +bBuiN5wCl5nDugOPaqaACor+6gzaDFKWKIWkJ2eoh7ohgmcV9UwdqNYJvIF9nWW9VRj Ehmw== X-Gm-Message-State: AOAM5339wDuxozt8+TNKK+i4H22uZGsYRbD7/6hNiR3xx+WcZvsegiN5 qw+Kz/SDlIaM7UI/8SGXIwANWH51KIs= X-Google-Smtp-Source: ABdhPJx0v3YjCbizjNybGbmfoNqxtboay6vtGmkNUmD2g+K0bCeDgd9H2Iwme3hohNfG/4oaExoamg== X-Received: by 2002:adf:c78d:: with SMTP id l13mr73169435wrg.134.1636122873419; Fri, 05 Nov 2021 07:34: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: Cleber Rosa , Wainer dos Santos Moschetta , Willian Rampazzo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v6 3/6] tests/acceptance: Introduce QemuUserTest base class Date: Fri, 5 Nov 2021 15:34:13 +0100 Message-Id: <20211105143416.148332-4-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211105143416.148332-1-f4bug@amsat.org> References: <20211105143416.148332-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: 1636122875832100001 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 Reviewed-by: Willian Rampazzo Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211102084232.2965062-4-f4bug@amsat.org> --- tests/avocado/avocado_qemu/__init__.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado= _qemu/__init__.py index 984c554e7d6..e46b3ecb89e 100644 --- a/tests/avocado/avocado_qemu/__init__.py +++ b/tests/avocado/avocado_qemu/__init__.py @@ -17,7 +17,7 @@ import uuid =20 import avocado -from avocado.utils import cloudinit, datadrainer, network, ssh, vmimage +from avocado.utils import cloudinit, datadrainer, network, process, ssh, v= mimage from avocado.utils.path import find_command =20 #: The QEMU build root directory. It may also be the source directory @@ -295,6 +295,23 @@ def tearDown(self): super().tearDown() =20 =20 +class QemuUserTest(QemuBaseTest): + """Facilitates user-mode emulation tests.""" + + def setUp(self): + self._ldpath =3D [] + super().setUp('qemu-') + + def add_ldpath(self, ldpath): + self._ldpath.append(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