From nobody Tue Feb 10 15:45:13 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; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1615849737; cv=none; d=zohomail.com; s=zohoarc; b=YPtb3AQc+FELRzJq5dE/BxsioBNPyfZr/SEiz74vZCr5D3c9RRutAeolt3DwzwCtmC/c03e1iyzFON1Roqo74lp4eeTnTyM9Ty16wa8hXe4FOreu7P6AOqkmlvVoZ7K5MvmCrYSTPWXIc05SHmRWmx1VwxdYjTa5QlcF9YjlGt8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615849737; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LYhx91+2cSrSGuiAZO0E+KTXwLNRLCou9fW7dMGBBFM=; b=kmuTDCRvqt0C5gSPQyY38juhcAv/XhYA+5BZANX+QKU1Xu7WNN36Zmw8sSI/jLAXT3WbX69FCJt/03v65JHnd8io0nTK9/DYhmMtFqYQ5HTv/pYb6UfgBvmLYlWFPbEh84DpBFkpYEJz/IJ6quK93zpvoV2YZJr35+72WU/FF2c= 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; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mx.zohomail.com with SMTPS id 1615849737993809.9806338501567; Mon, 15 Mar 2021 16:08:57 -0700 (PDT) Received: by mail-wm1-f42.google.com with SMTP id g8so9082599wmd.4 for ; Mon, 15 Mar 2021 16:08:57 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (17.red-88-21-201.staticip.rima-tde.net. [88.21.201.17]) by smtp.gmail.com with ESMTPSA id c9sm20175456wrr.78.2021.03.15.16.08.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 16:08:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LYhx91+2cSrSGuiAZO0E+KTXwLNRLCou9fW7dMGBBFM=; b=uWa+zjPcEY+4WkLnLT/M9RfTMSvgDnBaM8KKyJVnU2+MsTEHjHQc3oipFtk9Rh2FES JDRxBLmAVkruXfBDvFyYnszDQXfBRlfvkwYp4p4a+n0T4KkuTzGdx/aHAo1k2qnHscE4 G5SsOYDJLz7MTg717LPAUkMG6/mYK+8qWSbAtP5rv+oYpfrb6lT4AVNbKaL2602Ts70B WHf3kyi3d7Y/gYtic6IwiOdGT3Z9VvG5XD8CR0gesnQXHNd6XloKOwbOcp+r1a1PZC7k flW5Z4AIMfVa5n2ZaSQvgoZP+NFoMSiUt7IeK2JvBoKKOcsfwKfFE0r+Dr/ONzI5E9lz 27bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=LYhx91+2cSrSGuiAZO0E+KTXwLNRLCou9fW7dMGBBFM=; b=Th+4kqiW2c1hEy2NRMEFe3oZXMVPeyIUuBd2XIC2nw9LRpE2TEtjZCmuBBVJcPjvVA nQqJfcYlzPtb2raqkuy4deFqVCH1uFe7lqynlOusSyvZK78DjuhJi827EJToy+2DbZqF J6zKdbAiAuedZFRJRCG2RL3Pdham06EmZ6XcmWH/kLmrcrSRhny2WnF3LtXYZxJmI+xX 6C4CWdmKPmx2O0mIjC0uPScS5cLNhAYhmEUHzWTOyGKyd0AuEV+sEmynYqHiAO/woqCA GOSp+KgGhJ81oIS2Y1sJumRyUcri7KBvoAVmpjdMtXI1DRXE34i5ft+lLxeH6pyycEb6 NV7A== X-Gm-Message-State: AOAM532us8U8s0EHPpaCHK6098KKUDcl45EKKMA0K/WckywCsGnSA1i5 NrFxGOIqtduuUeoqYBeGPHE= X-Google-Smtp-Source: ABdhPJyrH0oTTtqp/LXbCRoChXO34MT6RxjKJDnalIetwHnTkzPXP0Y8OVljKfjzZF6xAG7FC4QEjg== X-Received: by 2002:a7b:c399:: with SMTP id s25mr1755606wmj.124.1615849736276; Mon, 15 Mar 2021 16:08:56 -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 , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 3/5] tests/acceptance: Introduce QemuUserTest base class Date: Tue, 16 Mar 2021 00:08:36 +0100 Message-Id: <20210315230838.2973103-4-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210315230838.2973103-1-f4bug@amsat.org> References: <20210315230838.2973103-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) Similarly to the 'System' Test base class with methods for testing system emulation, the QemuUserTest class contains methods useful to test user-mode emulation. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Wainer dos Santos Moschetta --- tests/acceptance/avocado_qemu/__init__.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_qemu/__init__.py index 08b3fa1124f..b471bee66e0 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 vmimage from avocado.utils.path import find_command =20 @@ -256,6 +257,19 @@ def fetch_asset(self, name, find_only=3Dfind_only, cancel_on_missing=3Dcancel_on_missing) =20 +class QemuUserTest(QemuBaseTest): + def setUp(self): + self._ldpath =3D [] + super(QemuUserTest, self).setUp("qemu-%s") + + 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)) =20 class LinuxTest(Test): """Facilitates having a cloud-image Linux based available. --=20 2.26.2