Hi Philippe,

On 2/19/25 11:23, Philippe Mathieu-Daudé wrote:
Pierrick kindly helped me to resolve this issue which ended
being trivial (to him!). Not tested on Windows so far.

I'm still having some meson dependency problem, even on Linux:

   $ make check-functional-aarch64
   ...
   Traceback (most recent call last):
     File "python/qemu/qmp/protocol.py", line 834, in _bh_close_stream
       await wait_closed(self._writer)
     File "python/qemu/qmp/util.py", line 130, in wait_closed
       await writer.wait_closed()
     File "/usr/lib/python3.10/asyncio/streams.py", line 343, in wait_closed
       await self._protocol._get_close_waiter(self)
     File "/usr/lib/python3.10/asyncio/selector_events.py", line 862, in 
_read_ready__data_received
       data = self._sock.recv(self.max_size)
   ConnectionResetError: [Errno 104] Connection reset by peer

   The above exception was the direct cause of the following exception:

   Traceback (most recent call last):
     File "python/qemu/machine/machine.py", line 448, in launch
       self._launch()
     File "python/qemu/machine/machine.py", line 497, in _launch
       self._post_launch()
     File "python/qemu/machine/machine.py", line 381, in _post_launch
       self._qmp.connect()
     File "python/qemu/qmp/legacy.py", line 153, in connect
       self._sync(
     File "python/qemu/qmp/legacy.py", line 102, in _sync
       return self._aloop.run_until_complete(
     File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in 
run_until_complete
       return future.result()
     File "/usr/lib/python3.10/asyncio/tasks.py", line 408, in wait_for
       return await fut
     File "python/qemu/qmp/protocol.py", line 382, in connect
       await self._session_guard(
     File "python/qemu/qmp/protocol.py", line 456, in _session_guard
       raise ConnectError(emsg, err) from err
   qemu.qmp.protocol.ConnectError: Failed to establish session: [Errno 104] 
Connection reset by peer

   The above exception was the direct cause of the following exception:

   Traceback (most recent call last):
     File "tests/functional/test_aarch64_tcg_plugins.py", line 80, in 
test_aarch64_virt_insn
       self.run_vm(kernel_path, kernel_command_line,
     File "tests/functional/test_aarch64_tcg_plugins.py", line 52, in run_vm
       raise excp
     File "tests/functional/test_aarch64_tcg_plugins.py", line 46, in run_vm
       vm.launch()
     File "python/qemu/machine/machine.py", line 461, in launch
       raise VMLaunchFailure(
   qemu.machine.machine.VMLaunchFailure: ConnectError: Failed to establish 
session: [Errno 104] Connection reset by peer
       Exit code: 1
       Command: build/plugins/qemu-system-aarch64 -display none -vga none 
-chardev socket,id=mon,fd=6 -mon chardev=mon,mode=control -machine virt 
-chardev socket,id=console,fd=11 -serial chardev:console -cpu cortex-a53 
-kernel 
/home/philippe.mathieu-daude/.cache/qemu/download/ce95a7101a5fecebe0fe630deee6bd97b32ba41bc8754090e9ad8961ea8674c7
 -append printk.time=1 panic=-1 console=ttyAMA0 -plugin 
tests/tcg/plugins/libinsn.so -d plugin -D /tmp/plugini36uailv.log -net none 
-no-reboot
       Output: qemu-system-aarch64: Could not load plugin 
tests/tcg/plugins/libinsn.so: tests/tcg/plugins/libinsn.so: cannot open shared 
object file: No such file or directory
   make[1]: *** [Makefile.mtest:26: do-meson-check] Error 1

I don't mind much building the plugins manually:

   $ make tests/tcg/plugins/libinsn.so
   [1/2] Compiling C object tests/tcg/plugins/libinsn.so.p/insn.c.o
   [2/2] Linking target tests/tcg/plugins/libinsn.so


Meson tests dependency is missing for plugins, so we need to add it.

By running: make check-functional-aarch64 V=1, you can see it's only building qemu-img, qemu-system and roms files.

You can integrate this patch in your series:

commit a375e9b560685bf4ccd6332cc23ce6850ec2fbbe
Author: Pierrick Bouvier <[email protected]>
Date:   Wed Feb 19 12:26:53 2025 -0800

    plugins: add explicit dependency in functional tests

    ./tests/functional/test_aarch64_tcg_plugins.py needs to have plugin
    libinsn built. However, it's not listed as a dependency, so meson can't
    know it needs to be built.

    Thus, we keep track of all plugins, and add them as an explicit
    dependency.

    Signed-off-by: Pierrick Bouvier <[email protected]>

diff --git a/meson.build b/meson.build
index 18b40a21a5a..80b9c8edd71 100644
--- a/meson.build
+++ b/meson.build
@@ -3658,6 +3658,7 @@ qtest_module_ss = ss.source_set()

 modules = {}
 target_modules = {}
+plugin_modules = []
 hw_arch = {}
 target_arch = {}
 target_system_arch = {}
diff --git a/contrib/plugins/meson.build b/contrib/plugins/meson.build
index c4f5061a7b3..327b48c8886 100644
--- a/contrib/plugins/meson.build
+++ b/contrib/plugins/meson.build
@@ -27,3 +27,5 @@ if t.length() > 0
 else
   run_target('contrib-plugins', command: find_program('true'))
 endif
+
+plugin_modules += t
diff --git a/tests/functional/meson.build b/tests/functional/meson.build
index 21c7e2087e9..dcea5d41e10 100644
--- a/tests/functional/meson.build
+++ b/tests/functional/meson.build
@@ -364,7 +364,7 @@ foreach speed : ['quick', 'thorough']
       # 'run_target' logic below & in Makefile.include
       test('func-' + testname,
            python,
-           depends: [test_deps, test_emulator, emulator_modules],
+ depends: [test_deps, test_emulator, emulator_modules, plugin_modules],
            env: test_env,
            args: [testpath],
            protocol: 'tap',
diff --git a/tests/tcg/plugins/meson.build b/tests/tcg/plugins/meson.build
index 7f927357421..0e4d4f5d6af 100644
--- a/tests/tcg/plugins/meson.build
+++ b/tests/tcg/plugins/meson.build
@@ -19,3 +19,5 @@ if t.length() > 0
 else
   run_target('test-plugins', command: find_program('true'))
 endif
+
+plugin_modules += t

Reply via email to