tests: disable /char/stdio/* tests in test-char.c on win32
PATCH v6 8/25 tests: disable /char/stdio/* tests in test-char.c on win32
These tests are blocking test-char to be finished. Disable them by using variable is_win32, so we doesn't need macro to open it. and easy recover those function latter.
--- tests/test-char.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-)
tests/test-char.c +16 -10
@@ -77,7 +77,6 @@ static void fe_event(void *opaque, QEMUChrEvent event) } } -#ifdef _WIN32static void char_console_test_subprocess (void ) {QemuOpts *opts;
@@ -102,7 +101,7 @@ static void char_console_test(void)g_test_trap_assert_passed ();g_test_trap_assert_stdout ("CONSOLE" ); } -#endif +static void char_stdio_test_subprocess (void ) {Chardev *chr;
@@ -1448,7 +1447,11 @@ static SocketAddress unixaddr = {int main (int argc,char **argv) { -bool has_ipv4, has_ipv6; +bool has_ipv4, has_ipv6, is_win32 = false; + +#ifdef _WIN32 + is_win32 = true; +#endif qemu_init_main_loop (&error_abort);socket_init ();
@@ -1467,12 +1470,15 @@ int main(int argc, char **argv)g_test_add_func ("/char/invalid" , char_invalid_test);g_test_add_func ("/char/ringbuf" , char_ringbuf_test);g_test_add_func ("/char/mux" , char_mux_test); -#ifdef _WIN32 -g_test_add_func ("/char/console/subprocess" , char_console_test_subprocess); -g_test_add_func ("/char/console" , char_console_test); -#endif -g_test_add_func ("/char/stdio/subprocess" , char_stdio_test_subprocess); -g_test_add_func ("/char/stdio" , char_stdio_test); +if (0 ) { +g_test_add_func ("/char/console/subprocess" , char_console_test_subprocess); +g_test_add_func ("/char/console" , char_console_test); + } + +if (!is_win32) { +g_test_add_func ("/char/stdio/subprocess" , char_stdio_test_subprocess); +g_test_add_func ("/char/stdio" , char_stdio_test); + }#ifndef _WIN32g_test_add_func ("/char/pipe" , char_pipe_test);#endif
@@ -1534,7 +1540,7 @@ int main(int argc, char **argv) g_test_add_data_func("/char/socket/client/dupid-reconnect/" # name, \ &client8 ##name, char_socket_client_dupid_test) -if (has_ipv4) { +if (has_ipv4 && !is_win32) {SOCKET_SERVER_TEST (tcp, &tcpaddr);SOCKET_CLIENT_TEST (tcp, &tcpaddr); g_test_add_data_func("/char/socket/server/two-clients/tcp", &tcpaddr,
Signature · 1 line
2.28.0.windows.1
PATCH v6 24/25 ci: Enable msys2 ci in cirrus
Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699
The https://wiki.qemu.org/Hosts/W32#Native_builds_with_MSYS2 need to be updated. There is no need of --cross-prefix, open mingw64.exe instead of msys2.exe then we don't need the --cross-prefix, besides we using environment variable settings:
MSYS: winsymlinks:nativestrict
MSYSTEM: MINGW64
CHERE_INVOKING: 1
to opening mingw64 native shell.
We now running tests with make -i check to skip tests errors.
--- .cirrus.yml | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+)
.cirrus.yml +60 -0
@@ -44,3 +44,63 @@ macos_xcode_task: --enable-werror --cc=clang || { cat config.log; exit 1; } - gmake -j$(sysctl -n hw.ncpu) - gmake check + +windows_msys2_task: + windows_container: + image: cirrusci/windowsservercore:cmake + os_version: 2019 + cpu: 8 + memory: 8G + env: + MSYS: winsymlinks:nativestrict + MSYSTEM: MINGW64 + CHERE_INVOKING: 1 + printenv_script: + - C:\tools\msys64\usr\bin\bash.exe -lc 'printenv' + install_script: + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig" + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && pacman -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Sy --noconfirm" + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --needed --noconfirm -S bash pacman pacman-mirrors msys2-runtime" + - taskkill /F /IM gpg-agent.exe + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Su" + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -S --needed + base-devel + git + mingw-w64-x86_64-python + mingw-w64-x86_64-python-setuptools + mingw-w64-x86_64-toolchain + mingw-w64-x86_64-SDL2 + mingw-w64-x86_64-SDL2_image + mingw-w64-x86_64-gtk3 + mingw-w64-x86_64-glib2 + mingw-w64-x86_64-ninja + mingw-w64-x86_64-make + mingw-w64-x86_64-jemalloc + mingw-w64-x86_64-lzo2 + mingw-w64-x86_64-zstd + mingw-w64-x86_64-libjpeg-turbo + mingw-w64-x86_64-pixman + mingw-w64-x86_64-libgcrypt + mingw-w64-x86_64-capstone + mingw-w64-x86_64-libpng + mingw-w64-x86_64-libssh + mingw-w64-x86_64-libxml2 + mingw-w64-x86_64-snappy + mingw-w64-x86_64-libusb + mingw-w64-x86_64-usbredir + mingw-w64-x86_64-libtasn1 + mingw-w64-x86_64-libnfs + mingw-w64-x86_64-nettle + mingw-w64-x86_64-cyrus-sasl + mingw-w64-x86_64-curl + mingw-w64-x86_64-gnutls + mingw-w64-x86_64-zstd" + script: + - C:\tools\msys64\usr\bin\bash.exe -lc "mkdir build" + - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && ../configure --python=python3 --ninja=ninja" + - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make -j$NUMBER_OF_PROCESSORS" + test_script: + - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make V=1 check" +
Signature · 1 line
2.28.0.windows.1
Quoted 48 lines · Yonggang Luo
These tests are blocking test-char to be finished. Disable them by using variable
is_win32, so we doesn't need macro to open it. and easy recover those function latter.Signed-off-by Yonggang Luo <[email protected]>--- tests/test-char.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-)tests/test-char.c +6
-3@@ -77,7 +77,6 @@ static void fe_event(void *opaque, QEMUChrEvent event) } } -#ifdef _WIN32static void char_console_test_subprocess (void ) {QemuOpts *opts;@@ -102,7 +101,7 @@ static void char_console_test(void)g_test_trap_assert_passed ();g_test_trap_assert_stdout ("CONSOLE" ); } -#endif +static void char_stdio_test_subprocess (void ) {Chardev *chr;@@ -1448,7 +1447,11 @@ static SocketAddress unixaddr = {int main (int argc,char **argv) { -bool has_ipv4, has_ipv6; +bool has_ipv4, has_ipv6, is_win32 = false; + +#ifdef _WIN32 + is_win32 = true; +#endif qemu_init_main_loop (&error_abort);socket_init ();@@ -1467,12 +1470,15 @@ int main(int argc, char **argv)g_test_add_func ("/char/invalid" , char_invalid_test);g_test_add_func ("/char/ringbuf" , char_ringbuf_test);g_test_add_func ("/char/mux" , char_mux_test);
tests/test-char.c int main(int argc, char **argv) · line 1476
Quoted 10 lines
tests/test-char.c +4
-6-#ifdef _WIN32 -g_test_add_func ("/char/console/subprocess" , char_console_test_subprocess); -g_test_add_func ("/char/console" , char_console_test); -#endif -g_test_add_func ("/char/stdio/subprocess" , char_stdio_test_subprocess); -g_test_add_func ("/char/stdio" , char_stdio_test); +if (0 ) { +g_test_add_func ("/char/console/subprocess" , char_console_test_subprocess); +g_test_add_func ("/char/console" , char_console_test); + }
Sorry, but this looks pretty much like a work-in-progress debugging patch. Please avoid sending such stuff to the mailing list, and if so, clearly mark it as an RFC and describe it in the patch description.
It also does not help much if you send your series three times a day to the list - nobody has that much reviewing band width. So please take some time, finish your patches first, and when you're sure that they are really finished, then post a new series to the mailing list.
Thanks,
Thomas
Quoted 17 lines
tests/test-char.c +5
-1+if (!is_win32) { +g_test_add_func ("/char/stdio/subprocess" , char_stdio_test_subprocess); +g_test_add_func ("/char/stdio" , char_stdio_test); + }#ifndef _WIN32g_test_add_func ("/char/pipe" , char_pipe_test);#endif @@ -1534,7 +1540,7 @@ int main(int argc, char **argv) g_test_add_data_func("/char/socket/client/dupid-reconnect/" # name, \ &client8 ##name, char_socket_client_dupid_test) -if (has_ipv4) { +if (has_ipv4 && !is_win32) {SOCKET_SERVER_TEST (tcp, &tcpaddr);SOCKET_CLIENT_TEST (tcp, &tcpaddr); g_test_add_data_func("/char/socket/server/two-clients/tcp", &tcpaddr,
Quoted 63 lines · Thomas Huth
Quoted 45 lines · Yonggang Luo
These tests are blocking test-char to be finished. Disable them by using variable
is_win32, so we doesn't need macro to open it. and easy recover those function latter.Signed-off-by Yonggang Luo <[email protected]>--- tests/test-char.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-)tests/test-char.c +6
-3@@ -77,7 +77,6 @@ static void fe_event(void *opaque, QEMUChrEvent event) } } -#ifdef _WIN32static void char_console_test_subprocess (void ) {QemuOpts *opts;@@ -102,7 +101,7 @@ static void char_console_test(void)g_test_trap_assert_passed ();g_test_trap_assert_stdout ("CONSOLE" ); } -#endif +static void char_stdio_test_subprocess (void ) {Chardev *chr;@@ -1448,7 +1447,11 @@ static SocketAddress unixaddr = {int main (int argc,char **argv) { -bool has_ipv4, has_ipv6; +bool has_ipv4, has_ipv6, is_win32 = false; + +#ifdef _WIN32 + is_win32 = true; +#endif qemu_init_main_loop (&error_abort);socket_init ();tests/test-char.c int main(int argc, char **argv) · line 1471
Quoted 5 lines
tests/test-char.c +0
-2@@ -1467,12 +1470,15 @@ int main(int argc, char **argv)g_test_add_func ("/char/invalid" , char_invalid_test);g_test_add_func ("/char/ringbuf" , char_ringbuf_test);g_test_add_func ("/char/mux" , char_mux_test); -#ifdef _WIN32 - g_test_add_func("/char/console/subprocess",
char_console_test_subprocess);tests/test-char.c int main(int argc, char **argv)
Quoted 3 lines
tests/test-char.c +0
-3-g_test_add_func ("/char/console" , char_console_test); -#endif - g_test_add_func("/char/stdio/subprocess",
char_stdio_test_subprocess);tests/test-char.c int main(int argc, char **argv)
Quoted 3 lines
tests/test-char.c +2
-1-g_test_add_func ("/char/stdio" , char_stdio_test); +if (0 ) { + g_test_add_func("/char/console/subprocess",
char_console_test_subprocess);tests/test-char.c int main(int argc, char **argv) · line 1476
Quoted 2 lines
tests/test-char.c +2
-0+g_test_add_func ("/char/console" , char_console_test); + }
Quoted 9 lines
Sorry, but this looks pretty much like a work-in-progress debugging patch. Please avoid sending such stuff to the mailing list, and if so, clearly mark it as an RFC and describe it in the patch description.
It also does not help much if you send your series three times a day to the list - nobody has that much reviewing band width. So please take some time, finish your patches first, and when you're sure that they are really finished, then post a new series to the mailing list.
Sorry for that, test-char is hard to fix and I can not fixes in my own, so I need help from community,
For all other patches I am confident, but for this, I am asking for help, I'd like to know who is familiar with
char and I'd like to talk with them privately if possible.
Quoted 27 lines
Thanks,
Thomastests/test-char.c int main(int argc, char **argv) · line 1478
Quoted 2 lines
tests/test-char.c +2
-0+if (!is_win32) { + g_test_add_func("/char/stdio/subprocess",
char_stdio_test_subprocess);tests/test-char.c int main(int argc, char **argv) · line 1540
Quoted 7 lines
tests/test-char.c +2
-0+g_test_add_func ("/char/stdio" , char_stdio_test); + }#ifndef _WIN32g_test_add_func ("/char/pipe" , char_pipe_test);#endif @@ -1534,7 +1540,7 @@ int main(int argc, char **argv) g_test_add_data_func("/char/socket/client/dupid-reconnect/" # name,\
tests/test-char.c int main(int argc, char **argv)
Quoted 7 lines
tests/test-char.c +1
-1&client8 ##name, char_socket_client_dupid_test) -if (has_ipv4) { +if (has_ipv4 && !is_win32) {SOCKET_SERVER_TEST (tcp, &tcpaddr);SOCKET_CLIENT_TEST (tcp, &tcpaddr); g_test_add_data_func("/char/socket/server/two-clients/tcp",&tcpaddr,
Quoted 1 line
Signature · 6 lines
此致
礼
罗勇刚
Yours
sincerely,
Yonggang LuoPATCH v6 25/25 meson: guard the minimal meson version to 0.55.1
In reply to Yonggang LuoSo we can removal usage of unstable-keyval
--- meson.build | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
meson.build +3 -6
@@ -1,14 +1,11 @@ -project('qemu', ['c'], meson_version: '>=0.55.0', +project('qemu', ['c'], meson_version: '>=0.55.1', default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11', 'b_colorout=auto'], version: run_command('head', meson.source_root() / 'VERSION').stdout().strip()) not_found = dependency('', required: false) -if meson.version().version_compare('>=0.56.0') - keyval = import('keyval') -else - keyval = import('unstable-keyval') -endif +keyval = import('keyval') + ss = import('sourceset') sh = find_program('sh')
Signature · 1 line
2.28.0.windows.1
Re: [PATCH v6 25/25] meson: guard the minimal meson version to 0.55.1
Il mer 9 set 2020, 20:43 Yonggang Luo <[email protected]> ha scritto:
Quoted 2 lines
So we can removal usage of unstable-keyval
Isn't it stable only on 0.56.0?
Paolo
Quoted 33 lines
Signed-off-by Yonggang Luo <[email protected]>--- meson.build | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)meson.build +3
-6@@ -1,14 +1,11 @@ -project('qemu', ['c'], meson_version: '>=0.55.0', +project('qemu', ['c'], meson_version: '>=0.55.1', default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11', 'b_colorout=auto'], version: run_command('head', meson.source_root() / 'VERSION').stdout().strip()) not_found = dependency('', required: false) -if meson.version().version_compare('>=0.56.0') - keyval = import('keyval') -else - keyval = import('unstable-keyval') -endif +keyval = import('keyval') + ss = import('sourceset')sh =
find_program('sh')
--
2.28.0.windows.1
Re: [PATCH v6 25/25] meson: guard the minimal meson version to 0.55.1
Quoted 11 lines · Paolo Bonzini
Il mer 9 set 2020, 20:43 Yonggang Luo <[email protected]> ha scritto:
Quoted 2 lines
So we can removal usage of unstable-keyval
Isn't it stable only on 0.56.0?
Paolo
On Windows, there is following warning: WARNING: Module unstable-keyval
is now stable, please use the keyval module instead.
NOTE: guest cross-compilers enabled: cc
Using 'PKG_CONFIG_PATH' from environment with value:
'C:\\CI-Tools\\msys64\\mingw64\\lib\\pkgconfig;C:\\CI-Tools\\msys64\\mingw64\\share\\pkgconfig' Using 'PKG_CONFIG_PATH' from environment with value:
'C:\\CI-Tools\\msys64\\mingw64\\lib\\pkgconfig;C:\\CI-Tools\\msys64\\mingw64\\share\\pkgconfig' The Meson build system
Version: 0.55.999
Source dir: C:/work/xemu/qemu
Build dir: C:/work/xemu/qemu/build
Build type: native build
Project name: qemu
Project version: 5.1.50
C compiler for the host machine: cc (gcc 10.2.0 "cc (Rev1, Built by MSYS2 project) 10.2.0")
C linker for the host machine: cc ld.bfd 2.35
Host machine cpu family: x86_64
Host machine cpu: x86_64
WARNING: Module unstable-keyval is now stable, please use the keyval module instead.
Program sh found: YES
But when I commit this patch to running CI, osx are failing, so there is problem with this patch, sorry for that. this patch need to be discard
Quoted 35 lines
Quoted 35 lines
Signed-off-by Yonggang Luo <[email protected]>--- meson.build | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)meson.build +3
-6@@ -1,14 +1,11 @@ -project('qemu', ['c'], meson_version: '>=0.55.0', +project('qemu', ['c'], meson_version: '>=0.55.1', default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11', 'b_colorout=auto'], version: run_command('head', meson.source_root() / 'VERSION').stdout().strip()) not_found = dependency('', required: false) -if meson.version().version_compare('>=0.56.0') - keyval = import('keyval') -else - keyval = import('unstable-keyval') -endif +keyval = import('keyval') + ss = import('sourceset')sh =
find_program('sh')
--
2.28.0.windows.1
Signature · 6 lines
此致
礼
罗勇刚
Yours
sincerely,
Yonggang LuoRe: [PATCH v6 25/25] meson: guard the minimal meson version to 0.55.1
Il mer 9 set 2020, 22:11 罗勇刚(Yonggang Luo) <[email protected]> ha scritto:
Quoted 11 lines · Paolo Bonzini
Quoted 8 lines
Il mer 9 set 2020, 20:43 Yonggang Luo <[email protected]> ha scritto:
Quoted 2 lines
So we can removal usage of unstable-keyval
Quoted 7 lines
Quoted 4 lines
Isn't it stable only on 0.56.0?
Paolo
On Windows, there is following warning: WARNING: Module unstable-keyval
is now stable, please use the keyval module instead.
That's because Meson advertises itself as version 0.55.90 until 0.56 is released. It will fix itself when the next release is out.
Paolo
NOTE: guest cross-compilers enabled: cc
Quoted 67 lines
Using '
PKG_CONFIG_PATH' from environment with value:
'C:\\CI-Tools\\msys64\\mingw64\\lib\\pkgconfig;C:\\CI-Tools\\msys64\\mingw64\\share\\pkgconfig' Using 'PKG_CONFIG_PATH' from environment with value:
'C:\\CI-Tools\\msys64\\mingw64\\lib\\pkgconfig;C:\\CI-Tools\\msys64\\mingw64\\share\\pkgconfig' The Meson build system
Version: 0.55.999
Source dir: C:/work/xemu/qemu
Build dir: C:/work/xemu/qemu/build
Build type: native build
Project name: qemu
Project version: 5.1.50
C compiler for the host machine: cc (gcc 10.2.0 "cc (Rev1, Built by MSYS2 project) 10.2.0")
C linker for the host machine: cc ld.bfd 2.35
Host machine cpu family:x86_64
Host machine cpu:x86_64
WARNING: Module unstable-keyval is now stable, please use the keyval
module instead.
Program sh found: YESBut when I commit this patch to running CI, osx are failing, so there is problem with this patch, sorry for that. this patch need to be discard
Quoted 30 lines
Quoted 30 lines
Signed-off-by Yonggang Luo <[email protected]>--- meson.build | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)meson.build +3
-6@@ -1,14 +1,11 @@ -project('qemu', ['c'], meson_version: '>=0.55.0', +project('qemu', ['c'], meson_version: '>=0.55.1', default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11', 'b_colorout=auto'], version: run_command('head', meson.source_root() / 'VERSION').stdout().strip()) not_found = dependency('', required: false) -if meson.version().version_compare('>=0.56.0') - keyval = import('keyval') -else - keyval = import('unstable-keyval') -endif +keyval = import('keyval') + ss = import('sourceset')Quoted 5 lines
Quoted 5 lines
sh =
find_program('sh')
--
2.28.0.windows.1--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
Re: [PATCH v6 25/25] meson: guard the minimal meson version to 0.55.1
In reply to Yonggang LuoQuoted 6 lines · Yonggang Luo
So we can removal usage of unstable-keyval
Signed-off-by Yonggang Luo <[email protected]>--- meson.build | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
This prevents the use on Fedora which has 0.55.0 only. This is not desirable merely to remove a functionally harmless warning.
Quoted 27 lines
meson.build +3
-6@@ -1,14 +1,11 @@ -project('qemu', ['c'], meson_version: '>=0.55.0', +project('qemu', ['c'], meson_version: '>=0.55.1', default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11', 'b_colorout=auto'], version: run_command('head', meson.source_root() / 'VERSION').stdout().strip()) not_found = dependency('', required: false) -if meson.version().version_compare('>=0.56.0') - keyval = import('keyval') -else - keyval = import('unstable-keyval') -endif +keyval = import('keyval') + ss = import('sourceset') sh = find_program('sh')Signature · 1 line
2.28.0.windows.1
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 :|