qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
	"Akihiko Odaki" <akihiko.odaki@daynix.com>,
	"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: Re: [PATCH 2/2] tests/functional: Allow running TCG plugins tests on non-Linux/BSD hosts
Date: Mon, 24 Feb 2025 09:56:03 +0000	[thread overview]
Message-ID: <Z7xCM50MLESBdLs5@redhat.com> (raw)
In-Reply-To: <20250219192340.92240-3-philmd@linaro.org>

On Wed, Feb 19, 2025 at 08:23:40PM +0100, Philippe Mathieu-Daudé wrote:
> 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}'
> +

IMHO this should be on the QemuBaseTest class with all the other similar
path file helpers, since in the long run plugins are liable to be used
for more than just this one test program.

>      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
> 

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  parent reply	other threads:[~2025-02-24  9:57 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 ` [PATCH 2/2] tests/functional: Allow running TCG plugins tests on non-Linux/BSD hosts Philippe Mathieu-Daudé
2025-02-19 19:29   ` 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é [this message]
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=Z7xCM50MLESBdLs5@redhat.com \
    --to=berrange@redhat.com \
    --cc=akihiko.odaki@daynix.com \
    --cc=alex.bennee@linaro.org \
    --cc=erdnaxe@crans.org \
    --cc=luoyonggang@gmail.com \
    --cc=ma.mandourr@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --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).