Skip to contentSkip to conversation

Re:

DISCUSSION Alex Bennée 1 participant 1 message Apr 14, 2022

lore
Share & tools
lore
#0 lore raw
Quoted 56 lines · Eric Auger

Hi Alex,

Quoted 30 lines · Alex Bennée

When trying to work out what the virtio-net-tests where doing it was hard because the g_test_trap_subprocess redirects all output to /dev/null. Lift this restriction by using the appropriate flags so you can see something similar to what the vhost-user-blk tests show when running.

While we are at it remove the g_test_verbose() check so we always show how the QEMU is run.

---
 tests/qtest/qos-test.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
tests/qtest/qos-test.c +1 -3
index f97d0a08fd..c6c196cc95 100644
@@ -89,9 +89,7 @@ static void qos_set_machines_devices_available(void)
 
 static void restart_qemu_or_continue(char *path)
 {
-    if (g_test_verbose()) {
-        qos_printf("Run QEMU with: '%s'\n", path);
-    }
+    qos_printf("Run QEMU with: '%s'\n", path);
     /* compares the current command line with the
      * one previously executed: if they are the same,
      * don't restart QEMU, if they differ, stop previous

tests/qtest/qos-test.c static void run_one_test(const void *arg) · line 187

Quoted 6 lines
tests/qtest/qos-test.c +2 -1
@@ -185,7 +183,8 @@ static void run_one_test(const void *arg)
 static void subprocess_run_one_test(const void *arg)
 {
     const gchar *path = arg;
-    g_test_trap_subprocess(path, 0, 0);
+    g_test_trap_subprocess(path, 0,
+                           G_TEST_SUBPROCESS_INHERIT_STDOUT | G_TEST_SUBPROCESS_INHERIT_STDERR);

While workling on libqos/pci tests on aarch64 I also did that but I noticed there were a bunch of errors such as:

/aarch64/virt/generic-pcihost/pci-bus-generic/pci-bus/virtio-net-pci/virtio-net/virtio-net-tests/vhost-user/multiqueue:
qemu-system-aarch64: Failed to set msg fds.
qemu-system-aarch64: vhost VQ 0 ring restore failed: -22: Invalid
argument (22)
qemu-system-aarch64: Failed to set msg fds.
qemu-system-aarch64: vhost VQ 1 ring restore failed: -22: Invalid
argument (22)
qemu-system-aarch64: Failed to set msg fds.
qemu-system-aarch64: vhost VQ 2 ring restore failed: -22: Invalid
argument (22)
qemu-system-aarch64: Failed to set msg fds.
qemu-system-aarch64: vhost VQ 3 ring restore failed: -22: Invalid
argument (22)

Quoted 2 lines

I see those also when running with x86_64-softmmu/qemu-system-x86_64 (this is no aarch64 specific).

I think this is a symptom of an unclean tear down (which might be too much to ask for our fake vhost backend) or something we should handle better. I still have to get my gpio test working so I'll have a look tomorrow.

Quoted 11 lines

I don't know if it is an issue to get those additional errors?

Thanks

Eric

Quoted 4 lines
tests/qtest/qos-test.c +0 -0
     g_test_trap_assert_passed();
 }
 
Signature · 1 line
Alex Bennée