From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
"Akihiko Odaki" <akihiko.odaki@daynix.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Mahmoud Mandour" <ma.mandourr@gmail.com>,
"Stefan Weil" <sw@weilnetz.de>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Alexandre Iooss" <erdnaxe@crans.org>,
"Yonggang Luo" <luoyonggang@gmail.com>
Subject: [PATCH 2/2] tests/functional: Allow running TCG plugins tests on non-Linux/BSD hosts
Date: Wed, 19 Feb 2025 20:23:40 +0100 [thread overview]
Message-ID: <20250219192340.92240-3-philmd@linaro.org> (raw)
In-Reply-To: <20250219192340.92240-1-philmd@linaro.org>
Not all platforms use the '.so' suffix for shared libraries,
which is how plugins are built. Use the recently introduced
dso_suffix() helper to get the proper host suffix.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2804
Suggested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
tests/functional/test_aarch64_tcg_plugins.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/tests/functional/test_aarch64_tcg_plugins.py b/tests/functional/test_aarch64_tcg_plugins.py
index 7e8beacc833..306e46c7972 100755
--- a/tests/functional/test_aarch64_tcg_plugins.py
+++ b/tests/functional/test_aarch64_tcg_plugins.py
@@ -16,7 +16,7 @@
import re
from qemu.machine.machine import VMLaunchFailure
-from qemu_test import LinuxKernelTest, Asset
+from qemu_test import LinuxKernelTest, Asset, dso_suffix
class PluginKernelBase(LinuxKernelTest):
@@ -62,6 +62,10 @@ class PluginKernelNormal(PluginKernelBase):
('https://storage.tuxboot.com/20230331/arm64/Image'),
'ce95a7101a5fecebe0fe630deee6bd97b32ba41bc8754090e9ad8961ea8674c7')
+ def plugin_file(self, plugin_name):
+ suffix = dso_suffix()
+ return f'tests/tcg/plugins/{plugin_name}.{suffix}'
+
def test_aarch64_virt_insn(self):
self.set_machine('virt')
self.cpu='cortex-a53'
@@ -74,7 +78,7 @@ def test_aarch64_virt_insn(self):
suffix=".log")
self.run_vm(kernel_path, kernel_command_line,
- "tests/tcg/plugins/libinsn.so", plugin_log.name,
+ self.plugin_file('libinsn'), plugin_log.name,
console_pattern)
with plugin_log as lf, \
@@ -100,7 +104,7 @@ def test_aarch64_virt_insn_icount(self):
suffix=".log")
self.run_vm(kernel_path, kernel_command_line,
- "tests/tcg/plugins/libinsn.so", plugin_log.name,
+ self.plugin_file('libinsn'), plugin_log.name,
console_pattern,
args=('-icount', 'shift=1'))
--
2.47.1
next prev parent reply other threads:[~2025-02-19 19:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-19 19:23 [PATCH 0/2] tests/functional: Allow running TCG plugins tests on macOS Philippe Mathieu-Daudé
2025-02-19 19:23 ` [PATCH 1/2] tests/functional: Introduce the dso_suffix() helper Philippe Mathieu-Daudé
2025-02-19 19:28 ` Pierrick Bouvier
2025-02-20 5:59 ` Thomas Huth
2025-02-19 19:23 ` Philippe Mathieu-Daudé [this message]
2025-02-19 19:29 ` [PATCH 2/2] tests/functional: Allow running TCG plugins tests on non-Linux/BSD hosts Pierrick Bouvier
2025-02-20 6:02 ` Thomas Huth
2025-02-20 7:06 ` Stefan Weil via
2025-02-24 9:56 ` Daniel P. Berrangé
2025-02-19 20:30 ` [PATCH 0/2] tests/functional: Allow running TCG plugins tests on macOS Pierrick Bouvier
2025-02-19 21:19 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250219192340.92240-3-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=akihiko.odaki@daynix.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=erdnaxe@crans.org \
--cc=luoyonggang@gmail.com \
--cc=ma.mandourr@gmail.com \
--cc=pbonzini@redhat.com \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).