From nobody Wed Nov 19 00:14:29 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.52 as permitted sender) client-ip=209.85.128.52; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f52.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.52 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1613325756; cv=none; d=zohomail.com; s=zohoarc; b=F/CTSfrwbRXUh4RVso7jhwfmU+vBS/feAXUUOl9mUYrY8r1ulHftYJLjX5oEFAz+NgrgdJgJzt1Md6jFQTG3EFzHqkVCTgAainiUqvk/9THUCkGo+6JVTy84ePTRqRWDVsN3D7GkmIH13Z+CTNv+awUylTjsCntExJ6A2Z8+eSI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613325756; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+cZfbBSXi4Z9o9LLnkjECQmd20GFE8Z07Hn7lNqThho=; b=i+ipr6FbBQARFHmxyd/s40YL/4LMGWFk6jnvxkwy+sIQ7q0H/4omVnmBgj2HQFBLWAWLG77a0PjP+qEQMqMhW6D+ft0fAt3JEZ+OLY8j2MZQPh6VjckELvL7GKUyjmwltAj3fYFRHMEB0cm3XflqAQi39M/iNpknPKyPP4JCUNY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.52 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mx.zohomail.com with SMTPS id 1613325756593203.87282947778647; Sun, 14 Feb 2021 10:02:36 -0800 (PST) Received: by mail-wm1-f52.google.com with SMTP id n10so5845410wmq.0 for ; Sun, 14 Feb 2021 10:02:36 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id n186sm4728191wmn.22.2021.02.14.10.02.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Feb 2021 10:02:34 -0800 (PST) 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=+cZfbBSXi4Z9o9LLnkjECQmd20GFE8Z07Hn7lNqThho=; b=KI59o3Gjm1IkC0lZcR7O24Aa/dmZfbhYzKvR02FUgoF67vhPjH42Sn5xnZxc28pLVn Ce5f/GyHBXRJMkt5QamBJQS4O4nhu5wOYFC/T0SHHJiyQmsI9CddizSz9mhuNjFqFu0d 78zOKxxLqDQhzSGLCcuS+RZPZsR0KL4SZdcC+E6J0O+gMH0HjOK2HAYssEauzNKWWKKd fn2g4oADG8fBxfFNFso2I++2hf/BIVH/33k11+zgbm2X6BXfdm4/9spZhJSurFH2wlAP Il5Cn+ice6jIN8tQR2wk65vWw142kNKS+SSWvT+o7PIypAMnhLRqDBWOHhUAhFknQgOI zVsQ== 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=+cZfbBSXi4Z9o9LLnkjECQmd20GFE8Z07Hn7lNqThho=; b=i8a52vXvAdR+6wg4euMnwOI8YsocjDjFmzWxrPxfuXiccAONSXTu6g5RG7AZIQWVyo n2+7zLjfLFwzX8NrD7O9xRb7fb4trXmfhpPBXMFr/BHhARhJ5+K8UvzhffCvW+9UGI/T l1eJb9mXgUUYZ48Lsbq9XLKwczQ5h8GY4Ney8yHGDKO78Kf0MBtWE8s1U0o0I9F4XoU9 SOaA9lGDHdRp4LzB7a7zxrvGHG0PsEKs4aDNT2Yfi1JS5Aj+mC9SyIduB/MxpOIhGAnJ b9DsstlZOei9Pu+z8Gv0HFyTWwpcq44StMxboqB1MHLVUKgRJs1of2aFNIZgnGBVQR8B fpUw== X-Gm-Message-State: AOAM5303o2mqy8rME7xpngkX9dmIMto2J+djHTJFtYK9azMQ5vWgfIdW 4Ky56ak9lZdB5VRcvCVTS+Q= X-Google-Smtp-Source: ABdhPJxYo+adgBsrVCRP0mlymx98Z/ToQ3zYqO/gpkNAvvyWXjSwucxpep3anJ38dLYbhFgN9Hh7Ng== X-Received: by 2002:a1c:3804:: with SMTP id f4mr8843697wma.115.1613325755252; Sun, 14 Feb 2021 10:02:35 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Fredrik Noring , Laurent Vivier , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Maciej W. Rozycki" , Thomas Huth , Aurelien Jarno , Richard Henderson , Aleksandar Rikalo , Cleber Rosa , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta Subject: [RFC PATCH 40/42] tests/acceptance: Introduce QemuUserTest base class Date: Sun, 14 Feb 2021 18:59:10 +0100 Message-Id: <20210214175912.732946-41-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210214175912.732946-1-f4bug@amsat.org> References: <20210214175912.732946-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 --- tests/acceptance/avocado_qemu/__init__.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_qemu/__init__.py index e0067abca61..a293d228140 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -15,6 +15,7 @@ import tempfile =20 import avocado +from avocado.utils import process =20 #: The QEMU build root directory. It may also be the source directory #: if building from the source dir, but it's safer to use BUILD_DIR for @@ -211,3 +212,17 @@ def tearDown(self): for vm in self._vms.values(): vm.shutdown() self._sd =3D None + +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 2.26.2