All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 00/11] Green the msys2 CI make
@ 2020-09-05  6:23 Yonggang Luo
  2020-09-05  6:23 ` [PATCH v5 01/11] Revert "configure: add --ninja option" Yonggang Luo
                   ` (10 more replies)
  0 siblings, 11 replies; 24+ messages in thread
From: Yonggang Luo @ 2020-09-05  6:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, QEMU Block, Stefan Weil, Peter Lieven, Yonggang Luo,
	Paolo Bonzini, Alex Bennée

Also it's fixes issues about make check

Yonggang Luo (11):
  Revert "configure: add --ninja option"
  block: Fixes nfs on msys2/mingw
  ci: fixes msys2 build by upgrading capstone to 4.0.2
  meson: upgrade meson for execute custom ninjatool under msys2 properly
  ci: Enable msys2 ci in cirrus
  tests: Trying fixes test-replication.c on msys2.
  block: get file-win32.c handle locking option consistence with
    file-posix.c
  osdep: These function are only available on Non-Win32 system.
  meson: Fixes qapi tests.
  docker: Add win32/msys2/mingw64 docker
  ci: Enable Github actions.

 .cirrus.yml                           | 24 +++++++++++++++++++
 .github/workflows/main.yml            | 31 +++++++++++++++++++++++++
 block/file-win32.c                    | 23 +++++++++++++++++--
 block/nfs.c                           | 26 +++++++++++++--------
 capstone                              |  2 +-
 configure                             | 18 ++-------------
 include/qemu/osdep.h                  |  2 +-
 meson                                 |  2 +-
 scripts/ci/windows/msys2-build.sh     | 27 ++++++++++++++++++++++
 scripts/ci/windows/msys2-download.bat |  4 ++++
 scripts/ci/windows/msys2-install.sh   | 33 +++++++++++++++++++++++++++
 tests/docker/dockerfiles/msys2.docker | 11 +++++++++
 tests/qapi-schema/meson.build         |  3 ++-
 tests/test-replication.c              | 17 ++++++++++----
 14 files changed, 188 insertions(+), 35 deletions(-)
 create mode 100644 .github/workflows/main.yml
 create mode 100644 scripts/ci/windows/msys2-build.sh
 create mode 100644 scripts/ci/windows/msys2-download.bat
 create mode 100644 scripts/ci/windows/msys2-install.sh
 create mode 100644 tests/docker/dockerfiles/msys2.docker

-- 
2.28.0.windows.1



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

* [PATCH v5 01/11] Revert "configure: add --ninja option"
  2020-09-05  6:23 [PATCH v5 00/11] Green the msys2 CI make Yonggang Luo
@ 2020-09-05  6:23 ` Yonggang Luo
  2020-09-05  8:29   ` Thomas Huth
  2020-09-05  6:23 ` [PATCH v5 02/11] block: Fixes nfs on msys2/mingw Yonggang Luo
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Yonggang Luo @ 2020-09-05  6:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, QEMU Block, Stefan Weil, Peter Lieven, Yonggang Luo,
	Paolo Bonzini, Alex Bennée

This reverts commit 48328880fddf0145bdccc499160fb24dfabfbd41.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 configure | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/configure b/configure
index d3495e107f..5d8bf4d8bb 100755
--- a/configure
+++ b/configure
@@ -517,7 +517,6 @@ rng_none="no"
 secret_keyring=""
 libdaxctl=""
 meson=""
-ninja=""
 skip_meson=no
 gettext=""
 
@@ -984,8 +983,6 @@ for opt do
   ;;
   --meson=*) meson="$optarg"
   ;;
-  --ninja=*) ninja="$optarg"
-  ;;
   --smbd=*) smbd="$optarg"
   ;;
   --extra-cflags=*)
@@ -1758,7 +1755,6 @@ Advanced options (experts only):
   --python=PYTHON          use specified python [$python]
   --sphinx-build=SPHINX    use specified sphinx-build [$sphinx_build]
   --meson=MESON            use specified meson [$meson]
-  --ninja=NINJA            use specified ninja [$ninja]
   --smbd=SMBD              use specified smbd [$smbd]
   --with-git=GIT           use specified git [$git]
   --static                 enable static build [$static]
@@ -1995,16 +1991,6 @@ case "$meson" in
     *) meson=$(command -v meson) ;;
 esac
 
-# Probe for ninja (used for compdb)
-
-if test -z "$ninja"; then
-    for c in ninja ninja-build samu; do
-        if has $c; then
-            ninja=$(command -v "$c")
-            break
-        fi
-    done
-fi
 
 # Check that the C compiler works. Doing this here before testing
 # the host CPU ensures that we had a valid CC to autodetect the
@@ -7917,7 +7903,7 @@ fi
 mv $cross config-meson.cross
 
 rm -rf meson-private meson-info meson-logs
-NINJA=${ninja:-$PWD/ninjatool} $meson setup \
+NINJA=$PWD/ninjatool $meson setup \
         --prefix "${pre_prefix}$prefix" \
         --libdir "${pre_prefix}$libdir" \
         --libexecdir "${pre_prefix}$libexecdir" \
-- 
2.28.0.windows.1



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

* [PATCH v5 02/11] block: Fixes nfs on msys2/mingw
  2020-09-05  6:23 [PATCH v5 00/11] Green the msys2 CI make Yonggang Luo
  2020-09-05  6:23 ` [PATCH v5 01/11] Revert "configure: add --ninja option" Yonggang Luo
@ 2020-09-05  6:23 ` Yonggang Luo
  2020-09-05  6:23 ` [PATCH v5 03/11] ci: fixes msys2 build by upgrading capstone to 4.0.2 Yonggang Luo
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 24+ messages in thread
From: Yonggang Luo @ 2020-09-05  6:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, QEMU Block, Stefan Weil, Peter Lieven, Yonggang Luo,
	Paolo Bonzini, Alex Bennée

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 block/nfs.c | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/block/nfs.c b/block/nfs.c
index 61a249a9fc..34b2cd5708 100644
--- a/block/nfs.c
+++ b/block/nfs.c
@@ -24,7 +24,9 @@
 
 #include "qemu/osdep.h"
 
+#if !defined(_WIN32)
 #include <poll.h>
+#endif
 #include "qemu/config-file.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
@@ -51,6 +53,12 @@
 #define QEMU_NFS_MAX_PAGECACHE_SIZE (8388608 / NFS_BLKSIZE)
 #define QEMU_NFS_MAX_DEBUG_LEVEL 2
 
+#if defined (_WIN32)
+#define nfs_stat __stat64
+#else
+#define nfs_stat stat
+#endif
+
 typedef struct NFSClient {
     struct nfs_context *context;
     struct nfsfh *fh;
@@ -58,7 +66,7 @@ typedef struct NFSClient {
     bool has_zero_init;
     AioContext *aio_context;
     QemuMutex mutex;
-    blkcnt_t st_blocks;
+    int64_t st_size;
     bool cache_used;
     NFSServer *server;
     char *path;
@@ -70,7 +78,7 @@ typedef struct NFSRPC {
     int ret;
     int complete;
     QEMUIOVector *iov;
-    struct stat *st;
+    struct nfs_stat *st;
     Coroutine *co;
     NFSClient *client;
 } NFSRPC;
@@ -419,7 +427,7 @@ static int64_t nfs_client_open(NFSClient *client, BlockdevOptionsNfs *opts,
                                int flags, int open_flags, Error **errp)
 {
     int64_t ret = -EINVAL;
-    struct stat st;
+    struct nfs_stat st;
     char *file = NULL, *strp = NULL;
 
     qemu_mutex_init(&client->mutex);
@@ -545,7 +553,7 @@ static int64_t nfs_client_open(NFSClient *client, BlockdevOptionsNfs *opts,
     }
 
     ret = DIV_ROUND_UP(st.st_size, BDRV_SECTOR_SIZE);
-    client->st_blocks = st.st_blocks;
+    client->st_size = st.st_size;
     client->has_zero_init = S_ISREG(st.st_mode);
     *strp = '/';
     goto out;
@@ -729,11 +737,11 @@ static int64_t nfs_get_allocated_file_size(BlockDriverState *bs)
 {
     NFSClient *client = bs->opaque;
     NFSRPC task = {0};
-    struct stat st;
+    struct nfs_stat st;
 
     if (bdrv_is_read_only(bs) &&
         !(bs->open_flags & BDRV_O_NOCACHE)) {
-        return client->st_blocks * 512;
+        return client->st_size;
     }
 
     task.bs = bs;
@@ -746,7 +754,7 @@ static int64_t nfs_get_allocated_file_size(BlockDriverState *bs)
     nfs_set_events(client);
     BDRV_POLL_WHILE(bs, !task.complete);
 
-    return (task.ret < 0 ? task.ret : st.st_blocks * 512);
+    return (task.ret < 0 ? task.ret : st.st_size);
 }
 
 static int coroutine_fn
@@ -778,7 +786,7 @@ static int nfs_reopen_prepare(BDRVReopenState *state,
                               BlockReopenQueue *queue, Error **errp)
 {
     NFSClient *client = state->bs->opaque;
-    struct stat st;
+    struct nfs_stat st;
     int ret = 0;
 
     if (state->flags & BDRV_O_RDWR && bdrv_is_read_only(state->bs)) {
@@ -800,7 +808,7 @@ static int nfs_reopen_prepare(BDRVReopenState *state,
                        nfs_get_error(client->context));
             return ret;
         }
-        client->st_blocks = st.st_blocks;
+        client->st_size = st.st_size;
     }
 
     return 0;
-- 
2.28.0.windows.1



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

* [PATCH v5 03/11] ci: fixes msys2 build by upgrading capstone to 4.0.2
  2020-09-05  6:23 [PATCH v5 00/11] Green the msys2 CI make Yonggang Luo
  2020-09-05  6:23 ` [PATCH v5 01/11] Revert "configure: add --ninja option" Yonggang Luo
  2020-09-05  6:23 ` [PATCH v5 02/11] block: Fixes nfs on msys2/mingw Yonggang Luo
@ 2020-09-05  6:23 ` Yonggang Luo
  2020-09-05 11:14   ` Mark Cave-Ayland
  2020-09-05  6:23 ` [PATCH v5 04/11] meson: upgrade meson for execute custom ninjatool under msys2 properly Yonggang Luo
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Yonggang Luo @ 2020-09-05  6:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, QEMU Block, Stefan Weil, Peter Lieven, Yonggang Luo,
	Paolo Bonzini, Alex Bennée

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 capstone  | 2 +-
 configure | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/capstone b/capstone
index 22ead3e0bf..1d23053284 160000
--- a/capstone
+++ b/capstone
@@ -1 +1 @@
-Subproject commit 22ead3e0bfdb87516656453336160e0a37b066bf
+Subproject commit 1d230532840a37ac032c6ab80128238fc930c6c1
diff --git a/configure b/configure
index 5d8bf4d8bb..f8cbd2898c 100755
--- a/configure
+++ b/configure
@@ -5117,7 +5117,7 @@ case "$capstone" in
       LIBCAPSTONE=libcapstone.a
     fi
     capstone_libs="-Lcapstone -lcapstone"
-    capstone_cflags="-I${source_path}/capstone/include"
+    capstone_cflags="-I${source_path}/capstone/include -I${source_path}/capstone/include/capstone"
     ;;
 
   system)
-- 
2.28.0.windows.1



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

* [PATCH v5 04/11] meson: upgrade meson for execute custom ninjatool under msys2 properly
  2020-09-05  6:23 [PATCH v5 00/11] Green the msys2 CI make Yonggang Luo
                   ` (2 preceding siblings ...)
  2020-09-05  6:23 ` [PATCH v5 03/11] ci: fixes msys2 build by upgrading capstone to 4.0.2 Yonggang Luo
@ 2020-09-05  6:23 ` Yonggang Luo
  2020-09-05 13:44   ` Paolo Bonzini
  2020-09-05  6:23 ` [PATCH v5 05/11] ci: Enable msys2 ci in cirrus Yonggang Luo
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Yonggang Luo @ 2020-09-05  6:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, QEMU Block, Stefan Weil, Peter Lieven, Yonggang Luo,
	Paolo Bonzini, Alex Bennée

The ninja options now have no need anymore.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 meson | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson b/meson
index 68ed748f84..492afe50a4 160000
--- a/meson
+++ b/meson
@@ -1 +1 @@
-Subproject commit 68ed748f84f14c2d4e62dcbd123816e5898eb04c
+Subproject commit 492afe50a439d70df99d6e3e59572aff55e14c6b
-- 
2.28.0.windows.1



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

* [PATCH v5 05/11] ci: Enable msys2 ci in cirrus
  2020-09-05  6:23 [PATCH v5 00/11] Green the msys2 CI make Yonggang Luo
                   ` (3 preceding siblings ...)
  2020-09-05  6:23 ` [PATCH v5 04/11] meson: upgrade meson for execute custom ninjatool under msys2 properly Yonggang Luo
@ 2020-09-05  6:23 ` Yonggang Luo
  2020-09-05  6:23 ` [PATCH v5 06/11] tests: Trying fixes test-replication.c on msys2 Yonggang Luo
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 24+ messages in thread
From: Yonggang Luo @ 2020-09-05  6:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, QEMU Block, Stefan Weil, Peter Lieven, Yonggang Luo,
	Paolo Bonzini, Alex Bennée

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.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 .cirrus.yml                         | 24 +++++++++++++++++++++
 scripts/ci/windows/msys2-build.sh   | 27 +++++++++++++++++++++++
 scripts/ci/windows/msys2-install.sh | 33 +++++++++++++++++++++++++++++
 3 files changed, 84 insertions(+)
 create mode 100644 scripts/ci/windows/msys2-build.sh
 create mode 100644 scripts/ci/windows/msys2-install.sh

diff --git a/.cirrus.yml b/.cirrus.yml
index 3dd9fcff7f..49335e68c9 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -63,3 +63,27 @@ 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 "sh scripts/ci/windows/msys2-install.sh"
+  script:
+    - C:\tools\msys64\usr\bin\bash.exe -lc "sh scripts/ci/windows/msys2-build.sh"
diff --git a/scripts/ci/windows/msys2-build.sh b/scripts/ci/windows/msys2-build.sh
new file mode 100644
index 0000000000..532cb847c0
--- /dev/null
+++ b/scripts/ci/windows/msys2-build.sh
@@ -0,0 +1,27 @@
+mkdir build
+cd build
+../configure \
+--python=python3 \
+--enable-stack-protector \
+--enable-guest-agent \
+--disable-pie \
+--enable-gnutls --enable-nettle \
+--enable-sdl --enable-sdl-image --enable-gtk --disable-vte --disable-curses --enable-iconv \
+--enable-vnc --enable-vnc-sasl --enable-vnc-jpeg --enable-vnc-png \
+--enable-slirp=git \
+--disable-brlapi --enable-curl \
+--enable-fdt \
+--disable-kvm --enable-hax --enable-whpx \
+--enable-libnfs --enable-libusb --enable-live-block-migration --enable-usb-redir \
+--enable-lzo --enable-snappy --enable-bzip2 --enable-zstd \
+--enable-membarrier --enable-coroutine-pool \
+--enable-libssh --enable-libxml2 \
+--enable-jemalloc --enable-avx2 \
+--enable-replication \
+--enable-tools \
+--enable-bochs --enable-cloop --enable-dmg --enable-qcow1 --enable-vdi --enable-vvfat --enable-qed --enable-parallels \
+--enable-sheepdog \
+--enable-capstone=git
+
+make -j$NUMBER_OF_PROCESSORS
+make -i -j$NUMBER_OF_PROCESSORS check
diff --git a/scripts/ci/windows/msys2-install.sh b/scripts/ci/windows/msys2-install.sh
new file mode 100644
index 0000000000..6086452399
--- /dev/null
+++ b/scripts/ci/windows/msys2-install.sh
@@ -0,0 +1,33 @@
+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 \
+
-- 
2.28.0.windows.1



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

* [PATCH v5 06/11] tests: Trying fixes test-replication.c on msys2.
  2020-09-05  6:23 [PATCH v5 00/11] Green the msys2 CI make Yonggang Luo
                   ` (4 preceding siblings ...)
  2020-09-05  6:23 ` [PATCH v5 05/11] ci: Enable msys2 ci in cirrus Yonggang Luo
@ 2020-09-05  6:23 ` Yonggang Luo
  2020-09-05  6:23 ` [PATCH v5 07/11] block: get file-win32.c handle locking option consistence with file-posix.c Yonggang Luo
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 24+ messages in thread
From: Yonggang Luo @ 2020-09-05  6:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, QEMU Block, Stefan Weil, Peter Lieven, Yonggang Luo,
	Paolo Bonzini, Alex Bennée

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 tests/test-replication.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/tests/test-replication.c b/tests/test-replication.c
index 9ab3666a90..d0e06f8d77 100644
--- a/tests/test-replication.c
+++ b/tests/test-replication.c
@@ -23,14 +23,18 @@
 
 /* primary */
 #define P_ID "primary-id"
-static char p_local_disk[] = "/tmp/p_local_disk.XXXXXX";
+#define P_LOCAL_DISK "%s/p_local_disk.XXXXXX"
+static char p_local_disk[PATH_MAX];
 
 /* 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";
+#define S_LOCAL_DISK "%s/s_local_disk.XXXXXX"
+static char s_local_disk[PATH_MAX];
+#define S_ACTIVE_DISK "%s/s_active_disk.XXXXXX"
+static char s_active_disk[PATH_MAX];
+#define S_HIDDEN_DISK "%s/s_hidden_disk.XXXXXX"
+static char s_hidden_disk[PATH_MAX];
 
 /* FIXME: steal from blockdev.c */
 QemuOptsList qemu_drive_opts = {
@@ -571,7 +575,12 @@ static void setup_sigabrt_handler(void)
 int main(int argc, char **argv)
 {
     int ret;
+    const char *tmpdir = g_get_tmp_dir();
     qemu_init_main_loop(&error_fatal);
+    sprintf(p_local_disk, P_LOCAL_DISK, tmpdir);
+    sprintf(s_local_disk, S_LOCAL_DISK, tmpdir);
+    sprintf(s_active_disk, S_ACTIVE_DISK, tmpdir);
+    sprintf(s_hidden_disk, S_HIDDEN_DISK, tmpdir);
     bdrv_init();
 
     g_test_init(&argc, &argv, NULL);
-- 
2.28.0.windows.1



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

* [PATCH v5 07/11] block: get file-win32.c handle locking option consistence with file-posix.c
  2020-09-05  6:23 [PATCH v5 00/11] Green the msys2 CI make Yonggang Luo
                   ` (5 preceding siblings ...)
  2020-09-05  6:23 ` [PATCH v5 06/11] tests: Trying fixes test-replication.c on msys2 Yonggang Luo
@ 2020-09-05  6:23 ` Yonggang Luo
  2020-09-05  6:23 ` [PATCH v5 08/11] osdep: These function are only available on Non-Win32 system Yonggang Luo
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 24+ messages in thread
From: Yonggang Luo @ 2020-09-05  6:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, QEMU Block, Stefan Weil, Peter Lieven, Yonggang Luo,
	Paolo Bonzini, Alex Bennée

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 block/file-win32.c | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/block/file-win32.c b/block/file-win32.c
index ab69bd811a..14e5f5c3b5 100644
--- a/block/file-win32.c
+++ b/block/file-win32.c
@@ -299,6 +299,11 @@ static QemuOptsList raw_runtime_opts = {
             .type = QEMU_OPT_STRING,
             .help = "host AIO implementation (threads, native)",
         },
+        {
+            .name = "locking",
+            .type = QEMU_OPT_STRING,
+            .help = "file locking mode (on/off/auto, default: auto)",
+        },
         { /* end of list */ }
     },
 };
@@ -334,6 +339,7 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags,
     const char *filename;
     bool use_aio;
     int ret;
+    OnOffAuto locking;
 
     s->type = FTYPE_FILE;
 
@@ -342,11 +348,24 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags,
         ret = -EINVAL;
         goto fail;
     }
-
-    if (qdict_get_try_bool(options, "locking", false)) {
+    locking = qapi_enum_parse(&OnOffAuto_lookup,
+                              qemu_opt_get(opts, "locking"),
+                              ON_OFF_AUTO_AUTO, &local_err);
+    if (local_err) {
+        error_propagate(errp, local_err);
+        ret = -EINVAL;
+        goto fail;
+    }
+    switch (locking) {
+    case ON_OFF_AUTO_ON:
         error_setg(errp, "locking=on is not supported on Windows");
         ret = -EINVAL;
         goto fail;
+    case ON_OFF_AUTO_OFF:
+    case ON_OFF_AUTO_AUTO:
+        break;
+    default:
+        g_assert_not_reached();
     }
 
     filename = qemu_opt_get(opts, "filename");
-- 
2.28.0.windows.1



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

* [PATCH v5 08/11] osdep: These function are only available on Non-Win32 system.
  2020-09-05  6:23 [PATCH v5 00/11] Green the msys2 CI make Yonggang Luo
                   ` (6 preceding siblings ...)
  2020-09-05  6:23 ` [PATCH v5 07/11] block: get file-win32.c handle locking option consistence with file-posix.c Yonggang Luo
@ 2020-09-05  6:23 ` Yonggang Luo
  2020-09-05  8:33   ` Thomas Huth
  2020-09-05  6:23 ` [PATCH v5 09/11] meson: Fixes qapi tests Yonggang Luo
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Yonggang Luo @ 2020-09-05  6:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, QEMU Block, Stefan Weil, Peter Lieven, Yonggang Luo,
	Paolo Bonzini, Alex Bennée

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>
---
 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.28.0.windows.1



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

* [PATCH v5 09/11] meson: Fixes qapi tests.
  2020-09-05  6:23 [PATCH v5 00/11] Green the msys2 CI make Yonggang Luo
                   ` (7 preceding siblings ...)
  2020-09-05  6:23 ` [PATCH v5 08/11] osdep: These function are only available on Non-Win32 system Yonggang Luo
@ 2020-09-05  6:23 ` Yonggang Luo
  2020-09-05  8:42   ` Thomas Huth
  2020-09-05  6:23 ` [PATCH v5 10/11] docker: Add win32/msys2/mingw64 docker Yonggang Luo
  2020-09-05  6:23 ` [PATCH v5 11/11] ci: Enable Github actions Yonggang Luo
  10 siblings, 1 reply; 24+ messages in thread
From: Yonggang Luo @ 2020-09-05  6:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, QEMU Block, Stefan Weil, Peter Lieven, Yonggang Luo,
	Paolo Bonzini, Alex Bennée

The error are:
+@end table
+
+@end deftypefn
+
make: *** [Makefile.mtest:63: check-qapi-schema] Error 1

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 tests/qapi-schema/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/qapi-schema/meson.build b/tests/qapi-schema/meson.build
index c87d141417..67ba0a5ebd 100644
--- a/tests/qapi-schema/meson.build
+++ b/tests/qapi-schema/meson.build
@@ -220,6 +220,7 @@ 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: ['--strip-trailing-cr',
+                              '-u', files('doc-good.texi'), qapi_doc[0].full_path()],
      depends: qapi_doc,
      suite: ['qapi-schema', 'qapi-doc'])
-- 
2.28.0.windows.1



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

* [PATCH v5 10/11] docker: Add win32/msys2/mingw64 docker
  2020-09-05  6:23 [PATCH v5 00/11] Green the msys2 CI make Yonggang Luo
                   ` (8 preceding siblings ...)
  2020-09-05  6:23 ` [PATCH v5 09/11] meson: Fixes qapi tests Yonggang Luo
@ 2020-09-05  6:23 ` Yonggang Luo
  2020-09-05  6:23 ` [PATCH v5 11/11] ci: Enable Github actions Yonggang Luo
  10 siblings, 0 replies; 24+ messages in thread
From: Yonggang Luo @ 2020-09-05  6:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, QEMU Block, Stefan Weil, Peter Lieven, Yonggang Luo,
	Paolo Bonzini, Alex Bennée

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 tests/docker/dockerfiles/msys2.docker | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 tests/docker/dockerfiles/msys2.docker

diff --git a/tests/docker/dockerfiles/msys2.docker b/tests/docker/dockerfiles/msys2.docker
new file mode 100644
index 0000000000..f898e0803d
--- /dev/null
+++ b/tests/docker/dockerfiles/msys2.docker
@@ -0,0 +1,11 @@
+FROM cirrusci/windowsservercore:cmake
+RUN echo | choco install -y --no-progress --ignore-package-exit-codes --params "/NoUpdate /InstallDir:C:\tools\msys64" msys2
+COPY msys2_install.sh C:/tools
+RUN C:\tools\msys64\usr\bin\bash.exe -lc "grep -rl 'repo.msys2.org/' /etc/pacman.d/mirrorlist.* | xargs sed -i 's/repo.msys2.org\//mirrors.ustc.edu.cn\/msys2\//g'"
+RUN C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Sy"
+RUN C:\tools\msys64\usr\bin\bash.exe -lc "sh /c/tools/msys2_install.sh"
+RUN C:\tools\msys64\usr\bin\bash.exe -lc "rm -rf /var/cache/pacman/pkg/*"
+
+# docker build --tag lygstate/windowsservercore:msys2 -f "../../../tests/docker/dockerfiles/msys2.docker" .
+# docker run -it lygstate/windowsservercore:msys2 cmd
+# docker push lygstate/windowsservercore:msys2
-- 
2.28.0.windows.1



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

* [PATCH v5 11/11] ci: Enable Github actions.
  2020-09-05  6:23 [PATCH v5 00/11] Green the msys2 CI make Yonggang Luo
                   ` (9 preceding siblings ...)
  2020-09-05  6:23 ` [PATCH v5 10/11] docker: Add win32/msys2/mingw64 docker Yonggang Luo
@ 2020-09-05  6:23 ` Yonggang Luo
  10 siblings, 0 replies; 24+ messages in thread
From: Yonggang Luo @ 2020-09-05  6:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, QEMU Block, Stefan Weil, Peter Lieven, Yonggang Luo,
	Paolo Bonzini, Alex Bennée

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 .github/workflows/main.yml            | 31 +++++++++++++++++++++++++++
 scripts/ci/windows/msys2-download.bat |  4 ++++
 2 files changed, 35 insertions(+)
 create mode 100644 .github/workflows/main.yml
 create mode 100644 scripts/ci/windows/msys2-download.bat

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000000..758bbf6641
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,31 @@
+# This is a basic workflow to help you get started with Actions
+
+name: CI
+
+# Controls when the action will run. Triggers the workflow on push or pull request
+# events but only for the master branch
+on:
+  push:
+    branches: [ master, msys2 ]
+  pull_request:
+    branches: [ master ]
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+  msys2-build:
+    name: C++ msys2 (Windows)
+    runs-on: windows-latest
+    strategy:
+      fail-fast: false
+    steps:
+      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+      - uses: actions/checkout@v2
+      - name: Install MSYS2
+        run: scripts/ci/windows/msys2-download
+      - name: Build
+        env:
+          MSYS: winsymlinks:nativestrict
+          MSYSTEM: MINGW64
+          CHERE_INVOKING: 1
+        run: C:\tools\msys64\usr\bin\bash.exe -lc "sh scripts/ci/windows/msys2-build.sh"
+
diff --git a/scripts/ci/windows/msys2-download.bat b/scripts/ci/windows/msys2-download.bat
new file mode 100644
index 0000000000..2c7c41899e
--- /dev/null
+++ b/scripts/ci/windows/msys2-download.bat
@@ -0,0 +1,4 @@
+mkdir C:\tools
+cd /d C:\tools
+curl -LJ -s https://github.com/lygstate/qemu/releases/download/v5.1.0/msys64-v5.1.0.7z --output msys64.7z
+7z -mmt8 x msys64.7z
-- 
2.28.0.windows.1



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

* Re: [PATCH v5 01/11] Revert "configure: add --ninja option"
  2020-09-05  6:23 ` [PATCH v5 01/11] Revert "configure: add --ninja option" Yonggang Luo
@ 2020-09-05  8:29   ` Thomas Huth
  2020-09-05  8:45     ` Mark Cave-Ayland
  2020-09-05  8:48     ` Paolo Bonzini
  0 siblings, 2 replies; 24+ messages in thread
From: Thomas Huth @ 2020-09-05  8:29 UTC (permalink / raw)
  To: Yonggang Luo, qemu-devel
  Cc: Kevin Wolf, QEMU Block, Stefan Weil, Peter Lieven, Paolo Bonzini,
	Alex Bennée

On 05/09/2020 08.23, Yonggang Luo wrote:
> This reverts commit 48328880fddf0145bdccc499160fb24dfabfbd41.
> 
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
>  configure | 16 +---------------
>  1 file changed, 1 insertion(+), 15 deletions(-)

Please be a little bit more descriptive in the patch description: Why do
you have to revert this patch?

 Thomas



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

* Re: [PATCH v5 08/11] osdep: These function are only available on Non-Win32 system.
  2020-09-05  6:23 ` [PATCH v5 08/11] osdep: These function are only available on Non-Win32 system Yonggang Luo
@ 2020-09-05  8:33   ` Thomas Huth
  2020-09-07 17:42     ` 罗勇刚(Yonggang Luo)
  0 siblings, 1 reply; 24+ messages in thread
From: Thomas Huth @ 2020-09-05  8:33 UTC (permalink / raw)
  To: Yonggang Luo, qemu-devel
  Cc: Kevin Wolf, QEMU Block, QEMU Trivial, Stefan Weil, Peter Lieven,
	Paolo Bonzini, Alex Bennée

On 05/09/2020 08.23, Yonggang Luo wrote:
> 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>
> ---
>  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"
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>



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

* Re: [PATCH v5 09/11] meson: Fixes qapi tests.
  2020-09-05  6:23 ` [PATCH v5 09/11] meson: Fixes qapi tests Yonggang Luo
@ 2020-09-05  8:42   ` Thomas Huth
  2020-09-07  4:20     ` 罗勇刚(Yonggang Luo)
  0 siblings, 1 reply; 24+ messages in thread
From: Thomas Huth @ 2020-09-05  8:42 UTC (permalink / raw)
  To: Yonggang Luo, qemu-devel
  Cc: Kevin Wolf, QEMU Block, Stefan Weil, Peter Lieven,
	Markus Armbruster, Paolo Bonzini, Alex Bennée

On 05/09/2020 08.23, Yonggang Luo wrote:
> The error are:
> +@end table
> +
> +@end deftypefn
> +
> make: *** [Makefile.mtest:63: check-qapi-schema] Error 1
> 
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
>  tests/qapi-schema/meson.build | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/qapi-schema/meson.build b/tests/qapi-schema/meson.build
> index c87d141417..67ba0a5ebd 100644
> --- a/tests/qapi-schema/meson.build
> +++ b/tests/qapi-schema/meson.build
> @@ -220,6 +220,7 @@ 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: ['--strip-trailing-cr',
> +                              '-u', files('doc-good.texi'), qapi_doc[0].full_path()],

I just had a look at the POSIX man page of "diff", and it seems like
"'--strip-trailing-cr" is not a portable option :-( Thus this will
likely fail on the BSDs and Solaris-based systems.
I think it's maybe best if you replace it with "-b" instead.

 Thomas



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

* Re: [PATCH v5 01/11] Revert "configure: add --ninja option"
  2020-09-05  8:29   ` Thomas Huth
@ 2020-09-05  8:45     ` Mark Cave-Ayland
  2020-09-05  8:48     ` Paolo Bonzini
  1 sibling, 0 replies; 24+ messages in thread
From: Mark Cave-Ayland @ 2020-09-05  8:45 UTC (permalink / raw)
  To: Thomas Huth, Yonggang Luo, qemu-devel
  Cc: Kevin Wolf, QEMU Block, Stefan Weil, Peter Lieven, Paolo Bonzini,
	Alex Bennée

On 05/09/2020 09:29, Thomas Huth wrote:

> On 05/09/2020 08.23, Yonggang Luo wrote:
>> This reverts commit 48328880fddf0145bdccc499160fb24dfabfbd41.
>>
>> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
>> ---
>>  configure | 16 +---------------
>>  1 file changed, 1 insertion(+), 15 deletions(-)
> 
> Please be a little bit more descriptive in the patch description: Why do
> you have to revert this patch?

Indeed - I certainly still need this, although I will do another test once Paolo's
latest changes have been merged.


ATB,

Mark.


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

* Re: [PATCH v5 01/11] Revert "configure: add --ninja option"
  2020-09-05  8:29   ` Thomas Huth
  2020-09-05  8:45     ` Mark Cave-Ayland
@ 2020-09-05  8:48     ` Paolo Bonzini
  1 sibling, 0 replies; 24+ messages in thread
From: Paolo Bonzini @ 2020-09-05  8:48 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Kevin Wolf, QEMU Block, Stefan Weil, Peter Lieven, qemu-devel,
	Yonggang Luo, Alex Bennée

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

Il sab 5 set 2020, 10:29 Thomas Huth <thuth@redhat.com> ha scritto:

> On 05/09/2020 08.23, Yonggang Luo wrote:
> > This reverts commit 48328880fddf0145bdccc499160fb24dfabfbd41.
> >
> > Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> > ---
> >  configure | 16 +---------------
> >  1 file changed, 1 insertion(+), 15 deletions(-)
>
> Please be a little bit more descriptive in the patch description: Why do
> you have to revert this patch?
>

It shouldn't be reverted yet. The Windows issue that required the
introduction of --ninja is now fixed in upstream Meson, but we shouldn't
include the fix in the meson submodule until it's part of a released
version. We can then bump the required version (hopefully 0.55.2) and
decide whether to remove --ninja.

That said, we might also want to use ninja instead of make in the future to
build QEMU (leaving make to do the orchestration of the submodules etc.),
which would let us remove ninjatool altogether. I am not sure if that is
going to happen anytime soon, but it should be taken into account before
deciding to remove --ninja.

Paolo

>

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

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

* Re: [PATCH v5 03/11] ci: fixes msys2 build by upgrading capstone to 4.0.2
  2020-09-05  6:23 ` [PATCH v5 03/11] ci: fixes msys2 build by upgrading capstone to 4.0.2 Yonggang Luo
@ 2020-09-05 11:14   ` Mark Cave-Ayland
  2020-09-05 13:22     ` 罗勇刚(Yonggang Luo)
  0 siblings, 1 reply; 24+ messages in thread
From: Mark Cave-Ayland @ 2020-09-05 11:14 UTC (permalink / raw)
  To: Yonggang Luo, qemu-devel
  Cc: Kevin Wolf, QEMU Block, Stefan Weil, Peter Lieven, Paolo Bonzini,
	Alex Bennée

On 05/09/2020 07:23, Yonggang Luo wrote:

> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
>  capstone  | 2 +-
>  configure | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/capstone b/capstone
> index 22ead3e0bf..1d23053284 160000
> --- a/capstone
> +++ b/capstone
> @@ -1 +1 @@
> -Subproject commit 22ead3e0bfdb87516656453336160e0a37b066bf
> +Subproject commit 1d230532840a37ac032c6ab80128238fc930c6c1
> diff --git a/configure b/configure
> index 5d8bf4d8bb..f8cbd2898c 100755
> --- a/configure
> +++ b/configure
> @@ -5117,7 +5117,7 @@ case "$capstone" in
>        LIBCAPSTONE=libcapstone.a
>      fi
>      capstone_libs="-Lcapstone -lcapstone"
> -    capstone_cflags="-I${source_path}/capstone/include"
> +    capstone_cflags="-I${source_path}/capstone/include -I${source_path}/capstone/include/capstone"
>      ;;
>  
>    system)

Just to reiterate from the other meson thread: the reason that the current capstone
won't compile under Windows is due to https://bugs.launchpad.net/qemu/+bug/1826175.

The merged fix from
https://github.com/aquynh/capstone/commit/29893c63e34ee21846744d02c396ae3c801b936b is
really quite simple - it might be that if upgrading is not an option then a suitable
WIN32 configure hack could be used.


ATB,

Mark.


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

* Re: [PATCH v5 03/11] ci: fixes msys2 build by upgrading capstone to 4.0.2
  2020-09-05 11:14   ` Mark Cave-Ayland
@ 2020-09-05 13:22     ` 罗勇刚(Yonggang Luo)
  2020-09-05 14:28       ` Peter Maydell
  0 siblings, 1 reply; 24+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2020-09-05 13:22 UTC (permalink / raw)
  To: Mark Cave-Ayland
  Cc: Kevin Wolf, QEMU Block, Stefan Weil, Peter Lieven, qemu-level,
	Paolo Bonzini, Alex Bennée

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

On Sat, Sep 5, 2020 at 7:14 PM Mark Cave-Ayland <
mark.cave-ayland@ilande.co.uk> wrote:

> On 05/09/2020 07:23, Yonggang Luo wrote:
>
> > Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> > ---
> >  capstone  | 2 +-
> >  configure | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/capstone b/capstone
> > index 22ead3e0bf..1d23053284 160000
> > --- a/capstone
> > +++ b/capstone
> > @@ -1 +1 @@
> > -Subproject commit 22ead3e0bfdb87516656453336160e0a37b066bf
> > +Subproject commit 1d230532840a37ac032c6ab80128238fc930c6c1
> > diff --git a/configure b/configure
> > index 5d8bf4d8bb..f8cbd2898c 100755
> > --- a/configure
> > +++ b/configure
> > @@ -5117,7 +5117,7 @@ case "$capstone" in
> >        LIBCAPSTONE=libcapstone.a
> >      fi
> >      capstone_libs="-Lcapstone -lcapstone"
> > -    capstone_cflags="-I${source_path}/capstone/include"
> > +    capstone_cflags="-I${source_path}/capstone/include
> -I${source_path}/capstone/include/capstone"
> >      ;;
> >
> >    system)
>
> Just to reiterate from the other meson thread: the reason that the current
> capstone
> won't compile under Windows is due to
> https://bugs.launchpad.net/qemu/+bug/1826175.
>
> The merged fix from
>
> https://github.com/aquynh/capstone/commit/29893c63e34ee21846744d02c396ae3c801b936b
> is
> really quite simple - it might be that if upgrading is not an option then
> a suitable
> WIN32 configure hack could be used.
>
Who is responsible for capstone? Capstone is not a key component, just for
disassembly, the newest version would have more function i guess.

>
>
> ATB,
>
> Mark.
>


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

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

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

* Re: [PATCH v5 04/11] meson: upgrade meson for execute custom ninjatool under msys2 properly
  2020-09-05  6:23 ` [PATCH v5 04/11] meson: upgrade meson for execute custom ninjatool under msys2 properly Yonggang Luo
@ 2020-09-05 13:44   ` Paolo Bonzini
  2020-09-05 14:21     ` 罗勇刚(Yonggang Luo)
  0 siblings, 1 reply; 24+ messages in thread
From: Paolo Bonzini @ 2020-09-05 13:44 UTC (permalink / raw)
  To: Yonggang Luo, qemu-devel
  Cc: Peter Lieven, Stefan Weil, Kevin Wolf, Alex Bennée, QEMU Block

On 05/09/20 08:23, Yonggang Luo wrote:
> The ninja options now have no need anymore.
> 
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
>  meson | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meson b/meson
> index 68ed748f84..492afe50a4 160000
> --- a/meson
> +++ b/meson
> @@ -1 +1 @@
> -Subproject commit 68ed748f84f14c2d4e62dcbd123816e5898eb04c
> +Subproject commit 492afe50a439d70df99d6e3e59572aff55e14c6b
> 

Sorry, we cannot use a random commit.  We need a release so that we can
in parallel update the version check in the configure script.

Paolo



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

* Re: [PATCH v5 04/11] meson: upgrade meson for execute custom ninjatool under msys2 properly
  2020-09-05 13:44   ` Paolo Bonzini
@ 2020-09-05 14:21     ` 罗勇刚(Yonggang Luo)
  0 siblings, 0 replies; 24+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2020-09-05 14:21 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Kevin Wolf, QEMU Block, Stefan Weil, Peter Lieven, qemu-level,
	Alex Bennée

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

On Sat, Sep 5, 2020 at 9:44 PM Paolo Bonzini <pbonzini@redhat.com> wrote:

> On 05/09/20 08:23, Yonggang Luo wrote:
> > The ninja options now have no need anymore.
> >
> > Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> > ---
> >  meson | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meson b/meson
> > index 68ed748f84..492afe50a4 160000
> > --- a/meson
> > +++ b/meson
> > @@ -1 +1 @@
> > -Subproject commit 68ed748f84f14c2d4e62dcbd123816e5898eb04c
> > +Subproject commit 492afe50a439d70df99d6e3e59572aff55e14c6b
> >
>
> Sorry, we cannot use a random commit.  We need a release so that we can
> in parallel update the version check in the configure script.
>
> I am OK with that, just used it to verify if the new meson patch are work,
and the result are promising.

> Paolo
>
>

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

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

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

* Re: [PATCH v5 03/11] ci: fixes msys2 build by upgrading capstone to 4.0.2
  2020-09-05 13:22     ` 罗勇刚(Yonggang Luo)
@ 2020-09-05 14:28       ` Peter Maydell
  0 siblings, 0 replies; 24+ messages in thread
From: Peter Maydell @ 2020-09-05 14:28 UTC (permalink / raw)
  To: Yonggang Luo
  Cc: Kevin Wolf, QEMU Block, Stefan Weil, Mark Cave-Ayland,
	qemu-level, Paolo Bonzini, Richard Henderson, Alex Bennée,
	Peter Lieven

On Sat, 5 Sep 2020 at 14:23, 罗勇刚(Yonggang Luo) <luoyonggang@gmail.com> wrote:
> Who is responsible for capstone?

Richard Henderson generally looks after it. (We don't have an
entry for it in MAINTAINERS, which is an oversight.)

-- PMM


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

* Re: [PATCH v5 09/11] meson: Fixes qapi tests.
  2020-09-05  8:42   ` Thomas Huth
@ 2020-09-07  4:20     ` 罗勇刚(Yonggang Luo)
  0 siblings, 0 replies; 24+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2020-09-07  4:20 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Kevin Wolf, QEMU Block, Stefan Weil, Peter Lieven, qemu-level,
	Markus Armbruster, Paolo Bonzini, Alex Bennée

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

On Sat, Sep 5, 2020 at 4:42 PM Thomas Huth <thuth@redhat.com> wrote:

> On 05/09/2020 08.23, Yonggang Luo wrote:
> > The error are:
> > +@end table
> > +
> > +@end deftypefn
> > +
> > make: *** [Makefile.mtest:63: check-qapi-schema] Error 1
> >
> > Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> > ---
> >  tests/qapi-schema/meson.build | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/tests/qapi-schema/meson.build
> b/tests/qapi-schema/meson.build
> > index c87d141417..67ba0a5ebd 100644
> > --- a/tests/qapi-schema/meson.build
> > +++ b/tests/qapi-schema/meson.build
> > @@ -220,6 +220,7 @@ 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: ['--strip-trailing-cr',
> > +                              '-u', files('doc-good.texi'),
> qapi_doc[0].full_path()],
>
> I just had a look at the POSIX man page of "diff", and it seems like
> "'--strip-trailing-cr" is not a portable option :-( Thus this will
> likely fail on the BSDs and Solaris-based systems.
> I think it's maybe best if you replace it with "-b" instead.

updated

>
>  Thomas
>
>

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

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

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

* Re: [PATCH v5 08/11] osdep: These function are only available on Non-Win32 system.
  2020-09-05  8:33   ` Thomas Huth
@ 2020-09-07 17:42     ` 罗勇刚(Yonggang Luo)
  0 siblings, 0 replies; 24+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2020-09-07 17:42 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Kevin Wolf, QEMU Block, QEMU Trivial, Stefan Weil, Peter Lieven,
	qemu-level, Paolo Bonzini, Alex Bennée

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

On Sat, Sep 5, 2020 at 4:33 PM Thomas Huth <thuth@redhat.com> wrote:

> On 05/09/2020 08.23, Yonggang Luo wrote:
> > 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>
> > ---
> >  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"
> >
>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
>
> Please also queue this


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

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

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

end of thread, other threads:[~2020-09-07 17:43 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-05  6:23 [PATCH v5 00/11] Green the msys2 CI make Yonggang Luo
2020-09-05  6:23 ` [PATCH v5 01/11] Revert "configure: add --ninja option" Yonggang Luo
2020-09-05  8:29   ` Thomas Huth
2020-09-05  8:45     ` Mark Cave-Ayland
2020-09-05  8:48     ` Paolo Bonzini
2020-09-05  6:23 ` [PATCH v5 02/11] block: Fixes nfs on msys2/mingw Yonggang Luo
2020-09-05  6:23 ` [PATCH v5 03/11] ci: fixes msys2 build by upgrading capstone to 4.0.2 Yonggang Luo
2020-09-05 11:14   ` Mark Cave-Ayland
2020-09-05 13:22     ` 罗勇刚(Yonggang Luo)
2020-09-05 14:28       ` Peter Maydell
2020-09-05  6:23 ` [PATCH v5 04/11] meson: upgrade meson for execute custom ninjatool under msys2 properly Yonggang Luo
2020-09-05 13:44   ` Paolo Bonzini
2020-09-05 14:21     ` 罗勇刚(Yonggang Luo)
2020-09-05  6:23 ` [PATCH v5 05/11] ci: Enable msys2 ci in cirrus Yonggang Luo
2020-09-05  6:23 ` [PATCH v5 06/11] tests: Trying fixes test-replication.c on msys2 Yonggang Luo
2020-09-05  6:23 ` [PATCH v5 07/11] block: get file-win32.c handle locking option consistence with file-posix.c Yonggang Luo
2020-09-05  6:23 ` [PATCH v5 08/11] osdep: These function are only available on Non-Win32 system Yonggang Luo
2020-09-05  8:33   ` Thomas Huth
2020-09-07 17:42     ` 罗勇刚(Yonggang Luo)
2020-09-05  6:23 ` [PATCH v5 09/11] meson: Fixes qapi tests Yonggang Luo
2020-09-05  8:42   ` Thomas Huth
2020-09-07  4:20     ` 罗勇刚(Yonggang Luo)
2020-09-05  6:23 ` [PATCH v5 10/11] docker: Add win32/msys2/mingw64 docker Yonggang Luo
2020-09-05  6:23 ` [PATCH v5 11/11] ci: Enable Github actions Yonggang Luo

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.