From nobody Tue Feb 10 06:27:14 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.42 as permitted sender) client-ip=209.85.128.42; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f42.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.42 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1635842570; cv=none; d=zohomail.com; s=zohoarc; b=WVZW9nUvZ7kOVCXyUzrBBRGpE+HyDgsH5ghO8cpRkf2iQETQL/V+mh5CsdbsZyH5DCI6IlxR24HDzMjMQYaosS8fZyT9CCGO659nRF/5axQ071lDzocTBqRwSYpncCpsiGAFlxI2BULsdbW+MFTQT893Q/WG/OL7/YDWBi+Kg4E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1635842570; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Uvn3v2nfcIU2IgJuyBks/Pc2wix5ff6QgJODlQYTPKo=; b=Lkc3WdIh4r0iXdjDrc6CUwc0MH/tnP497+vYOlZ9JpyrH2bV8wn/q4jdJknNTpghQlQnc7FsyD7Nj5FOXXW1shW1rZbbYqp1gY0a5Qbf6lbaSNC8l2wyDoje4MjFoR3SHlgqCKCPmI9X1YpOaeN2gmfjPesOeBuaXo5TnZoI+1o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.42 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mx.zohomail.com with SMTPS id 1635842570711801.0553328982209; Tue, 2 Nov 2021 01:42:50 -0700 (PDT) Received: by mail-wm1-f42.google.com with SMTP id j128-20020a1c2386000000b003301a98dd62so1166560wmj.5 for ; Tue, 02 Nov 2021 01:42:50 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.. (62.red-83-57-168.dynamicip.rima-tde.net. [83.57.168.62]) by smtp.gmail.com with ESMTPSA id f3sm1735550wmb.12.2021.11.02.01.42.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Nov 2021 01:42:48 -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=Uvn3v2nfcIU2IgJuyBks/Pc2wix5ff6QgJODlQYTPKo=; b=KK2WQ/WsM2D1X3nNs/srpk1H/OWHNnvAVoq8u5KnJuM9DF6fTSaP5lnV9ByksDRn/C nO/q2zuJWKa1a5po1hBgA+p9VwrBtaVno7c1m6tAunhLeuS/7ova9ftQ0cY2J6tnalS8 2fMh/thQ3zQXzDYVl+l+2pUymibC2CZmBfc7i/MtwOYTXkypUk2TDiApkhyhFf6pjTpU nH99Ta6wtzoqSQmbF9BXLGwgvzNUPnD+bFgGeQ6feGCoDJbsb9RK8c2ep1/oBRNBezz9 I2J7Gwhyw4uPOTSYmuKYUehIooObDSoWH+dMcpXKXRgcRCsZpgAqm4JVwK3EL6FBYi2S aw6w== 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=Uvn3v2nfcIU2IgJuyBks/Pc2wix5ff6QgJODlQYTPKo=; b=nYgGTBm+/Gra4iwL6JVA+U6Rs7F5I9rGvO9FUCDOM3aO3QXg3Ha5y+InuoQPAt+/C9 rDEPlnmWcu6+L4/GyGYJdlKf6QvZBO88UGNGRcKowsyYtq7IhpLqt8dvrfjeU9ZYC9ZK 2KVNx0Lv76EGBhMrU5xk1NiEyfKZW/giHNThJe1o8PnNsc38q8G03mKUR/+sSW8n4Uf4 M0sCAyw8zP9XBat2BSOGIlCrLI/1ZhMY7rZx1oCKfUCCTB0HeeII4LbI58tyxYidqf6e W/dTtcvHTt/M7+jH4kePgG73C0cWP6F/yjbxxlZc3k4yAJYNZS48ME2yXBoW+3acylvC bvqg== X-Gm-Message-State: AOAM532v3nwc2Sgx+KjyzM76KP61MDYEYS9ClOhLaXLvfLjvy9gpxzz7 VDHASNNrQ5fNHU4pEZM8K3E= X-Google-Smtp-Source: ABdhPJyDl7tPDpqZZ25sRVjNzAU5465nweEN/DRYY3ihABc2forb9D0mnPHZ2834uACzeg7cCkmidQ== X-Received: by 2002:a7b:cbd1:: with SMTP id n17mr5284354wmi.145.1635842568958; Tue, 02 Nov 2021 01:42:48 -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 , Warner Losh , Cleber Rosa , Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v5 3/6] tests/acceptance: Introduce QemuUserTest base class Date: Tue, 2 Nov 2021 09:42:29 +0100 Message-Id: <20211102084232.2965062-4-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211102084232.2965062-1-f4bug@amsat.org> References: <20211102084232.2965062-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: 1635842572741100001 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 --- v5: Use PEP3135, use self._ldpath.append() method (Willian) --- tests/acceptance/avocado_qemu/__init__.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_qemu/__init__.py index 9b2ea3b248a..85bb3519969 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/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