All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements
@ 2020-09-16 11:47 Thomas Huth
  2020-09-16 11:47 ` [PULL 01/24] iotests: Drop readlink -f Thomas Huth
                   ` (25 more replies)
  0 siblings, 26 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

 Hi Peter,

the following changes since commit de39a045bd8d2b49e4f3d07976622c29d58e0bac:

  Merge remote-tracking branch 'remotes/kraxel/tags/vga-20200915-pull-request' into staging (2020-09-15 14:25:05 +0100)

are available in the Git repository at:

  https://gitlab.com/huth/qemu.git tags/pull-request-2020-09-16

for you to fetch changes up to 114daec31d64600e5a070abcdb8de2cf74d01e94:

  cirrus: Building freebsd in a single shot (2020-09-16 12:15:07 +0200)

----------------------------------------------------------------
* Fix "readlink -f" problem in iotests on macOS (to fix the Cirrus-CI tests)
* Some minor qtest improvements
* Fix the unit tests to work on MSYS2, too
* Enable building and testing on MSYS2 in the Cirrus-CI
* Build FreeBSD with one task again in the Cirrus-CI
----------------------------------------------------------------

Alexander Bulekov (1):
      fuzz: Change the way we write qtest log to stderr

Max Reitz (1):
      iotests: Drop readlink -f

Maxim Levitsky (1):
      rcu: Implement drain_call_rcu

Thomas Huth (4):
      tests/qtest/qmp-cmd-test: Use inclusive language
      tests/socket-helpers: Treat EAI_NONAME as EADDRNOTAVAIL
      Simplify the .gitignore file
      qga/commands-win32: Fix problem with redundant protype declaration

Yonggang Luo (17):
      tests: Convert g_free to g_autofree macro in test-logging.c
      rcu: fixes test-logging.c by call drain_call_rcu before rmdir_full
      meson: Disable test-char on msys2/mingw for fixing tests stuck
      meson: disable crypto tests are empty under win32
      tests: Fixes test-replication.c on msys2/mingw.
      tests: test-replication disable /replication/secondary/* on msys2/mingw.
      osdep: file locking functions are not available on Win32
      meson: Use -b to ignore CR vs. CR-LF issues on Windows
      meson: remove empty else and duplicated gio deps
      vmstate: Fixes test-vmstate.c on msys2/mingw
      tests: Fixes test-io-channel-socket.c tests under msys2/mingw
      tests: fixes aio-win32 about aio_remove_fd_handler, get it consistence with aio-posix.c
      tests: Fixes test-io-channel-file by mask only owner file state mask bits
      tests: fix test-util-sockets.c
      tests: Fixes test-qdev-global-props.c
      ci: Enable msys2 ci in cirrus
      cirrus: Building freebsd in a single shot

 .cirrus.yml                    |  98 ++++++++++++++++++--------
 .gitignore                     | 152 -----------------------------------------
 include/qemu/osdep.h           |   2 +-
 include/qemu/rcu.h             |   1 +
 meson.build                    |   6 --
 qga/commands-win32.c           |   5 +-
 tests/meson.build              |  10 ++-
 tests/qapi-schema/meson.build  |   2 +-
 tests/qemu-iotests/check       |   2 +-
 tests/qtest/fuzz/fuzz.c        |   5 +-
 tests/qtest/qmp-cmd-test.c     |  10 +--
 tests/socket-helpers.c         |   3 +-
 tests/test-io-channel-file.c   |  12 +++-
 tests/test-io-channel-socket.c |   2 +
 tests/test-logging.c           |   5 +-
 tests/test-qdev-global-props.c |   9 ++-
 tests/test-replication.c       |  22 ++++--
 tests/test-util-sockets.c      |   6 +-
 tests/test-vmstate.c           |   3 +-
 util/aio-win32.c               |  12 +++-
 util/rcu.c                     |  55 +++++++++++++++
 21 files changed, 207 insertions(+), 215 deletions(-)



^ permalink raw reply	[flat|nested] 36+ messages in thread

* [PULL 01/24] iotests: Drop readlink -f
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 02/24] fuzz: Change the way we write qtest log to stderr Thomas Huth
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

From: Max Reitz <mreitz@redhat.com>

On macOS, (out of the box) readlink does not have -f.  We do not really
need readlink here, though, it was just a replacement for realpath
(which is not available on our BSD test systems), which we needed to
make the $(dirname) into an absolute path.

Instead of using either, just use "cd; pwd" like is done for
$source_iotests.

Fixes: b1cbc33a3971b6bb005d5ac3569feae35a71de0f
       ("iotests: Allow running from different directory")
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Reported-by: Claudio Fontana <cfontana@suse.de>
Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200914145606.94620-1-mreitz@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/qemu-iotests/check | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index e14a1f354d..678b6e4910 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -44,7 +44,7 @@ then
         _init_error "failed to obtain source tree name from check symlink"
     fi
     source_iotests=$(cd "$source_iotests"; pwd) || _init_error "failed to enter source tree"
-    build_iotests=$(readlink -f $(dirname "$0"))
+    build_iotests=$(cd "$(dirname "$0")"; pwd)
 else
     # called from the source tree
     source_iotests=$PWD
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 02/24] fuzz: Change the way we write qtest log to stderr
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
  2020-09-16 11:47 ` [PULL 01/24] iotests: Drop readlink -f Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 03/24] tests/qtest/qmp-cmd-test: Use inclusive language Thomas Huth
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

From: Alexander Bulekov <alxndr@bu.edu>

Telling QTest to log to /dev/fd/2, essentially results in dup(2). This
is fine, if other code isn't logging to stderr. Otherwise, the order of
the logs is mixed due to buffering issues, since two file-descriptors
are used to write to the same file. We can avoid this, since just
specifying "-qtest" sets the log fd to stderr. If we want to disable
qtest logs, we can just add -qtest-log none.

Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20200819061110.1320568-2-alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/qtest/fuzz/fuzz.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/qtest/fuzz/fuzz.c b/tests/qtest/fuzz/fuzz.c
index 1ceea84702..7f266ffc63 100644
--- a/tests/qtest/fuzz/fuzz.c
+++ b/tests/qtest/fuzz/fuzz.c
@@ -202,9 +202,8 @@ int LLVMFuzzerInitialize(int *argc, char ***argv, char ***envp)
 
     /* Run QEMU's softmmu main with the fuzz-target dependent arguments */
     GString *cmd_line = fuzz_target->get_init_cmdline(fuzz_target);
-    g_string_append_printf(cmd_line,
-                           " -qtest /dev/null -qtest-log %s",
-                           getenv("QTEST_LOG") ? "/dev/fd/2" : "/dev/null");
+    g_string_append_printf(cmd_line, " %s -qtest /dev/null ",
+                           getenv("QTEST_LOG") ? "" : "-qtest-log none");
 
     /* Split the runcmd into an argv and argc */
     wordexp_t result;
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 03/24] tests/qtest/qmp-cmd-test: Use inclusive language
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
  2020-09-16 11:47 ` [PULL 01/24] iotests: Drop readlink -f Thomas Huth
  2020-09-16 11:47 ` [PULL 02/24] fuzz: Change the way we write qtest log to stderr Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 04/24] tests/socket-helpers: Treat EAI_NONAME as EADDRNOTAVAIL Thomas Huth
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

We simply want to ignore certain queries here, so let's rather
use the term 'ignore' to express this intention.

Message-Id: <20200914163755.42618-1-thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/qtest/qmp-cmd-test.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/qtest/qmp-cmd-test.c b/tests/qtest/qmp-cmd-test.c
index 3109a9fe96..8a4c570e83 100644
--- a/tests/qtest/qmp-cmd-test.c
+++ b/tests/qtest/qmp-cmd-test.c
@@ -82,9 +82,9 @@ static void test_query(const void *data)
     qtest_quit(qts);
 }
 
-static bool query_is_blacklisted(const char *cmd)
+static bool query_is_ignored(const char *cmd)
 {
-    const char *blacklist[] = {
+    const char *ignored[] = {
         /* Not actually queries: */
         "add-fd",
         /* Success depends on target arch: */
@@ -101,8 +101,8 @@ static bool query_is_blacklisted(const char *cmd)
     };
     int i;
 
-    for (i = 0; blacklist[i]; i++) {
-        if (!strcmp(cmd, blacklist[i])) {
+    for (i = 0; ignored[i]; i++) {
+        if (!strcmp(cmd, ignored[i])) {
             return true;
         }
     }
@@ -179,7 +179,7 @@ static void add_query_tests(QmpSchema *schema)
             continue;
         }
 
-        if (query_is_blacklisted(si->name)) {
+        if (query_is_ignored(si->name)) {
             continue;
         }
 
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 04/24] tests/socket-helpers: Treat EAI_NONAME as EADDRNOTAVAIL
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (2 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 03/24] tests/qtest/qmp-cmd-test: Use inclusive language Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 05/24] Simplify the .gitignore file Thomas Huth
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

The tests/test-char test is currently always failing on my system since
the getaddrinfo() in socket_can_bind_connect() returns EAI_NONAME when
it is called from socket_check_protocol_support() to check for IPv6.
socket_check_protocol_support() then returns -1 and thus the tests are
not run at all - even though IPv4 is working fine.
socket_can_bind_connect() connect should return EADDRNOTAVAIL in this
case instead, so that socket_check_protocol_support() does not fail.

Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20200908121543.222872-1-thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/socket-helpers.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/socket-helpers.c b/tests/socket-helpers.c
index 19a51e887e..f704fd1a69 100644
--- a/tests/socket-helpers.c
+++ b/tests/socket-helpers.c
@@ -59,8 +59,7 @@ static int socket_can_bind_connect(const char *hostname, int family)
     /* lookup */
     rc = getaddrinfo(hostname, NULL, &ai, &res);
     if (rc != 0) {
-        if (rc == EAI_ADDRFAMILY ||
-            rc == EAI_FAMILY) {
+        if (rc == EAI_ADDRFAMILY || rc == EAI_FAMILY || rc == EAI_NONAME) {
             errno = EADDRNOTAVAIL;
         } else {
             errno = EINVAL;
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 05/24] Simplify the .gitignore file
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (3 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 04/24] tests/socket-helpers: Treat EAI_NONAME as EADDRNOTAVAIL Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-18 17:33   ` Peter Maydell
  2020-09-16 11:47 ` [PULL 06/24] qga/commands-win32: Fix problem with redundant protype declaration Thomas Huth
                   ` (20 subsequent siblings)
  25 siblings, 1 reply; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

Now that we always do out-of-tree builds (and the in-tree builds are
faked via a "build" directory), we can simplify out .gitignore file
quite a bit.

Message-Id: <20200909080305.258961-1-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 .gitignore | 152 -----------------------------------------------------
 1 file changed, 152 deletions(-)

diff --git a/.gitignore b/.gitignore
index b6fdd34ddf..5515f595e6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,163 +1,11 @@
 /GNUmakefile
 /build/
-/.doctrees
-/config-devices.*
-/config-host.*
-/config-target.*
-/config.status
-/config-temp
-/tools/virtiofsd/50-qemu-virtiofsd.json
-/elf2dmp
-/trace-events-all
-/trace/generated-events.h
-/trace/generated-events.c
-/trace/generated-helpers-wrappers.h
-/trace/generated-helpers.h
-/trace/generated-helpers.c
-/trace/generated-tcg-tracers.h
-/ui/shader/texture-blit-frag.h
-/ui/shader/texture-blit-vert.h
-/ui/shader/texture-blit-flip-vert.h
-/ui/input-keymap-*.c.inc
-*-timestamp
-/*-softmmu
-/*-darwin-user
-/*-linux-user
-/*-bsd-user
-/ivshmem-client
-/ivshmem-server
-/libdis*
-/libuser
-/linux-headers/asm
-/qga/qapi-generated
-/qapi-gen-timestamp
-/qapi/qapi-builtin-types.[ch]
-/qapi/qapi-builtin-visit.[ch]
-/qapi/qapi-commands-*.[ch]
-**/qapi/qapi-commands.[ch]
-**/qapi/qapi-emit-events.[ch]
-/qapi/qapi-events-*.[ch]
-**/qapi/qapi-events.[ch]
-**/qapi/qapi-init-commands.[ch]
-**/qapi/qapi-introspect.[ch]
-/qapi/qapi-types-*.[ch]
-**/qapi/qapi-types.[ch]
-/qapi/qapi-visit-*.[ch]
-!/qapi/qapi-visit-core.c
-**/qapi/qapi-visit.[ch]
-**/qapi/qapi-doc.texi
-/qemu-edid
-/qemu-img
-/qemu-nbd
-/qemu-options.def
-/qemu-options.texi
-/qemu-img-cmds.texi
-/qemu-img-cmds.h
-/qemu-io
-/qemu-ga
-/qemu-bridge-helper
-/qemu-keymap
-/qemu-monitor.texi
-/qemu-monitor-info.texi
-/qemu-storage-daemon
-/qemu-version.h
-/qemu-version.h.tmp
-/module_block.h
-/scsi/qemu-pr-helper
-/vhost-user-scsi
-/vhost-user-blk
-/vhost-user-gpu
-/vhost-user-input
-/fsdev/virtfs-proxy-helper
-*.tmp
-*.[1-9]
-*.a
-*.aux
-*.cp
-*.exe
-*.msi
-*.dll
-*.so
-*.fn
-*.ky
-*.log
-*.pdf
-*.pod
-*.cps
-*.fns
-*.kys
-*.pg
-*.pyc
-*.toc
-*.tp
-*.vr
-*.d
-!/.gitlab-ci.d
-!/scripts/qemu-guest-agent/fsfreeze-hook.d
-*.o
 .sdk
-*.gcda
-*.gcno
-*.gcov
-/pc-bios/bios-pq/status
-/pc-bios/edk2-*.fd
-/pc-bios/vgabios-pq/status
-/pc-bios/optionrom/linuxboot.asm
-/pc-bios/optionrom/linuxboot.bin
-/pc-bios/optionrom/linuxboot.raw
-/pc-bios/optionrom/linuxboot.img
-/pc-bios/optionrom/linuxboot_dma.asm
-/pc-bios/optionrom/linuxboot_dma.bin
-/pc-bios/optionrom/linuxboot_dma.raw
-/pc-bios/optionrom/linuxboot_dma.img
-/pc-bios/optionrom/pvh.asm
-/pc-bios/optionrom/pvh.bin
-/pc-bios/optionrom/pvh.raw
-/pc-bios/optionrom/pvh.img
-/pc-bios/optionrom/multiboot.asm
-/pc-bios/optionrom/multiboot.bin
-/pc-bios/optionrom/multiboot.raw
-/pc-bios/optionrom/multiboot.img
-/pc-bios/optionrom/kvmvapic.asm
-/pc-bios/optionrom/kvmvapic.bin
-/pc-bios/optionrom/kvmvapic.raw
-/pc-bios/optionrom/kvmvapic.img
-/pc-bios/s390-ccw/s390-ccw.elf
-/pc-bios/s390-ccw/s390-ccw.img
-/docs/built
-/docs/interop/qemu-ga-qapi.texi
-/docs/interop/qemu-ga-ref.html
-/docs/interop/qemu-ga-ref.info*
-/docs/interop/qemu-ga-ref.txt
-/docs/interop/qemu-qmp-qapi.texi
-/docs/interop/qemu-qmp-ref.html
-/docs/interop/qemu-qmp-ref.info*
-/docs/interop/qemu-qmp-ref.txt
-/docs/version.texi
-/contrib/vhost-user-gpu/50-qemu-gpu.json
-*.tps
 .stgit-*
 .git-submodule-status
 cscope.*
 tags
 TAGS
-docker-src.*
 *~
 *.ast_raw
 *.depend_raw
-trace.c
-trace-ust.h
-trace-ust.h
-trace-dtrace.h
-trace-dtrace.dtrace
-trace-root.h
-trace-root.c
-trace-ust-root.h
-trace-ust-root.h
-trace-ust-all.h
-trace-ust-all.c
-trace-dtrace-root.h
-trace-dtrace-root.dtrace
-trace-ust-all.h
-trace-ust-all.c
-/target/arm/decode-sve.c.inc
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 06/24] qga/commands-win32: Fix problem with redundant protype declaration
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (4 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 05/24] Simplify the .gitignore file Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 07/24] rcu: Implement drain_call_rcu Thomas Huth
                   ` (19 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

When compiling QEMU with MSYS2 on Windows, there is currently the
following error:

../qga/commands-win32.c:62:24: error: redundant redeclaration of
 'CM_Get_DevNode_PropertyW' [-Werror=redundant-decls]
   62 | CMAPI CONFIGRET WINAPI CM_Get_DevNode_PropertyW(
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../qga/commands-win32.c:26:
C:/tools/msys64/mingw64/x86_64-w64-mingw32/include/cfgmgr32.h:840:26: note:
 previous declaration of 'CM_Get_DevNode_PropertyW' was here
  840 |   CMAPI CONFIGRET WINAPI CM_Get_DevNode_PropertyW(DEVINST dnDevInst,
   const DEVPROPKEY *PropertyKey, DEVPROPTYPE *PropertyType, PBYTE PropertyBuffer,
   PULONG PropertyBufferSize, ULONG ulFlags);

Seems like this protype is sometimes available in the cfgmgr32.h
header, and sometimes not. Let's silence the compiler warning here
to let the build pass with -Werror, too.

Message-Id: <20200915114757.55635-1-thuth@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 qga/commands-win32.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 48d8bbe649..0c3c05484f 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -57,8 +57,10 @@ DEFINE_DEVPROPKEY(qga_DEVPKEY_Device_DriverDate, 0xa8b865dd, 0x2e3d,
 DEFINE_DEVPROPKEY(qga_DEVPKEY_Device_DriverVersion, 0xa8b865dd, 0x2e3d,
     0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 3);
     /* DEVPROP_TYPE_STRING */
-/* The following shoud be in cfgmgr32.h, but it isn't */
+/* The CM_Get_DevNode_PropertyW prototype is only sometimes in cfgmgr32.h */
 #ifndef CM_Get_DevNode_Property
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wredundant-decls"
 CMAPI CONFIGRET WINAPI CM_Get_DevNode_PropertyW(
     DEVINST          dnDevInst,
     CONST DEVPROPKEY * PropertyKey,
@@ -68,6 +70,7 @@ CMAPI CONFIGRET WINAPI CM_Get_DevNode_PropertyW(
     ULONG            ulFlags
 );
 #define CM_Get_DevNode_Property CM_Get_DevNode_PropertyW
+#pragma GCC diagnostic pop
 #endif
 
 #ifndef SHTDN_REASON_FLAG_PLANNED
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 07/24] rcu: Implement drain_call_rcu
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (5 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 06/24] qga/commands-win32: Fix problem with redundant protype declaration Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 08/24] tests: Convert g_free to g_autofree macro in test-logging.c Thomas Huth
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

From: Maxim Levitsky <mlevitsk@redhat.com>

This will allow is to preserve the semantics of hmp_device_del,
that the device is deleted immediatly which was changed by previos
patch that delayed this to RCU callback

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Suggested-by: Stefan Hajnoczi <stefanha@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200915121318.247-2-luoyonggang@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 include/qemu/rcu.h |  1 +
 util/rcu.c         | 55 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 56 insertions(+)

diff --git a/include/qemu/rcu.h b/include/qemu/rcu.h
index 570aa603eb..0e375ebe13 100644
--- a/include/qemu/rcu.h
+++ b/include/qemu/rcu.h
@@ -133,6 +133,7 @@ struct rcu_head {
 };
 
 extern void call_rcu1(struct rcu_head *head, RCUCBFunc *func);
+extern void drain_call_rcu(void);
 
 /* The operands of the minus operator must have the same type,
  * which must be the one that we specify in the cast.
diff --git a/util/rcu.c b/util/rcu.c
index 60a37f72c3..c4fefa9333 100644
--- a/util/rcu.c
+++ b/util/rcu.c
@@ -293,6 +293,61 @@ void call_rcu1(struct rcu_head *node, void (*func)(struct rcu_head *node))
     qemu_event_set(&rcu_call_ready_event);
 }
 
+
+struct rcu_drain {
+    struct rcu_head rcu;
+    QemuEvent drain_complete_event;
+};
+
+static void drain_rcu_callback(struct rcu_head *node)
+{
+    struct rcu_drain *event = (struct rcu_drain *)node;
+    qemu_event_set(&event->drain_complete_event);
+}
+
+/*
+ * This function ensures that all pending RCU callbacks
+ * on the current thread are done executing
+
+ * drops big qemu lock during the wait to allow RCU thread
+ * to process the callbacks
+ *
+ */
+
+void drain_call_rcu(void)
+{
+    struct rcu_drain rcu_drain;
+    bool locked = qemu_mutex_iothread_locked();
+
+    memset(&rcu_drain, 0, sizeof(struct rcu_drain));
+    qemu_event_init(&rcu_drain.drain_complete_event, false);
+
+    if (locked) {
+        qemu_mutex_unlock_iothread();
+    }
+
+
+    /*
+     * RCU callbacks are invoked in the same order as in which they
+     * are registered, thus we can be sure that when 'drain_rcu_callback'
+     * is called, all RCU callbacks that were registered on this thread
+     * prior to calling this function are completed.
+     *
+     * Note that since we have only one global queue of the RCU callbacks,
+     * we also end up waiting for most of RCU callbacks that were registered
+     * on the other threads, but this is a side effect that shoudn't be
+     * assumed.
+     */
+
+    call_rcu1(&rcu_drain.rcu, drain_rcu_callback);
+    qemu_event_wait(&rcu_drain.drain_complete_event);
+
+    if (locked) {
+        qemu_mutex_lock_iothread();
+    }
+
+}
+
 void rcu_register_thread(void)
 {
     assert(rcu_reader.ctr == 0);
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 08/24] tests: Convert g_free to g_autofree macro in test-logging.c
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (6 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 07/24] rcu: Implement drain_call_rcu Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 09/24] rcu: fixes test-logging.c by call drain_call_rcu before rmdir_full Thomas Huth
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

From: Yonggang Luo <luoyonggang@gmail.com>

g_autofree are prefer than g_free when possible.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20200915121318.247-17-luoyonggang@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/test-logging.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/test-logging.c b/tests/test-logging.c
index 8a1161de1d..783fe09a27 100644
--- a/tests/test-logging.c
+++ b/tests/test-logging.c
@@ -196,7 +196,7 @@ static void rmdir_full(gchar const *root)
 
 int main(int argc, char **argv)
 {
-    gchar *tmp_path = g_dir_make_tmp("qemu-test-logging.XXXXXX", NULL);
+    g_autofree gchar *tmp_path = g_dir_make_tmp("qemu-test-logging.XXXXXX", NULL);
     int rc;
 
     g_test_init(&argc, &argv, NULL);
@@ -212,6 +212,5 @@ int main(int argc, char **argv)
     rc = g_test_run();
 
     rmdir_full(tmp_path);
-    g_free(tmp_path);
     return rc;
 }
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 09/24] rcu: fixes test-logging.c by call drain_call_rcu before rmdir_full
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (7 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 08/24] tests: Convert g_free to g_autofree macro in test-logging.c Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 10/24] meson: Disable test-char on msys2/mingw for fixing tests stuck Thomas Huth
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

From: Yonggang Luo <luoyonggang@gmail.com>

drain_call_rcu is necessary on win32, because under win32, if you
don't close the file before remove it, the remove would be fail.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Message-Id: <20200915121318.247-23-luoyonggang@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/test-logging.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/test-logging.c b/tests/test-logging.c
index 783fe09a27..8b1522cfed 100644
--- a/tests/test-logging.c
+++ b/tests/test-logging.c
@@ -210,6 +210,8 @@ int main(int argc, char **argv)
                          tmp_path, test_logfile_lock);
 
     rc = g_test_run();
+    qemu_log_close();
+    drain_call_rcu();
 
     rmdir_full(tmp_path);
     return rc;
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 10/24] meson: Disable test-char on msys2/mingw for fixing tests stuck
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (8 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 09/24] rcu: fixes test-logging.c by call drain_call_rcu before rmdir_full Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 11/24] meson: disable crypto tests are empty under win32 Thomas Huth
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

From: Yonggang Luo <luoyonggang@gmail.com>

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Message-Id: <20200907200432.2418-3-luoyonggang@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/meson.build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/meson.build b/tests/meson.build
index dae8a77df1..82342a2f97 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -195,8 +195,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
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 11/24] meson: disable crypto tests are empty under win32
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (9 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 10/24] meson: Disable test-char on msys2/mingw for fixing tests stuck Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 12/24] tests: Fixes test-replication.c on msys2/mingw Thomas Huth
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

From: Yonggang Luo <luoyonggang@gmail.com>

Disable following tests on msys2/mingw
      'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
                                   tasn1, crypto],
      'test-crypto-tlssession': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c', 'crypto-tls-psk-helpers.c',
                                 tasn1, crypto],
      'test-io-channel-tls': ['io-channel-helpers.c', 'crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
                              tasn1, io, crypto]}
These tests are failure with:
ERROR test-crypto-tlscredsx509 - missing test plan
ERROR test-crypto-tlssession - missing test plan
ERROR test-io-channel-tls - missing test plan

Because on win32 those test case are all disabled.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Message-Id: <20200909094617.1582-12-luoyonggang@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/meson.build b/tests/meson.build
index 82342a2f97..8c3e930687 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -145,7 +145,8 @@ if have_block
     'test-crypto-block': [io],
   }
   if 'CONFIG_GNUTLS' in config_host and \
-     'CONFIG_TASN1' in config_host
+     'CONFIG_TASN1' in config_host and \
+     'CONFIG_POSIX' in config_host
     tests += {
       'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
                                    tasn1, crypto],
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 12/24] tests: Fixes test-replication.c on msys2/mingw.
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (10 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 11/24] meson: disable crypto tests are empty under win32 Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 13/24] tests: test-replication disable /replication/secondary/* " Thomas Huth
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

From: Yonggang Luo <luoyonggang@gmail.com>

On Windows there is no path like /tmp/s_local_disk.XXXXXX
Use g_get_tmp_dir instead of /tmp.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20200915121318.247-8-luoyonggang@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/test-replication.c | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/tests/test-replication.c b/tests/test-replication.c
index 9ab3666a90..e7cbd6b144 100644
--- a/tests/test-replication.c
+++ b/tests/test-replication.c
@@ -23,14 +23,14 @@
 
 /* primary */
 #define P_ID "primary-id"
-static char p_local_disk[] = "/tmp/p_local_disk.XXXXXX";
+static char *p_local_disk;
 
 /* secondary */
 #define S_ID "secondary-id"
 #define S_LOCAL_DISK_ID "secondary-local-disk-id"
-static char s_local_disk[] = "/tmp/s_local_disk.XXXXXX";
-static char s_active_disk[] = "/tmp/s_active_disk.XXXXXX";
-static char s_hidden_disk[] = "/tmp/s_hidden_disk.XXXXXX";
+static char *s_local_disk;
+static char *s_active_disk;
+static char *s_hidden_disk;
 
 /* FIXME: steal from blockdev.c */
 QemuOptsList qemu_drive_opts = {
@@ -571,6 +571,11 @@ static void setup_sigabrt_handler(void)
 int main(int argc, char **argv)
 {
     int ret;
+    const char *tmpdir = g_get_tmp_dir();
+    p_local_disk = g_strdup_printf("%s/p_local_disk.XXXXXX", tmpdir);
+    s_local_disk = g_strdup_printf("%s/s_local_disk.XXXXXX", tmpdir);
+    s_active_disk = g_strdup_printf("%s/s_active_disk.XXXXXX", tmpdir);
+    s_hidden_disk = g_strdup_printf("%s/s_hidden_disk.XXXXXX", tmpdir);
     qemu_init_main_loop(&error_fatal);
     bdrv_init();
 
@@ -605,5 +610,10 @@ int main(int argc, char **argv)
 
     cleanup_imgs();
 
+    g_free(p_local_disk);
+    g_free(s_local_disk);
+    g_free(s_active_disk);
+    g_free(s_hidden_disk);
+
     return ret;
 }
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 13/24] tests: test-replication disable /replication/secondary/* on msys2/mingw.
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (11 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 12/24] tests: Fixes test-replication.c on msys2/mingw Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 14/24] osdep: file locking functions are not available on Win32 Thomas Huth
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

From: Yonggang Luo <luoyonggang@gmail.com>

They caused failure on msys2/mingw, that's because file-win32.c not implement
.bdrv_reopen_prepare/commit/abort yet.

This is the error message:
> $ ./tests/test-replication.exe
> # random seed: R02S3f4d1c01af2b0a046990e0235c481faf
> 1..13
> # Start of replication tests
> # Start of primary tests
> ok 1 /replication/primary/read
> ok 2 /replication/primary/write
> ok 3 /replication/primary/start
> ok 4 /replication/primary/stop
> ok 5 /replication/primary/do_checkpoint
> ok 6 /replication/primary/get_error_all
> # End of primary tests
> # Start of secondary tests
> ok 7 /replication/secondary/read
> ok 8 /replication/secondary/write
> Unexpected error in bdrv_reopen_prepare() at ../block.c:4191:
> Block format 'file' used by node '#block4287' does not support reopening
> files

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20200915121318.247-9-luoyonggang@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/test-replication.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/test-replication.c b/tests/test-replication.c
index e7cbd6b144..b067240add 100644
--- a/tests/test-replication.c
+++ b/tests/test-replication.c
@@ -392,6 +392,7 @@ static void test_secondary_write(void)
     teardown_secondary();
 }
 
+#ifndef _WIN32
 static void test_secondary_start(void)
 {
     BlockBackend *top_blk, *local_blk;
@@ -546,6 +547,7 @@ static void test_secondary_get_error_all(void)
 
     teardown_secondary();
 }
+#endif
 
 static void sigabrt_handler(int signo)
 {
@@ -597,6 +599,7 @@ int main(int argc, char **argv)
     /* Secondary */
     g_test_add_func("/replication/secondary/read",  test_secondary_read);
     g_test_add_func("/replication/secondary/write", test_secondary_write);
+#ifndef _WIN32
     g_test_add_func("/replication/secondary/start", test_secondary_start);
     g_test_add_func("/replication/secondary/stop",  test_secondary_stop);
     g_test_add_func("/replication/secondary/continuous_replication",
@@ -605,6 +608,7 @@ int main(int argc, char **argv)
                     test_secondary_do_checkpoint);
     g_test_add_func("/replication/secondary/get_error_all",
                     test_secondary_get_error_all);
+#endif
 
     ret = g_test_run();
 
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 14/24] osdep: file locking functions are not available on Win32
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (12 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 13/24] tests: test-replication disable /replication/secondary/* " Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 15/24] meson: Use -b to ignore CR vs. CR-LF issues on Windows Thomas Huth
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

From: Yonggang Luo <luoyonggang@gmail.com>

Do not declare the following locking functions on Win32:
int qemu_lock_fd(int fd, int64_t start, int64_t len, bool exclusive);
int qemu_unlock_fd(int fd, int64_t start, int64_t len);
int qemu_lock_fd_test(int fd, int64_t start, int64_t len, bool exclusive);
bool qemu_has_ofd_lock(void);

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20200915121318.247-10-luoyonggang@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 include/qemu/osdep.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 412962d91a..e80fddd1e8 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -502,11 +502,11 @@ int qemu_close(int fd);
 int qemu_unlink(const char *name);
 #ifndef _WIN32
 int qemu_dup(int fd);
-#endif
 int qemu_lock_fd(int fd, int64_t start, int64_t len, bool exclusive);
 int qemu_unlock_fd(int fd, int64_t start, int64_t len);
 int qemu_lock_fd_test(int fd, int64_t start, int64_t len, bool exclusive);
 bool qemu_has_ofd_lock(void);
+#endif
 
 #if defined(__HAIKU__) && defined(__i386__)
 #define FMT_pid "%ld"
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 15/24] meson: Use -b to ignore CR vs. CR-LF issues on Windows
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (13 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 14/24] osdep: file locking functions are not available on Win32 Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 16/24] meson: remove empty else and duplicated gio deps Thomas Huth
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

From: Yonggang Luo <luoyonggang@gmail.com>

Ideally we would use the '--strip-trailing-cr' option, but not
being POSIX is a portability problem (i.e. BSDs and Solaris
based OSes). Instead use the '-b' option which, although doing
slightly more, produce the expected result on Windows."

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20200915121318.247-11-luoyonggang@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/qapi-schema/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qapi-schema/meson.build b/tests/qapi-schema/meson.build
index c87d141417..f1449298b0 100644
--- a/tests/qapi-schema/meson.build
+++ b/tests/qapi-schema/meson.build
@@ -220,6 +220,6 @@ qapi_doc = custom_target('QAPI doc',
 
 # "full_path()" needed here to work around
 # https://github.com/mesonbuild/meson/issues/7585
-test('QAPI doc', diff, args: ['-u', files('doc-good.texi'), qapi_doc[0].full_path()],
+test('QAPI doc', diff, args: ['-b', '-u', files('doc-good.texi'), qapi_doc[0].full_path()],
      depends: qapi_doc,
      suite: ['qapi-schema', 'qapi-doc'])
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 16/24] meson: remove empty else and duplicated gio deps
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (14 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 15/24] meson: Use -b to ignore CR vs. CR-LF issues on Windows Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 17/24] vmstate: Fixes test-vmstate.c on msys2/mingw Thomas Huth
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

From: Yonggang Luo <luoyonggang@gmail.com>

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20200915121318.247-14-luoyonggang@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 meson.build | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/meson.build b/meson.build
index bba766b4bc..f4d1ab1096 100644
--- a/meson.build
+++ b/meson.build
@@ -317,7 +317,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
@@ -344,11 +343,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
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 17/24] vmstate: Fixes test-vmstate.c on msys2/mingw
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (15 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 16/24] meson: remove empty else and duplicated gio deps Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 18/24] tests: Fixes test-io-channel-socket.c tests under msys2/mingw Thomas Huth
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

From: Yonggang Luo <luoyonggang@gmail.com>

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

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20200910103059.987-17-luoyonggang@gmail.com>
[thuth: Make indentation a little bit nicer]
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/test-vmstate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c
index 1c763015d0..a001879585 100644
--- a/tests/test-vmstate.c
+++ b/tests/test-vmstate.c
@@ -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;
 
 
@@ -1484,6 +1483,8 @@ 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);
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 18/24] tests: Fixes test-io-channel-socket.c tests under msys2/mingw
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (16 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 17/24] vmstate: Fixes test-vmstate.c on msys2/mingw Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 19/24] tests: fixes aio-win32 about aio_remove_fd_handler, get it consistence with aio-posix.c Thomas Huth
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

From: Yonggang Luo <luoyonggang@gmail.com>

Currently test-io-channel-socket doesn't init with
qemu_init_main_loop
and that's cause the qemu_aio_context not inited,
and the following is the stack when null pointer accessed:

qemu_fd_register (c:\work\xemu\qemu\util\main-loop.c:336)
qemu_try_set_nonblock (c:\work\xemu\qemu\util\oslib-win32.c:224)
qemu_set_nonblock (c:\work\xemu\qemu\util\oslib-win32.c:230)
socket_can_bind_connect (c:\work\xemu\qemu\tests\socket-helpers.c:93)
socket_check_protocol_support (c:\work\xemu\qemu\tests\socket-helpers.c:141)
main (c:\work\xemu\qemu\tests\test-io-channel-socket.c:568)
__tmainCRTStartup (@__tmainCRTStartup:142)
mainCRTStartup (@1400014f6..140001539:3)
BaseThreadInitThunk (@BaseThreadInitThunk:9)
RtlUserThreadStart (@RtlUserThreadStart:12)

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20200915121318.247-18-luoyonggang@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/test-io-channel-socket.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/test-io-channel-socket.c b/tests/test-io-channel-socket.c
index d43083a766..743577d744 100644
--- a/tests/test-io-channel-socket.c
+++ b/tests/test-io-channel-socket.c
@@ -25,6 +25,7 @@
 #include "socket-helpers.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
+#include "qemu/main-loop.h"
 
 
 static void test_io_channel_set_socket_bufs(QIOChannel *src,
@@ -556,6 +557,7 @@ int main(int argc, char **argv)
     bool has_ipv4, has_ipv6;
 
     module_call_init(MODULE_INIT_QOM);
+    qemu_init_main_loop(&error_abort);
     socket_init();
 
     g_test_init(&argc, &argv, NULL);
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 19/24] tests: fixes aio-win32 about aio_remove_fd_handler, get it consistence with aio-posix.c
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (17 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 18/24] tests: Fixes test-io-channel-socket.c tests under msys2/mingw Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 20/24] tests: Fixes test-io-channel-file by mask only owner file state mask bits Thomas Huth
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

From: Yonggang Luo <luoyonggang@gmail.com>

This is a fixes for
(C:\work\xemu\qemu\build\tests\test-aio-multithread.exe:19100): GLib-CRITICAL **: 23:03:24.965: g_source_remove_poll: assertion '!SOURCE_DESTROYED (source)' failed
ERROR test-aio-multithread - Bail out! GLib-FATAL-CRITICAL: g_source_remove_poll: assertion '!SOURCE_DESTROYED (source)' failed

(C:\work\xemu\qemu\build\tests\test-bdrv-drain.exe:21036): GLib-CRITICAL **: 23:03:29.861: g_source_remove_poll: assertion '!SOURCE_DESTROYED (source)' failed
ERROR test-bdrv-drain - Bail out! GLib-FATAL-CRITICAL: g_source_remove_poll: assertion '!SOURCE_DESTROYED (source)' failed

And the idea comes from https://patchwork.kernel.org/patch/9975239/

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Message-Id: <20200915171234.236-19-luoyonggang@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 util/aio-win32.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/util/aio-win32.c b/util/aio-win32.c
index 953c56ab48..49bd90e62e 100644
--- a/util/aio-win32.c
+++ b/util/aio-win32.c
@@ -37,6 +37,16 @@ struct AioHandler {
 
 static void aio_remove_fd_handler(AioContext *ctx, AioHandler *node)
 {
+    /*
+     * If the GSource is in the process of being destroyed then
+     * g_source_remove_poll() causes an assertion failure.  Skip
+     * removal in that case, because glib cleans up its state during
+     * destruction anyway.
+     */
+    if (!g_source_is_destroyed(&ctx->source)) {
+        g_source_remove_poll(&ctx->source, &node->pfd);
+    }
+
     /* If aio_poll is in progress, just mark the node as deleted */
     if (qemu_lockcnt_count(&ctx->list_lock)) {
         node->deleted = 1;
@@ -139,8 +149,6 @@ void aio_set_event_notifier(AioContext *ctx,
     /* Are we deleting the fd handler? */
     if (!io_notify) {
         if (node) {
-            g_source_remove_poll(&ctx->source, &node->pfd);
-
             aio_remove_fd_handler(ctx, node);
         }
     } else {
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 20/24] tests: Fixes test-io-channel-file by mask only owner file state mask bits
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (18 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 19/24] tests: fixes aio-win32 about aio_remove_fd_handler, get it consistence with aio-posix.c Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 21/24] tests: fix test-util-sockets.c Thomas Huth
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

From: Yonggang Luo <luoyonggang@gmail.com>

This is the error on msys2/mingw
Running test test-io-channel-file
**
ERROR:../tests/test-io-channel-file.c:59:test_io_channel_file_helper: assertion failed (TEST_MASK & ~mask == st.st_mode & 0777): (384 == 438)
ERROR test-io-channel-file - Bail out! ERROR:../tests/test-io-channel-file.c:59:test_io_channel_file_helper: assertion failed (TEST_MASK & ~mask == st.st_mode & 0777): (384 == 438)

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20200915171234.236-20-luoyonggang@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/test-io-channel-file.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/tests/test-io-channel-file.c b/tests/test-io-channel-file.c
index bac2b07562..0aa0477541 100644
--- a/tests/test-io-channel-file.c
+++ b/tests/test-io-channel-file.c
@@ -28,6 +28,16 @@
 #define TEST_FILE "tests/test-io-channel-file.txt"
 #define TEST_MASK 0600
 
+/*
+ * On Windows the stat() function in the C library checks only
+ * the FAT-style READONLY attribute and does not look at the ACL at all.
+ */
+#ifdef _WIN32
+#define TEST_MASK_EXPECT 0700
+#else
+#define TEST_MASK_EXPECT 0777
+#endif
+
 static void test_io_channel_file_helper(int flags)
 {
     QIOChannel *src, *dst;
@@ -56,7 +66,7 @@ static void test_io_channel_file_helper(int flags)
     umask(mask);
     ret = stat(TEST_FILE, &st);
     g_assert_cmpint(ret, >, -1);
-    g_assert_cmpuint(TEST_MASK & ~mask, ==, st.st_mode & 0777);
+    g_assert_cmpuint(TEST_MASK & ~mask, ==, st.st_mode & TEST_MASK_EXPECT);
 
     unlink(TEST_FILE);
     object_unref(OBJECT(src));
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 21/24] tests: fix test-util-sockets.c
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (19 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 20/24] tests: Fixes test-io-channel-file by mask only owner file state mask bits Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 22/24] tests: Fixes test-qdev-global-props.c Thomas Huth
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

From: Yonggang Luo <luoyonggang@gmail.com>

Fixes following errors:
Running test test-util-sockets
ERROR test-util-sockets - missing test plan

# Start of name tests
**
ERROR:../tests/test-util-sockets.c:93:test_socket_fd_pass_name_good: assertion failed (fd != -1): (-1 != -1)
Bail out! ERROR:../tests/test-util-sockets.c:93:test_socket_fd_pass_name_good: assertion failed (fd != -1): (-1 != -1)

First should call to qemu_init_main_loop before socket_init,
then on win32 doesn't support for SOCKET_ADDRESS_TYPE_FD socket type

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20200915121318.247-21-luoyonggang@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/test-util-sockets.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/test-util-sockets.c b/tests/test-util-sockets.c
index af9f5c0c70..1bbb16d9b1 100644
--- a/tests/test-util-sockets.c
+++ b/tests/test-util-sockets.c
@@ -75,7 +75,7 @@ int monitor_vprintf(Monitor *mon, const char *fmt, va_list ap) { abort(); }
 void monitor_init_qmp(Chardev *chr, bool pretty, Error **errp) {}
 void monitor_init_hmp(Chardev *chr, bool use_readline, Error **errp) {}
 
-
+#ifndef _WIN32
 static void test_socket_fd_pass_name_good(void)
 {
     SocketAddress addr;
@@ -227,6 +227,7 @@ static void test_socket_fd_pass_num_nocli(void)
 
     g_free(addr.u.fd.str);
 }
+#endif
 
 #ifdef __linux__
 static gchar *abstract_sock_name;
@@ -321,6 +322,7 @@ int main(int argc, char **argv)
 {
     bool has_ipv4, has_ipv6;
 
+    qemu_init_main_loop(&error_abort);
     socket_init();
 
     g_test_init(&argc, &argv, NULL);
@@ -340,6 +342,7 @@ int main(int argc, char **argv)
                         test_fd_is_socket_bad);
         g_test_add_func("/util/socket/is-socket/good",
                         test_fd_is_socket_good);
+#ifndef _WIN32
         g_test_add_func("/socket/fd-pass/name/good",
                         test_socket_fd_pass_name_good);
         g_test_add_func("/socket/fd-pass/name/bad",
@@ -352,6 +355,7 @@ int main(int argc, char **argv)
                         test_socket_fd_pass_num_bad);
         g_test_add_func("/socket/fd-pass/num/nocli",
                         test_socket_fd_pass_num_nocli);
+#endif
     }
 
 #ifdef __linux__
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 22/24] tests: Fixes test-qdev-global-props.c
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (20 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 21/24] tests: fix test-util-sockets.c Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 23/24] ci: Enable msys2 ci in cirrus Thomas Huth
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

From: Yonggang Luo <luoyonggang@gmail.com>

On win32 the line ending are \r\n, so we skip the \n in function test_dynamic_globalprop

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20200915171234.236-22-luoyonggang@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/test-qdev-global-props.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/test-qdev-global-props.c b/tests/test-qdev-global-props.c
index 8a3c14d92c..c8862cac5f 100644
--- a/tests/test-qdev-global-props.c
+++ b/tests/test-qdev-global-props.c
@@ -251,10 +251,13 @@ static void test_dynamic_globalprop(void)
     g_test_trap_assert_passed();
     g_test_trap_assert_stderr_unmatched("*prop1*");
     g_test_trap_assert_stderr_unmatched("*prop2*");
-    g_test_trap_assert_stderr("*warning: global dynamic-prop-type-bad.prop3 has invalid class name\n*");
+    g_test_trap_assert_stderr(
+        "*warning: global dynamic-prop-type-bad.prop3 has invalid class name*");
     g_test_trap_assert_stderr_unmatched("*prop4*");
-    g_test_trap_assert_stderr("*warning: global nohotplug-type.prop5=105 not used\n*");
-    g_test_trap_assert_stderr("*warning: global nondevice-type.prop6 has invalid class name\n*");
+    g_test_trap_assert_stderr(
+        "*warning: global nohotplug-type.prop5=105 not used*");
+    g_test_trap_assert_stderr(
+        "*warning: global nondevice-type.prop6 has invalid class name*");
     g_test_trap_assert_stdout("");
 }
 
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 23/24] ci: Enable msys2 ci in cirrus
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (21 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 22/24] tests: Fixes test-qdev-global-props.c Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-16 11:47 ` [PULL 24/24] cirrus: Building freebsd in a single shot Thomas Huth
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

From: Yonggang Luo <luoyonggang@gmail.com>

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 use environment variable settings:
    MSYS: winsymlinks:nativestrict
    MSYSTEM: MINGW64
    CHERE_INVOKING: 1
to opening mingw64 native shell.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20200915121318.247-25-luoyonggang@gmail.com>
[thuth: Add --target-list-exclude to speed it up a little bit, and
        add capstone package to avoid build failure with internal capstone]
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 .cirrus.yml | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)

diff --git a/.cirrus.yml b/.cirrus.yml
index 3dd9fcff7f..e5feb53b54 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -63,3 +63,66 @@ 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 --noconfirm -Sy"
+    - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -S --needed
+        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-capstone
+        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-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-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-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
+      --target-list-exclude=i386-softmmu,arm-softmmu,ppc-softmmu,mips-softmmu"
+    - 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"
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* [PULL 24/24] cirrus: Building freebsd in a single shot
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (22 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 23/24] ci: Enable msys2 ci in cirrus Thomas Huth
@ 2020-09-16 11:47 ` Thomas Huth
  2020-09-17 13:46 ` [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Peter Maydell
  2020-09-17 15:14 ` Peter Maydell
  25 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-16 11:47 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell; +Cc: Yonggang Luo

From: Yonggang Luo <luoyonggang@gmail.com>

This reverts commit 45f7b7b9f38f5c4d1529a37c93dedfc26a231bba
("cirrus.yml: Split FreeBSD job into two parts").

freebsd 1 hour limit not hit anymore

I think we going to a wrong direction, I think there is some tests a stall the test runner,
please look at
https://cirrus-ci.com/task/5110577531977728
When its running properly, the consumed time are little, but when tests running too long,
look at the cpu usage, the cpu usage are nearly zero. doesn't consuming time.

And look at
https://cirrus-ci.com/task/6119341601062912

If the tests running properly, the time consuming are little
We should not hide the error by split them

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Ed Maste <emaste@FreeBSD.org>
Message-Id: <20200915121318.247-16-luoyonggang@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 .cirrus.yml | 35 ++++++++---------------------------
 1 file changed, 8 insertions(+), 27 deletions(-)

diff --git a/.cirrus.yml b/.cirrus.yml
index e5feb53b54..d58782ce67 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -1,38 +1,19 @@
 env:
   CIRRUS_CLONE_DEPTH: 1
 
-freebsd_1st_task:
+freebsd_12_task:
   freebsd_instance:
     image_family: freebsd-12-1
-    cpu: 4
-    memory: 4G
-  install_script: ASSUME_ALWAYS_YES=yes pkg bootstrap -f ; pkg install -y
-    bash curl cyrus-sasl git glib gmake gnutls gsed
-    nettle perl5 pixman pkgconf png usbredir
+    cpu: 8
+    memory: 8G
+  install_script:
+    - ASSUME_ALWAYS_YES=yes pkg bootstrap -f ;
+    - pkg install -y bash curl cyrus-sasl git glib gmake gnutls gsed
+          nettle perl5 pixman pkgconf png usbredir
   script:
     - mkdir build
     - cd build
-    - ../configure --disable-user --target-list-exclude='alpha-softmmu
-        ppc64-softmmu ppc-softmmu riscv32-softmmu riscv64-softmmu s390x-softmmu
-        sparc64-softmmu sparc-softmmu x86_64-softmmu i386-softmmu'
-        --enable-werror || { cat config.log; exit 1; }
-    - gmake -j$(sysctl -n hw.ncpu)
-    - gmake -j$(sysctl -n hw.ncpu) check
-
-freebsd_2nd_task:
-  freebsd_instance:
-    image_family: freebsd-12-1
-    cpu: 4
-    memory: 4G
-  install_script: ASSUME_ALWAYS_YES=yes pkg bootstrap -f ; pkg install -y
-    bash curl cyrus-sasl git glib gmake gnutls gtk3 gsed libepoxy mesa-libs
-    nettle perl5 pixman pkgconf png SDL2 usbredir
-  script:
-    - ./configure --enable-werror --target-list='alpha-softmmu ppc64-softmmu
-        ppc-softmmu riscv32-softmmu riscv64-softmmu s390x-softmmu
-        sparc64-softmmu sparc-softmmu x86_64-softmmu i386-softmmu
-        sparc-bsd-user sparc64-bsd-user x86_64-bsd-user i386-bsd-user'
-        || { cat config.log; exit 1; }
+    - ../configure --enable-werror || { cat config.log; exit 1; }
     - gmake -j$(sysctl -n hw.ncpu)
     - gmake -j$(sysctl -n hw.ncpu) check
 
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 36+ messages in thread

* Re: [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (23 preceding siblings ...)
  2020-09-16 11:47 ` [PULL 24/24] cirrus: Building freebsd in a single shot Thomas Huth
@ 2020-09-17 13:46 ` Peter Maydell
  2020-09-17 14:40   ` 罗勇刚(Yonggang Luo)
  2020-09-17 15:14 ` Peter Maydell
  25 siblings, 1 reply; 36+ messages in thread
From: Peter Maydell @ 2020-09-17 13:46 UTC (permalink / raw)
  To: Thomas Huth; +Cc: Yonggang Luo, QEMU Developers

On Wed, 16 Sep 2020 at 12:47, Thomas Huth <thuth@redhat.com> wrote:
>
>  Hi Peter,
>
> the following changes since commit de39a045bd8d2b49e4f3d07976622c29d58e0bac:
>
>   Merge remote-tracking branch 'remotes/kraxel/tags/vga-20200915-pull-request' into staging (2020-09-15 14:25:05 +0100)
>
> are available in the Git repository at:
>
>   https://gitlab.com/huth/qemu.git tags/pull-request-2020-09-16
>
> for you to fetch changes up to 114daec31d64600e5a070abcdb8de2cf74d01e94:
>
>   cirrus: Building freebsd in a single shot (2020-09-16 12:15:07 +0200)
>
> ----------------------------------------------------------------
> * Fix "readlink -f" problem in iotests on macOS (to fix the Cirrus-CI tests)
> * Some minor qtest improvements
> * Fix the unit tests to work on MSYS2, too
> * Enable building and testing on MSYS2 in the Cirrus-CI
> * Build FreeBSD with one task again in the Cirrus-CI
> ----------------------------------------------------------------


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.2
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements
  2020-09-17 13:46 ` [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Peter Maydell
@ 2020-09-17 14:40   ` 罗勇刚(Yonggang Luo)
  2020-09-17 15:12     ` Thomas Huth
  0 siblings, 1 reply; 36+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2020-09-17 14:40 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Thomas Huth, QEMU Developers

[-- Attachment #1: Type: text/plain, Size: 1795 bytes --]

On Thu, Sep 17, 2020 at 9:46 PM Peter Maydell <peter.maydell@linaro.org>
wrote:
>
> On Wed, 16 Sep 2020 at 12:47, Thomas Huth <thuth@redhat.com> wrote:
> >
> >  Hi Peter,
> >
> > the following changes since commit
de39a045bd8d2b49e4f3d07976622c29d58e0bac:
> >
> >   Merge remote-tracking branch
'remotes/kraxel/tags/vga-20200915-pull-request' into staging (2020-09-15
14:25:05 +0100)
> >
> > are available in the Git repository at:
> >
> >   https://gitlab.com/huth/qemu.git tags/pull-request-2020-09-16
> >
> > for you to fetch changes up to 114daec31d64600e5a070abcdb8de2cf74d01e94:
> >
> >   cirrus: Building freebsd in a single shot (2020-09-16 12:15:07 +0200)
> >
> > ----------------------------------------------------------------
> > * Fix "readlink -f" problem in iotests on macOS (to fix the Cirrus-CI
tests)
> > * Some minor qtest improvements
> > * Fix the unit tests to work on MSYS2, too
> > * Enable building and testing on MSYS2 in the Cirrus-CI
> > * Build FreeBSD with one task again in the Cirrus-CI
> > ----------------------------------------------------------------
>
>
> Applied, thanks.
>
> Please update the changelog at https://wiki.qemu.org/ChangeLog/5.2
> for any user-visible changes.
>
> -- PMM

cirrus are too slow:
```

pm215 Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2…
…
5e0a8fd2 hours ago

Git stats

 80,622 commits
--

after two hours still not finished.

Github have far more hardware resources. except doesn't have freebsd.
When I using github with wind32, it's running around 1hour with full
build(all target build).
That's because when trigger github ci, it's will allocating resouce
instantly

         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

[-- Attachment #2: Type: text/html, Size: 2407 bytes --]

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements
  2020-09-17 14:40   ` 罗勇刚(Yonggang Luo)
@ 2020-09-17 15:12     ` Thomas Huth
  0 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-17 15:12 UTC (permalink / raw)
  To: luoyonggang, Peter Maydell; +Cc: QEMU Developers

On 17/09/2020 16.40, 罗勇刚(Yonggang Luo) wrote:
> 
> 
> On Thu, Sep 17, 2020 at 9:46 PM Peter Maydell <peter.maydell@linaro.org
> <mailto:peter.maydell@linaro.org>> wrote:
>>
>> On Wed, 16 Sep 2020 at 12:47, Thomas Huth <thuth@redhat.com
> <mailto:thuth@redhat.com>> wrote:
>> >
>> >  Hi Peter,
>> >
>> > the following changes since commit
> de39a045bd8d2b49e4f3d07976622c29d58e0bac:
>> >
>> >   Merge remote-tracking branch
> 'remotes/kraxel/tags/vga-20200915-pull-request' into staging (2020-09-15
> 14:25:05 +0100)
>> >
>> > are available in the Git repository at:
>> >
>> >   https://gitlab.com/huth/qemu.git tags/pull-request-2020-09-16
>> >
>> > for you to fetch changes up to 114daec31d64600e5a070abcdb8de2cf74d01e94:
>> >
>> >   cirrus: Building freebsd in a single shot (2020-09-16 12:15:07 +0200)
>> >
>> > ----------------------------------------------------------------
>> > * Fix "readlink -f" problem in iotests on macOS (to fix the
> Cirrus-CI tests)
>> > * Some minor qtest improvements
>> > * Fix the unit tests to work on MSYS2, too
>> > * Enable building and testing on MSYS2 in the Cirrus-CI
>> > * Build FreeBSD with one task again in the Cirrus-CI
>> > ----------------------------------------------------------------
>>
>>
>> Applied, thanks.
>>
>> Please update the changelog at https://wiki.qemu.org/ChangeLog/5.2
>> for any user-visible changes.
>>
>> -- PMM
> 
> cirrus are too slow:
> ```
> 
> pm215 Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2…
> …
> 5e0a8fd2 hours ago
> 
> Git stats
> 
>  80,622 commits
> --
> 
> after two hours still not finished.

It now finished successfully:

 https://cirrus-ci.com/task/6178816496238592

Sometimes you just have to be a little bit patient :-)

 Thomas



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements
  2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
                   ` (24 preceding siblings ...)
  2020-09-17 13:46 ` [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Peter Maydell
@ 2020-09-17 15:14 ` Peter Maydell
  2020-09-17 15:28   ` Thomas Huth
  25 siblings, 1 reply; 36+ messages in thread
From: Peter Maydell @ 2020-09-17 15:14 UTC (permalink / raw)
  To: Thomas Huth; +Cc: Yonggang Luo, QEMU Developers

On Wed, 16 Sep 2020 at 12:47, Thomas Huth <thuth@redhat.com> wrote:
> ----------------------------------------------------------------
> * Fix "readlink -f" problem in iotests on macOS (to fix the Cirrus-CI tests)
> * Some minor qtest improvements
> * Fix the unit tests to work on MSYS2, too
> * Enable building and testing on MSYS2 in the Cirrus-CI
> * Build FreeBSD with one task again in the Cirrus-CI
> ----------------------------------------------------------------

After merging this one I tried installing GNU sed on my local
box so it could run the iotests, but they fail like this
because they assume readarray, which doesn't exist in
OSX bash:

--- /Users/pm215/src/qemu-for-merges/tests/qemu-iotests/001.out
2015-09-29 16:54:34.000000000 +0100
+++ /Users/pm215/src/qemu-for-merges/build/all/tests/qemu-iotests/001.out.bad
  2020-09-17 15:03:22.000000000 +0100
@@ -1,5 +1,6 @@
 QA output created by 001
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
+./common.filter: line 142: readarray: command not found
+, fmt=

thanks
-- PMM


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements
  2020-09-17 15:14 ` Peter Maydell
@ 2020-09-17 15:28   ` Thomas Huth
  2020-09-17 15:30     ` Peter Maydell
  2020-09-17 16:33     ` 罗勇刚(Yonggang Luo)
  0 siblings, 2 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-17 15:28 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Yonggang Luo, QEMU Developers

On 17/09/2020 17.14, Peter Maydell wrote:
> On Wed, 16 Sep 2020 at 12:47, Thomas Huth <thuth@redhat.com> wrote:
>> ----------------------------------------------------------------
>> * Fix "readlink -f" problem in iotests on macOS (to fix the Cirrus-CI tests)
>> * Some minor qtest improvements
>> * Fix the unit tests to work on MSYS2, too
>> * Enable building and testing on MSYS2 in the Cirrus-CI
>> * Build FreeBSD with one task again in the Cirrus-CI
>> ----------------------------------------------------------------
> 
> After merging this one I tried installing GNU sed on my local
> box so it could run the iotests, but they fail like this
> because they assume readarray, which doesn't exist in
> OSX bash
Ok, sounds like I should respin my patch here:

https://lists.gnu.org/archive/html/qemu-devel/2020-09/msg04476.html

... and could you install a newer version of bash via homebrew on your
system?

 Thomas



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements
  2020-09-17 15:28   ` Thomas Huth
@ 2020-09-17 15:30     ` Peter Maydell
  2020-09-18 11:32       ` Thomas Huth
  2020-09-17 16:33     ` 罗勇刚(Yonggang Luo)
  1 sibling, 1 reply; 36+ messages in thread
From: Peter Maydell @ 2020-09-17 15:30 UTC (permalink / raw)
  To: Thomas Huth; +Cc: Yonggang Luo, QEMU Developers

On Thu, 17 Sep 2020 at 16:29, Thomas Huth <thuth@redhat.com> wrote:
> Ok, sounds like I should respin my patch here:
>
> https://lists.gnu.org/archive/html/qemu-devel/2020-09/msg04476.html
>
> ... and could you install a newer version of bash via homebrew on your
> system?

I could in theory, but I don't really want to replace the system bash,
because this machine is not solely there to run the QEMU tests.

thanks
-- PMM


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements
  2020-09-17 15:28   ` Thomas Huth
  2020-09-17 15:30     ` Peter Maydell
@ 2020-09-17 16:33     ` 罗勇刚(Yonggang Luo)
  2020-09-17 16:40       ` Thomas Huth
  1 sibling, 1 reply; 36+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2020-09-17 16:33 UTC (permalink / raw)
  To: Thomas Huth; +Cc: Peter Maydell, QEMU Developers

[-- Attachment #1: Type: text/plain, Size: 1341 bytes --]

On Thu, Sep 17, 2020 at 11:29 PM Thomas Huth <thuth@redhat.com> wrote:
>
> On 17/09/2020 17.14, Peter Maydell wrote:
> > On Wed, 16 Sep 2020 at 12:47, Thomas Huth <thuth@redhat.com> wrote:
> >> ----------------------------------------------------------------
> >> * Fix "readlink -f" problem in iotests on macOS (to fix the Cirrus-CI
tests)
> >> * Some minor qtest improvements
> >> * Fix the unit tests to work on MSYS2, too
> >> * Enable building and testing on MSYS2 in the Cirrus-CI
> >> * Build FreeBSD with one task again in the Cirrus-CI
> >> ----------------------------------------------------------------
> >
> > After merging this one I tried installing GNU sed on my local
> > box so it could run the iotests, but they fail like this
> > because they assume readarray, which doesn't exist in
> > OSX bash
> Ok, sounds like I should respin my patch here:
>
> https://lists.gnu.org/archive/html/qemu-devel/2020-09/msg04476.html
>
> ... and could you install a newer version of bash via homebrew on your
> system?
What's the reason to exclude these list on win32? That's didn't optimize
the time much, and indeed they can be
compiled.
--target-list-exclude=i386-softmmu,arm-softmmu,ppc-softmmu,mips-softmmu"

>
>  Thomas
>


--
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

[-- Attachment #2: Type: text/html, Size: 1798 bytes --]

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements
  2020-09-17 16:33     ` 罗勇刚(Yonggang Luo)
@ 2020-09-17 16:40       ` Thomas Huth
  0 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-17 16:40 UTC (permalink / raw)
  To: luoyonggang; +Cc: Peter Maydell, QEMU Developers

On 17/09/2020 18.33, 罗勇刚(Yonggang Luo) wrote:
> 
> 
> On Thu, Sep 17, 2020 at 11:29 PM Thomas Huth <thuth@redhat.com
> <mailto:thuth@redhat.com>> wrote:
>>
>> On 17/09/2020 17.14, Peter Maydell wrote:
>> > On Wed, 16 Sep 2020 at 12:47, Thomas Huth <thuth@redhat.com
> <mailto:thuth@redhat.com>> wrote:
>> >> ----------------------------------------------------------------
>> >> * Fix "readlink -f" problem in iotests on macOS (to fix the
> Cirrus-CI tests)
>> >> * Some minor qtest improvements
>> >> * Fix the unit tests to work on MSYS2, too
>> >> * Enable building and testing on MSYS2 in the Cirrus-CI
>> >> * Build FreeBSD with one task again in the Cirrus-CI
>> >> ----------------------------------------------------------------
>> >
>> > After merging this one I tried installing GNU sed on my local
>> > box so it could run the iotests, but they fail like this
>> > because they assume readarray, which doesn't exist in
>> > OSX bash
>> Ok, sounds like I should respin my patch here:
>>
>> https://lists.gnu.org/archive/html/qemu-devel/2020-09/msg04476.html
>>
>> ... and could you install a newer version of bash via homebrew on your
>> system?
> What's the reason to exclude these list on win32? That's didn't optimize
> the time much, and indeed they can be
> compiled.
> --target-list-exclude=i386-softmmu,arm-softmmu,ppc-softmmu,mips-softmmu"

The total run time of the job is already 50 minutes, so I was afraid
that it would hit the 1h time limit otherwise.
The targets that are excluded are just subsets of other targets, e.g.
i386-softmmu is a subset of x86_64-softmmu, so we don't lose much test
coverage by excluding them.

 Thomas



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements
  2020-09-17 15:30     ` Peter Maydell
@ 2020-09-18 11:32       ` Thomas Huth
  0 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-18 11:32 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Yonggang Luo, QEMU Developers

On 17/09/2020 17.30, Peter Maydell wrote:
> On Thu, 17 Sep 2020 at 16:29, Thomas Huth <thuth@redhat.com> wrote:
>> Ok, sounds like I should respin my patch here:
>>
>> https://lists.gnu.org/archive/html/qemu-devel/2020-09/msg04476.html
>>
>> ... and could you install a newer version of bash via homebrew on your
>> system?
> 
> I could in theory, but I don't really want to replace the system bash,
> because this machine is not solely there to run the QEMU tests.

Would it maybe be possible to install it in a different location, and
only use it for your merge tests?

 Thomas



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PULL 05/24] Simplify the .gitignore file
  2020-09-16 11:47 ` [PULL 05/24] Simplify the .gitignore file Thomas Huth
@ 2020-09-18 17:33   ` Peter Maydell
  2020-09-19 10:12     ` Thomas Huth
  0 siblings, 1 reply; 36+ messages in thread
From: Peter Maydell @ 2020-09-18 17:33 UTC (permalink / raw)
  To: Thomas Huth; +Cc: Yonggang Luo, QEMU Developers

On Wed, 16 Sep 2020 at 12:47, Thomas Huth <thuth@redhat.com> wrote:
>
> Now that we always do out-of-tree builds (and the in-tree builds are
> faked via a "build" directory), we can simplify out .gitignore file
> quite a bit.
>
> Message-Id: <20200909080305.258961-1-thuth@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  .gitignore | 152 -----------------------------------------------------
>  1 file changed, 152 deletions(-)

This change removed .pyc files from the set of things we
ignore:

> -*.pyc

But the meson build still runs python scripts which live in
the source tree, which means python still dumps its bytecode
files in the source tree too, and they appear in 'git status' now:

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        docs/sphinx/__pycache__/
        scripts/qapi/__pycache__/
        scripts/tracetool/__pycache__/
        scripts/tracetool/backend/__pycache__/
        scripts/tracetool/format/__pycache__/

So I think we should put *.pyc back into .gitignore.

thanks
-- PMM


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [PULL 05/24] Simplify the .gitignore file
  2020-09-18 17:33   ` Peter Maydell
@ 2020-09-19 10:12     ` Thomas Huth
  0 siblings, 0 replies; 36+ messages in thread
From: Thomas Huth @ 2020-09-19 10:12 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Yonggang Luo, QEMU Developers

On 18/09/2020 19.33, Peter Maydell wrote:
> On Wed, 16 Sep 2020 at 12:47, Thomas Huth <thuth@redhat.com> wrote:
>>
>> Now that we always do out-of-tree builds (and the in-tree builds are
>> faked via a "build" directory), we can simplify out .gitignore file
>> quite a bit.
>>
>> Message-Id: <20200909080305.258961-1-thuth@redhat.com>
>> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>  .gitignore | 152 -----------------------------------------------------
>>  1 file changed, 152 deletions(-)
> 
> This change removed .pyc files from the set of things we
> ignore:
> 
>> -*.pyc
> 
> But the meson build still runs python scripts which live in
> the source tree, which means python still dumps its bytecode
> files in the source tree too, and they appear in 'git status' now:
> 
> Untracked files:
>   (use "git add <file>..." to include in what will be committed)
> 
>         docs/sphinx/__pycache__/
>         scripts/qapi/__pycache__/
>         scripts/tracetool/__pycache__/
>         scripts/tracetool/backend/__pycache__/
>         scripts/tracetool/format/__pycache__/
> 
> So I think we should put *.pyc back into .gitignore.

Ooops, you're right. I'll send a patch.

 Thomas



^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2020-09-19 10:13 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16 11:47 [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Thomas Huth
2020-09-16 11:47 ` [PULL 01/24] iotests: Drop readlink -f Thomas Huth
2020-09-16 11:47 ` [PULL 02/24] fuzz: Change the way we write qtest log to stderr Thomas Huth
2020-09-16 11:47 ` [PULL 03/24] tests/qtest/qmp-cmd-test: Use inclusive language Thomas Huth
2020-09-16 11:47 ` [PULL 04/24] tests/socket-helpers: Treat EAI_NONAME as EADDRNOTAVAIL Thomas Huth
2020-09-16 11:47 ` [PULL 05/24] Simplify the .gitignore file Thomas Huth
2020-09-18 17:33   ` Peter Maydell
2020-09-19 10:12     ` Thomas Huth
2020-09-16 11:47 ` [PULL 06/24] qga/commands-win32: Fix problem with redundant protype declaration Thomas Huth
2020-09-16 11:47 ` [PULL 07/24] rcu: Implement drain_call_rcu Thomas Huth
2020-09-16 11:47 ` [PULL 08/24] tests: Convert g_free to g_autofree macro in test-logging.c Thomas Huth
2020-09-16 11:47 ` [PULL 09/24] rcu: fixes test-logging.c by call drain_call_rcu before rmdir_full Thomas Huth
2020-09-16 11:47 ` [PULL 10/24] meson: Disable test-char on msys2/mingw for fixing tests stuck Thomas Huth
2020-09-16 11:47 ` [PULL 11/24] meson: disable crypto tests are empty under win32 Thomas Huth
2020-09-16 11:47 ` [PULL 12/24] tests: Fixes test-replication.c on msys2/mingw Thomas Huth
2020-09-16 11:47 ` [PULL 13/24] tests: test-replication disable /replication/secondary/* " Thomas Huth
2020-09-16 11:47 ` [PULL 14/24] osdep: file locking functions are not available on Win32 Thomas Huth
2020-09-16 11:47 ` [PULL 15/24] meson: Use -b to ignore CR vs. CR-LF issues on Windows Thomas Huth
2020-09-16 11:47 ` [PULL 16/24] meson: remove empty else and duplicated gio deps Thomas Huth
2020-09-16 11:47 ` [PULL 17/24] vmstate: Fixes test-vmstate.c on msys2/mingw Thomas Huth
2020-09-16 11:47 ` [PULL 18/24] tests: Fixes test-io-channel-socket.c tests under msys2/mingw Thomas Huth
2020-09-16 11:47 ` [PULL 19/24] tests: fixes aio-win32 about aio_remove_fd_handler, get it consistence with aio-posix.c Thomas Huth
2020-09-16 11:47 ` [PULL 20/24] tests: Fixes test-io-channel-file by mask only owner file state mask bits Thomas Huth
2020-09-16 11:47 ` [PULL 21/24] tests: fix test-util-sockets.c Thomas Huth
2020-09-16 11:47 ` [PULL 22/24] tests: Fixes test-qdev-global-props.c Thomas Huth
2020-09-16 11:47 ` [PULL 23/24] ci: Enable msys2 ci in cirrus Thomas Huth
2020-09-16 11:47 ` [PULL 24/24] cirrus: Building freebsd in a single shot Thomas Huth
2020-09-17 13:46 ` [PULL 00/24] qtests, unit tests and Cirrus-CI fixes / improvements Peter Maydell
2020-09-17 14:40   ` 罗勇刚(Yonggang Luo)
2020-09-17 15:12     ` Thomas Huth
2020-09-17 15:14 ` Peter Maydell
2020-09-17 15:28   ` Thomas Huth
2020-09-17 15:30     ` Peter Maydell
2020-09-18 11:32       ` Thomas Huth
2020-09-17 16:33     ` 罗勇刚(Yonggang Luo)
2020-09-17 16:40       ` Thomas Huth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.