Skip to contentSkip to conversation

tests/qtest/vnc-display-test: Silent warnings & explicit machine

PATCH In review Philippe Mathieu-Daudé 6 participants 10 messages Jan 19, 2023 – Jan 26, 2023

lore
Share & tools
lore
#0 lore raw

cover tests/qtest/vnc-display-test: Silent warnings & explicit machine

- Silent warnings on Windows
- Explicit the 'none' machine
- Disable on Darwin Aarch64 host

Philippe Mathieu-Daudé (3):
tests/qtest/vnc-display-test: Suppress build warnings on Windows tests/qtest/vnc-display-test: Use the 'none' machine tests/qtest/vnc-display-test: Disable on Darwin

 tests/qtest/vnc-display-test.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
Signature · 1 line
2.38.1
#1 lore raw

PATCH 1/3 tests/qtest/vnc-display-test: Suppress build warnings on Windows

While this test is skipped on Windows, we still get when building:

tests/qtest/vnc-display-test.c:22:20: warning: unused function 'on_vnc_error' [-Wunused-function] static inline void on_vnc_error(VncConnection* self,

                     ^
  tests/qtest/vnc-display-test.c:28:20: warning: unused function 'on_vnc_auth_failure' [-Wunused-function]
  static inline void on_vnc_auth_failure(VncConnection *self,
                     ^

2 warnings generated.

---
 tests/qtest/vnc-display-test.c | 4 ++++
 1 file changed, 4 insertions(+)
tests/qtest/vnc-display-test.c +4 -0
index e2a9d682bb..fd63e3a881 100644
@@ -19,6 +19,8 @@ typedef struct Test {
     GMainLoop *loop;
 } Test;
 
+#if !defined(WIN32)
+
 static void on_vnc_error(VncConnection* self,
                          const char* msg)
 {
@@ -31,6 +33,8 @@ static void on_vnc_auth_failure(VncConnection *self,
     g_error("vnc-auth-failure: %s", msg);
 }
 
+#endif
+
 static bool
 test_setup(Test *test)
 {
Signature · 1 line
2.38.1
Reviewed-by on v1 1/3
#2 lore raw

Re: [PATCH 1/3] tests/qtest/vnc-display-test: Suppress build warnings on Windows

Quoted 8 lines · Philippe Mathieu-Daudé

While this test is skipped on Windows, we still get when building:

tests/qtest/vnc-display-test.c:22:20: warning: unused function 'on_vnc_error' [-Wunused-function] static inline void on_vnc_error(VncConnection* self,

                      ^
   tests/qtest/vnc-display-test.c:28:20: warning: unused function 'on_vnc_auth_failure' [-Wunused-function]
   static inline void on_vnc_auth_failure(VncConnection *self,
                      ^
Quoted 6 lines

2 warnings generated.

---
  tests/qtest/vnc-display-test.c | 4 ++++
  1 file changed, 4 insertions(+)

r~

#3 lore raw

PATCH 2/3 tests/qtest/vnc-display-test: Use the 'none' machine

In reply to Philippe Mathieu-Daudé

If we don't specify any machine, an architecture default might be picked. But some architectures don't provide any default, such ARM:

  $ make check-qtest-aarch64
  ...
  19/20 qemu:qtest+qtest-aarch64 / qtest-aarch64/vnc-display-test
  qemu-system-aarch64: No machine specified, and there is no default

Since we don't need any particular machine to run this VNC test, use the 'none' machine.

---
 tests/qtest/vnc-display-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qtest/vnc-display-test.c +1 -1
index fd63e3a881..df468c7b22 100644
@@ -44,7 +44,7 @@ test_setup(Test *test)
 #else
     int pair[2];
 
-    test->qts = qtest_init("-vnc none -name vnc-test");
+    test->qts = qtest_init("-M none -vnc none -name vnc-test");
 
     g_assert_cmpint(qemu_socketpair(AF_UNIX, SOCK_STREAM, 0, pair), ==, 0);
 
Signature · 1 line
2.38.1
Reviewed-by on v1 2/3
#4 lore raw

Re: [PATCH 2/3] tests/qtest/vnc-display-test: Use the 'none' machine

Quoted 9 lines · Philippe Mathieu-Daudé

If we don't specify any machine, an architecture default might be picked. But some architectures don't provide any default, such ARM:

  $ make check-qtest-aarch64
  ...
  19/20 qemu:qtest+qtest-aarch64 / qtest-aarch64/vnc-display-test
  qemu-system-aarch64: No machine specified, and there is no default
Quoted 4 lines

Since we don't need any particular machine to run this VNC test, use the 'none' machine.

Reviewed-by on v1 2/3
#5 lore raw

Re: [PATCH 2/3] tests/qtest/vnc-display-test: Use the 'none' machine

In reply to Philippe Mathieu-Daudé
Quoted 9 lines · Philippe Mathieu-Daudé

If we don't specify any machine, an architecture default might be picked. But some architectures don't provide any default, such ARM:

   $ make check-qtest-aarch64
   ...
   19/20 qemu:qtest+qtest-aarch64 / qtest-aarch64/vnc-display-test
   qemu-system-aarch64: No machine specified, and there is no default
Quoted 7 lines

Since we don't need any particular machine to run this VNC test, use the 'none' machine.

---
  tests/qtest/vnc-display-test.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

r~

#6 lore raw

RFC PATCH 3/3 tests/qtest/vnc-display-test: Disable on Darwin

In reply to Philippe Mathieu-Daudé

This test is failing in gtk-vnc on Darwin:

  $ make check-qtest-aarch64
  ...
  19/20 qemu:qtest+qtest-aarch64 / qtest-aarch64/vnc-display-test
  ERROR **: 10:42:35.488: vnc-error: Unsupported auth type 17973672

While QEMU picks the sigaltstack coroutine backend, gtk-vnc uses the ucontext coroutine backend, which might be broken on Darwin.

Disable this test (current problem being investigated in this thread:
https://lore.kernel.org/qemu-devel/[email protected]/).

---
 tests/qtest/vnc-display-test.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
tests/qtest/vnc-display-test.c +4 -1
index df468c7b22..e52a4326ec 100644
@@ -19,7 +19,7 @@ typedef struct Test {
     GMainLoop *loop;
 } Test;
 
-#if !defined(WIN32)
+#if !defined(WIN32) && !defined(CONFIG_DARWIN)
 
 static void on_vnc_error(VncConnection* self,
                          const char* msg)
@@ -41,6 +41,9 @@ test_setup(Test *test)
 #ifdef WIN32
     g_test_skip("Not supported on Windows yet");
     return false;
+#elif defined(CONFIG_DARWIN)
+    g_test_skip("Broken on Darwin");
+    return false;
 #else
     int pair[2];
 
Signature · 1 line
2.38.1
Reviewed-by on v1 3/3
#7 lore raw

Re: [RFC PATCH 3/3] tests/qtest/vnc-display-test: Disable on Darwin

Quoted 9 lines · Philippe Mathieu-Daudé

This test is failing in gtk-vnc on Darwin:

  $ make check-qtest-aarch64
  ...
  19/20 qemu:qtest+qtest-aarch64 / qtest-aarch64/vnc-display-test
  ERROR **: 10:42:35.488: vnc-error: Unsupported auth type 17973672

While QEMU picks the sigaltstack coroutine backend, gtk-vnc uses the ucontext coroutine backend, which might be broken on Darwin.

s/might be/is completely and utterly/

The struct ucontext_t definition on macOS aarch64 is too small, and so getcontext() smashes past the end of the struct overwriting whatever follows the ucontext_t struct.

Quoted 8 lines

Disable this test (current problem being investigated in this thread:
https://lore.kernel.org/qemu-devel/[email protected]/).

---
 tests/qtest/vnc-display-test.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

But keep an eye on this bug:

https://github.com/Homebrew/homebrew-core/issues/115413

if it gets fixed before you send a PULL request, we can drop this patch, or failing that, revert it later.

With regards,
Daniel

Signature · 3 lines
|: 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 :|
Reviewed-by on the v1 series
#8 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 10 lines · Philippe Mathieu-Daudé

- Silent warnings on Windows
- Explicit the 'none' machine
- Disable on Darwin Aarch64 host

Philippe Mathieu-Daudé (3):
tests/qtest/vnc-display-test: Suppress build warnings on Windows tests/qtest/vnc-display-test: Use the 'none' machine tests/qtest/vnc-display-test: Disable on Darwin

Quoted 6 lines
 tests/qtest/vnc-display-test.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

--
2.38.1

Signature · 1 line
Marc-André Lureau
#9 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 11 lines · Philippe Mathieu-Daudé

- Silent warnings on Windows
- Explicit the 'none' machine
- Disable on Darwin Aarch64 host

Philippe Mathieu-Daudé (3):
tests/qtest/vnc-display-test: Suppress build warnings on Windows tests/qtest/vnc-display-test: Use the 'none' machine tests/qtest/vnc-display-test: Disable on Darwin

  tests/qtest/vnc-display-test.c | 9 ++++++++-
  1 file changed, 8 insertions(+), 1 deletion(-)

Thanks, added to my staging branch:

https://gitlab.com/thuth/qemu/-/commits/staging

Thomas