Skip to contentSkip to conversation

Misc meson fixes along test-vmstate fixes

PATCH New Yonggang Luo 1 participant 5 messages Sep 7, 2020 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

cover Misc meson fixes along test-vmstate fixes

The test-vmstate can be passed under win32 too
so enable it on win32,
This is based on Bonzini's upstream tag along

Yonggang Luo (4):
meson: remove empty else and duplicated gio deps
meson: Disable test-char on msys2/mingw for fixing tests stuck
vmstate: Fixes test-vmstate.c on msys2/mingw
vmstate: Enable test-vmstate on msys2/win32

 meson.build          |  6 ------
 tests/meson.build    | 11 +++++++----
 tests/test-vmstate.c |  2 +-
 3 files changed, 8 insertions(+), 11 deletions(-)
Signature · 1 line
2.28.0.windows.1
#1 lore raw

PATCH 1/4 meson: remove empty else and duplicated gio deps

---
 meson.build | 6 ------
 1 file changed, 6 deletions(-)
meson.build +0 -6
index 6e909213ee..d6a1949b2f 100644
@@ -320,7 +320,6 @@ opengl = not_found
 if 'CONFIG_OPENGL' in config_host
   opengl = declare_dependency(compile_args: config_host['OPENGL_CFLAGS'].split(),
                               link_args: config_host['OPENGL_LIBS'].split())
-else
 endif
 gtk = not_found
 if 'CONFIG_GTK' in config_host
@@ -347,11 +346,6 @@ if 'CONFIG_ICONV' in config_host
   iconv = declare_dependency(compile_args: config_host['ICONV_CFLAGS'].split(),
                              link_args: config_host['ICONV_LIBS'].split())
 endif
-gio = not_found
-if 'CONFIG_GIO' in config_host
-  gio = declare_dependency(compile_args: config_host['GIO_CFLAGS'].split(),
-                           link_args: config_host['GIO_LIBS'].split())
-endif
 vnc = not_found
 png = not_found
 jpeg = not_found
Signature · 1 line
2.28.0.windows.1
#2 lore raw

PATCH 2/4 meson: Disable test-char on msys2/mingw for fixing tests stuck

In reply to Yonggang Luo
---
 tests/meson.build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
tests/meson.build +6 -1
index 7f27a15cee..cf816a33cc 100644
@@ -198,8 +198,13 @@ if have_system
   # are not runnable under TSan due to a known issue.
   # https://github.com/google/sanitizers/issues/1116
   if 'CONFIG_TSAN' not in config_host
+    if 'CONFIG_POSIX' in config_host
+        tests += {
+          'test-char': ['socket-helpers.c', qom, io, chardev]
+        }
+    endif
+
     tests += {
-      'test-char': ['socket-helpers.c', qom, io, chardev],
       'test-qdev-global-props': [qom, hwcore, testqapi]
     }
   endif
Signature · 1 line
2.28.0.windows.1
#3 lore raw

PATCH 3/4 vmstate: Fixes test-vmstate.c on msys2/mingw

In reply to Yonggang Luo

The vmstate are valid on win32, just need generate tmp path properly

---
 tests/test-vmstate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/test-vmstate.c +1 -1
index f8de709a0b..4c453575bb 100644
@@ -34,7 +34,6 @@
 #include "qemu/module.h"
 #include "io/channel-file.h"
 
-static char temp_file[] = "/tmp/vmst.test.XXXXXX";
 static int temp_fd;
 
 
@@ -1487,6 +1486,7 @@ static void test_tmp_struct(void)
 
 int main(int argc, char **argv)
 {
+    g_autofree char* temp_file = g_strdup_printf("%s/vmst.test.XXXXXX", g_get_tmp_dir());
     temp_fd = mkstemp(temp_file);
 
     module_call_init(MODULE_INIT_QOM);
Signature · 1 line
2.28.0.windows.1
#4 lore raw

PATCH 4/4 vmstate: Enable test-vmstate on msys2/win32

In reply to Yonggang Luo

The vmstate currently disabled because compiling error, but now its fixed

---
 tests/meson.build | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
tests/meson.build +1 -3
index cf816a33cc..09b9b4462a 100644
@@ -185,11 +185,9 @@ if have_system
     'test-timed-average': [],
     'test-util-sockets': ['socket-helpers.c'],
     'test-base64': [],
+    'test-vmstate': [migration, io],
     'test-bufferiszero': [],
   }
-  if 'CONFIG_POSIX' in config_host
-    tests += {'test-vmstate': [migration, io]}
-  endif
   if 'CONFIG_INOTIFY1' in config_host
     tests += {'test-util-filemonitor': []}
   endif
Signature · 1 line
2.28.0.windows.1