Skip to contentSkip to conversation

tests/avocado/virtio-gpu: Fix test_vhost_user_vga_virgl for edid support

PATCH In review Thomas Huth 2 participants 2 messages Nov 14, 2023 – Nov 15, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/avocado/virtio-gpu: Fix test_vhost_user_vga_virgl for edid support

The "edid" feature has been added to vhost-user-gpu in commit c06444261e20 ("contrib/vhost-user-gpu: implement get_edid feature"), so waiting for "features: +virgl -edid" in the test does not work anymore, it's "+edid" instead of "-edid" now!

While we're at it, move the expected string to the preceeding exec_command_and_wait_for_pattern() instead (since waiting for empty string here does not make too much sense).

---
 tests/avocado/virtio-gpu.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
tests/avocado/virtio-gpu.py +2 -4
index 89bfecc715..6091f614a4 100644
@@ -149,10 +149,8 @@ def test_vhost_user_vga_virgl(self):
             # TODO: probably fails because we are missing the VirGL features
             self.cancel("VirGL not enabled?")
         self.wait_for_console_pattern("as init process")
-        exec_command_and_wait_for_pattern(
-            self, "/usr/sbin/modprobe virtio_gpu", ""
-        )
-        self.wait_for_console_pattern("features: +virgl -edid")
+        exec_command_and_wait_for_pattern(self, "/usr/sbin/modprobe virtio_gpu",
+                                          "features: +virgl +edid")
         self.vm.shutdown()
         qemu_sock.close()
         vugp.terminate()
Signature · 1 line
2.41.0
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 10 lines · Thomas Huth

The "edid" feature has been added to vhost-user-gpu in commit c06444261e20 ("contrib/vhost-user-gpu: implement get_edid feature"), so waiting for "features: +virgl -edid" in the test does not work anymore, it's "+edid" instead of "-edid" now!

While we're at it, move the expected string to the preceeding exec_command_and_wait_for_pattern() instead (since waiting for empty string here does not make too much sense).

Quoted 21 lines
---
  tests/avocado/virtio-gpu.py | 6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)
tests/avocado/virtio-gpu.py +2 -4
index 89bfecc715..6091f614a4 100644
@@ -149,10 +149,8 @@ def test_vhost_user_vga_virgl(self):
              # TODO: probably fails because we are missing the VirGL features
              self.cancel("VirGL not enabled?")
          self.wait_for_console_pattern("as init process")
-        exec_command_and_wait_for_pattern(
-            self, "/usr/sbin/modprobe virtio_gpu", ""
-        )
-        self.wait_for_console_pattern("features: +virgl -edid")
+        exec_command_and_wait_for_pattern(self, "/usr/sbin/modprobe virtio_gpu",
+                                          "features: +virgl +edid")
          self.vm.shutdown()
          qemu_sock.close()
          vugp.terminate()