From patchwork Tue Sep 8 19:48:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11764159 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7E73B59D for ; Tue, 8 Sep 2020 19:49:24 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4405D20768 for ; Tue, 8 Sep 2020 19:49:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VSxGgF7/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4405D20768 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:40268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFjcJ-0006FH-5B for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 15:49:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40272) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFjbg-0004gX-W7; Tue, 08 Sep 2020 15:48:45 -0400 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:55184) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFjbf-0002TX-71; Tue, 08 Sep 2020 15:48:44 -0400 Received: by mail-pj1-x1033.google.com with SMTP id mm21so133829pjb.4; Tue, 08 Sep 2020 12:48:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SUvRS89sUzi/CKcVKuZSUX6fRCoMdjCQPEKiAKbAayo=; b=VSxGgF7/SU1Xyv3X/12Zg9q+vhs4FXaZefRHPubT4BGPD9wek0Ewa5zzy32qKRQqEV A/sfOLl7THobm2uwY+qiRlQbbss7bnx0bJ7XTWZt0isT9mCekpwvDpjnI6IQ7kEPg76v OGjFF3q0s4GPLf431mlAMW84X6Jbo4ub8yy+WHReTNkudEAiZa7h/9rVM1NnxWzrsxC0 ljPv6hUnTgIq84hVZSwJJclLfjp3VJOV/udHwKCI2zrb8XyNbJPvOvABBbcQjjcvpT1R rB4OJ87n7JUa3J051Xj/Smw4Cg41aQq9dcbNLZqvoBv6rLt3GJsUsB21laLgtnjJE9C/ GOYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SUvRS89sUzi/CKcVKuZSUX6fRCoMdjCQPEKiAKbAayo=; b=AhTjzv3QdKYOOBWW02npAkyvF46XyQgReOr4AwTCDzY5WM1ptkoLrG1aNijQDxywdu zsLR2gq5j7vm7mz+WsWF3a5sW0W8jmPC+T5nahOda9X9kLTgz09Xfat2KnLciHc0pBIh rVO/RayT3xVe9CiNWtp2s6H5fJeetegL6MAYEDpEkl2q/1PV06KNRqplpO5Rd+gLRINx W/kW08LR1jQNnR7C3piAMz2oBbh3M+Bss26NhqzkHjv5qWf2d46W3CGKZhFdP8Mk9wps RY6ze0+tBE6uvxiO0PIgRV5Vf8C8BJkKnlL6sDJwtmagqAXzdWQxXlV3V9Du7LO7OroM vTlw== X-Gm-Message-State: AOAM533SFcQiwju8Vqqzbjumtg0XY+yCqpdRnhjGl0Sjr3XJSBfOKxWp 7MHBO4l7Y1YuXZ6lXvOP+qJ2jf8UgMbmOP7+ X-Google-Smtp-Source: ABdhPJwVR8f1t9x1BNKS3aaf6N2nwCBCrNPVmpANlyqirlC8oBSJ/9MJt1Zpil3sF4DFHzbMHYZRRg== X-Received: by 2002:a17:90b:46c4:: with SMTP id jx4mr414979pjb.190.1599594521049; Tue, 08 Sep 2020 12:48:41 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id n127sm216922pfn.155.2020.09.08.12.48.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 12:48:40 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH 01/16] block: Fixes nfs compiling error on msys2/mingw Date: Wed, 9 Sep 2020 03:48:05 +0800 Message-Id: <20200908194820.702-2-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908194820.702-1-luoyonggang@gmail.com> References: <20200908194820.702-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1033.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" These compiling errors are fixed: ../block/nfs.c:27:10: fatal error: poll.h: No such file or directory 27 | #include | ^~~~~~~~ compilation terminated. ../block/nfs.c:63:5: error: unknown type name 'blkcnt_t' 63 | blkcnt_t st_blocks; | ^~~~~~~~ ../block/nfs.c: In function 'nfs_client_open': ../block/nfs.c:550:27: error: 'struct _stat64' has no member named 'st_blocks' 550 | client->st_blocks = st.st_blocks; | ^ ../block/nfs.c: In function 'nfs_get_allocated_file_size': ../block/nfs.c:751:41: error: 'struct _stat64' has no member named 'st_blocks' 751 | return (task.ret < 0 ? task.ret : st.st_blocks * 512); | ^ ../block/nfs.c: In function 'nfs_reopen_prepare': ../block/nfs.c:805:31: error: 'struct _stat64' has no member named 'st_blocks' 805 | client->st_blocks = st.st_blocks; | ^ ../block/nfs.c: In function 'nfs_get_allocated_file_size': ../block/nfs.c:752:1: error: control reaches end of non-void function [-Werror=return-type] 752 | } | ^ On msys2/mingw, there is no st_blocks in struct _stat64, so we use consistence st_size instead. Signed-off-by: Yonggang Luo --- 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 +#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; From patchwork Tue Sep 8 19:48:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11764161 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D280F1599 for ; Tue, 8 Sep 2020 19:49:27 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 96982207DE for ; Tue, 8 Sep 2020 19:49:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="i8x32Tmv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 96982207DE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:40658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFjcM-0006PG-I8 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 15:49:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40284) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFjbl-0004oY-Du; Tue, 08 Sep 2020 15:48:49 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:35087) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFjbj-0002Tt-Lw; Tue, 08 Sep 2020 15:48:49 -0400 Received: by mail-pg1-x543.google.com with SMTP id g29so311455pgl.2; Tue, 08 Sep 2020 12:48:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4ojKecXaQTTfPhCYFFKjoo9GXGqrC0TrAFwXqdlTji4=; b=i8x32Tmvc8UWXJQ7y3/AWAhrJ0yhR/HYvU86fmiP3qPuPF5X6Y/5n3Z6zy5Fv/gN/M PArKLyHTgzafP+R/Lq0R6CEIGxkTAs8SXSZRu80HD+mqexO1iAtF/C7mqxbeqB+qJIoE z9WOjCq7gjm3NMV0syRVhDO/UkjMqdVWQT9F604X5aEvXRRStw5X48Ck0fWBKlZMQ4fA 40xeMvI18DpBQ8WL6i6AgYpyL47xnZKZ3nm/3TOumOKjERWuyzS7rm9mtOAxYQTC+JqV XAXDzYCc8BDl0UQWN3A19m/sfuegYMWGX5t0mf2CJLzRG/c7v6vulqjd3SwUbCeqpEw8 oTTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4ojKecXaQTTfPhCYFFKjoo9GXGqrC0TrAFwXqdlTji4=; b=NDjuCh2Vn2h1PFSVN2JrN/vJyShCGQ/MkbCSlH7MeKgsSgQjoj0TUT3NEdPYJQuCXH Pkfk32jbi18AjYJa3PZpCLrDZb5nOJ+uuPpI1yymNkQylYHjPQPQxZRiB0r6eB2Ni5GE vdzNF6iXgC7/3JZdEtON5x/jQeIcEI/JEFUPFMzurzkFqGzxA6rnWCSb95Row2gMNhzi O6f0Z2YKE1Vc9ePrsDDSIXfwdjKZuaEiWP1Lzpa9rC/O7ykMAl01sPcBu48olpTptD6M 42rC7GqN/XqJ381T3jwO2p+XFn9pK81YhvgUj0/H0PKQ9njGU8/UILlPKcFP9rW0FcSh 1fKA== X-Gm-Message-State: AOAM531C4UstaXfI1UEWzXLlvk2x/sI8uEj2dsnK+e8vyoCjhhkXg/3W OQBbWFLczsGvpxFWMPGcbGAv/Tww4foyzrjr X-Google-Smtp-Source: ABdhPJzB+E0fVLpQUkUst1OKtIS1+lsa2szrZIrjwB/Vkt7bcZo0bYFKTRq/0nwpCbOVzVOg5av8+Q== X-Received: by 2002:a17:902:6bc9:b029:d0:cb2d:f272 with SMTP id m9-20020a1709026bc9b02900d0cb2df272mr661938plt.11.1599594525217; Tue, 08 Sep 2020 12:48:45 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id n127sm216922pfn.155.2020.09.08.12.48.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 12:48:44 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH 02/16] ci: fixes msys2 build by upgrading capstone to 4.0.2 Date: Wed, 9 Sep 2020 03:48:06 +0800 Message-Id: <20200908194820.702-3-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908194820.702-1-luoyonggang@gmail.com> References: <20200908194820.702-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::543; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x543.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The currently random version capstone have the following compiling issue: CC /c/work/xemu/qemu/build/slirp/src/arp_table.o make[1]: *** No rule to make target “/c/work/xemu/qemu/build/capstone/capstone.lib”。 Stop. Subproject commit 1d230532840a37ac032c6ab80128238fc930c6c1 are the tagged version 4.0.2 when upgrading to this version, the folder structure of include are changed to qemu\capstone\include │ platform.h │ ├─capstone │ arm.h │ arm64.h │ capstone.h │ evm.h │ m680x.h │ m68k.h │ mips.h │ platform.h │ ppc.h │ sparc.h │ systemz.h │ tms320c64x.h │ x86.h │ xcore.h │ └─windowsce intrin.h stdint.h in capstone. so we need add extra include path -I${source_path}/capstone/include/capstone for directly #include , and the exist include path should preserve, because in capstone code there something like #include "capstone/capstone.h" Signed-off-by: Yonggang Luo --- 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 4231d56bcc..f4f8bc3756 100755 --- a/configure +++ b/configure @@ -5156,7 +5156,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) From patchwork Tue Sep 8 19:48:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11764185 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 65D1B1599 for ; Tue, 8 Sep 2020 19:50:59 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 29EF32137B for ; Tue, 8 Sep 2020 19:50:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aFiRn2be" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 29EF32137B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:49246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFjdq-0001Yk-7Z for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 15:50:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40306) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFjbp-0004xi-BS; Tue, 08 Sep 2020 15:48:53 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:32919) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFjbn-0002U5-HX; Tue, 08 Sep 2020 15:48:52 -0400 Received: by mail-pf1-x443.google.com with SMTP id c196so174989pfc.0; Tue, 08 Sep 2020 12:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RQUXptmtYULxXFLhXNz8rEQgcElGqcQ5EArqhM4fRt4=; b=aFiRn2beqwVhRdQoP/bXyAEzDMXzmXBhkGlX4zl0KnLyIi+YcIldWhNInV+IUwgDyh CNnwvvba9bYWHcRnESkS1hjmgjhYB9NRDHMywnPHnhcbomnEsWnKGKOM8S+YebXA2cgi SCbHoXAMGwU80j18pmgY/yycPo88+eCfYGulDyi80nsvlpQMrYDZnuNFBTV1eVfQEGQE f/kcU7WHj4wgS+APoYCPg9XG00OKddKJ5hOfqaJMqQZ1W135lc39yoHZ9LxiEBPx7FKr 3GwoJkYyLSYVwE7M/oZBVrTrWUrtp2jx2jOR7Th8mc4QM4J2rasr+MTo1bewLp5d1p2D E2aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RQUXptmtYULxXFLhXNz8rEQgcElGqcQ5EArqhM4fRt4=; b=TipwVF3s7S4jt7AndCkSAFT2x29ZYftcqxgldxxQPtmCI/K8vUVOqRJeBecX808Hz9 mJpgY5J13VYDhpMbERGBpVuLySC9e9CfgyAjzn1mQwEujIiuMR0zcxiaK9oK5SPjmXAC GZWHlo5Cuyr6OsxbBJTOb29e+T3aNNkaArt+YwHREkIzO29hb+0Qke+mHs4KhAtR6hbd QMcRiwIVNlJ/coTYO39DjIwErdLt6aC6MTuTPx1Rv1jHWHVEKA0j4aWQd/1KJ4nmYJGJ p6u7JpP3GGHfNVh4yL6N94pcEmfMbiYQ8GiTg5QmD8uABcpGyXd513GrJ2JNeSoaA0yL RC/Q== X-Gm-Message-State: AOAM532ubI301pUDDakFhFR2tagCviurwZNGT+Q00SRFx3UVMZQ3LAEK udRQJA8q1he4l8soogrzg94bS9z7RV/zXVUB X-Google-Smtp-Source: ABdhPJwcVs17LtvU+YLsC1ddUM+0cF3mA5csubJzdpXOoLo/Q1T5XUo2seiiRj5Z/7Jw63sGWP96+Q== X-Received: by 2002:a62:16cd:0:b029:13e:d13d:a13f with SMTP id 196-20020a6216cd0000b029013ed13da13fmr638645pfw.39.1599594529358; Tue, 08 Sep 2020 12:48:49 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id n127sm216922pfn.155.2020.09.08.12.48.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 12:48:48 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH 03/16] configure: Fixes ncursesw detection under msys2/mingw and enable curses Date: Wed, 9 Sep 2020 03:48:07 +0800 Message-Id: <20200908194820.702-4-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908194820.702-1-luoyonggang@gmail.com> References: <20200908194820.702-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::443; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The mingw pkg-config are showing following absolute path and contains : as the separator, so we must handling : properly. -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L -IC:/CI-Tools/msys64/mingw64/include/ncursesw:-I/usr/include/ncursesw: -DNCURSES_WIDECHAR -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L -IC -pipe -lncursesw -lgnurx -ltre -lintl -liconv -DNCURSES_WIDECHAR -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L -IC -lncursesw -DNCURSES_WIDECHAR -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L -IC -lcursesw -DNCURSES_WIDECHAR /CI-Tools/msys64/mingw64/include/ncursesw -pipe -lncursesw -lgnurx -ltre -lintl -liconv -DNCURSES_WIDECHAR /CI-Tools/msys64/mingw64/include/ncursesw -lncursesw -DNCURSES_WIDECHAR /CI-Tools/msys64/mingw64/include/ncursesw -lcursesw -DNCURSES_WIDECHAR -I/usr/include/ncursesw -pipe -lncursesw -lgnurx -ltre -lintl -liconv -DNCURSES_WIDECHAR -I/usr/include/ncursesw -lncursesw -DNCURSES_WIDECHAR -I/usr/include/ncursesw -lcursesw msys2/mingw lacks the POSIX-required langinfo.h. gcc test.c -DNCURSES_WIDECHAR -I/mingw64/include/ncursesw -pipe -lncursesw -lgnurx -ltre -lintl -liconv test.c:4:10: fatal error: langinfo.h: No such file or directory 4 | #include | ^~~~~~~~~~~~ compilation terminated. So we using g_get_codeset instead of nl_langinfo(CODESET) Signed-off-by: Yonggang Luo Reviewed-by: Gerd Hoffmann --- configure | 9 +++------ ui/curses.c | 10 +++++----- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/configure b/configure index f4f8bc3756..2e6d54e15b 100755 --- a/configure +++ b/configure @@ -3653,8 +3653,8 @@ if test "$iconv" = "no" ; then fi if test "$curses" != "no" ; then if test "$mingw32" = "yes" ; then - curses_inc_list="$($pkg_config --cflags ncurses 2>/dev/null):" - curses_lib_list="$($pkg_config --libs ncurses 2>/dev/null):-lpdcurses" + curses_inc_list="$($pkg_config --cflags ncursesw 2>/dev/null):-I/${MSYSTEM,,}/include/ncursesw:" + curses_lib_list="$($pkg_config --libs ncursesw 2>/dev/null):-lncursesw" else curses_inc_list="$($pkg_config --cflags ncursesw 2>/dev/null):-I/usr/include/ncursesw:" curses_lib_list="$($pkg_config --libs ncursesw 2>/dev/null):-lncursesw:-lcursesw" @@ -3664,17 +3664,14 @@ if test "$curses" != "no" ; then #include #include #include -#include int main(void) { - const char *codeset; wchar_t wch = L'w'; setlocale(LC_ALL, ""); resize_term(0, 0); addwstr(L"wide chars\n"); addnwstr(&wch, 1); add_wch(WACS_DEGREE); - codeset = nl_langinfo(CODESET); - return codeset != 0; + return 0; } EOF IFS=: diff --git a/ui/curses.c b/ui/curses.c index a59b23a9cf..12bc682cf9 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -30,7 +30,6 @@ #endif #include #include -#include #include #include "qapi/error.h" @@ -526,6 +525,7 @@ static void font_setup(void) iconv_t nativecharset_to_ucs2; iconv_t font_conv; int i; + g_autofree gchar *local_codeset = g_get_codeset(); /* * Control characters are normally non-printable, but VGA does have @@ -566,14 +566,14 @@ static void font_setup(void) 0x25bc }; - ucs2_to_nativecharset = iconv_open(nl_langinfo(CODESET), "UCS-2"); + ucs2_to_nativecharset = iconv_open(local_codeset, "UCS-2"); if (ucs2_to_nativecharset == (iconv_t) -1) { fprintf(stderr, "Could not convert font glyphs from UCS-2: '%s'\n", strerror(errno)); exit(1); } - nativecharset_to_ucs2 = iconv_open("UCS-2", nl_langinfo(CODESET)); + nativecharset_to_ucs2 = iconv_open("UCS-2", local_codeset); if (nativecharset_to_ucs2 == (iconv_t) -1) { iconv_close(ucs2_to_nativecharset); fprintf(stderr, "Could not convert font glyphs to UCS-2: '%s'\n", @@ -581,7 +581,7 @@ static void font_setup(void) exit(1); } - font_conv = iconv_open(nl_langinfo(CODESET), font_charset); + font_conv = iconv_open(local_codeset, font_charset); if (font_conv == (iconv_t) -1) { iconv_close(ucs2_to_nativecharset); iconv_close(nativecharset_to_ucs2); @@ -602,7 +602,7 @@ static void font_setup(void) /* DEL */ convert_ucs(0x7F, 0x2302, ucs2_to_nativecharset); - if (strcmp(nl_langinfo(CODESET), "UTF-8")) { + if (strcmp(local_codeset, "UTF-8")) { /* Non-Unicode capable, use termcap equivalents for those available */ for (i = 0; i <= 0xFF; i++) { wchar_t wch[CCHARW_MAX]; From patchwork Tue Sep 8 19:48:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11764181 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A71A459D for ; Tue, 8 Sep 2020 19:50:57 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 65C6320658 for ; Tue, 8 Sep 2020 19:50:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FNC+ch7Y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 65C6320658 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:49066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFjdo-0001TC-DU for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 15:50:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFjbt-000584-8o; Tue, 08 Sep 2020 15:48:57 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:43406) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFjbr-0002UP-Iq; Tue, 08 Sep 2020 15:48:56 -0400 Received: by mail-pf1-x442.google.com with SMTP id f18so22799pfa.10; Tue, 08 Sep 2020 12:48:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qfatTX2Pahw3MLtTsQ90jsfuDFxj9dg6nxrJN7ZCMQY=; b=FNC+ch7YMYzASNmiUcgDSkK3IOBxHrYSVLawrpj4e5S9iAUrc7LJL9QPhkMyhvoZbI S8jX2hQfZ/DIQVhyDSX3+CMSMAdok5OkUpmmpgGb00RkPKf1lD5QhHQJcDjTfcJWCVce pcVrheKdNqb36ku742Cgo5+S4pmc61C3kD9Ynh3XlHsilddfnrPhXlqADnrH3XtcPNdN 0EZglBzlEKE3g9vUNWsENQgN+2sUsybV3za85y//FZMhK8bF+kzyzwJXI0ksac4k4OrG sNOmXSW9Ei1Pv3MvGzJWxMQ3zpVXCiLX1sBYgjSRj9gNTQvK8XRq4/+Iky82EP1sbH6u tn/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qfatTX2Pahw3MLtTsQ90jsfuDFxj9dg6nxrJN7ZCMQY=; b=LvAJoYG85vLd1Z0Dr+4ghiI8JMaElxHDRZ70hSbqhGRvNFcOXWRUgjavlRIExWCg71 EGai49J0TvXPWgr4HC1DoChpATnyiEs1R7zE1BxB6o9FpZLpcBB8KqI7qgx+zoEd1K0+ dKF8Ex69EKrGa2xwaqXTS4cZcrReh5nexO7lzFCRdc/QT0JFGuok3EEkjwmXflEyku5V yMIQI8iQ3jNZKlSeHebFLpmq+gDxUXJnUlBDJeIQ+tjgmX+gIsVVNCJH9umMq17koIJq LOBnVgnsOKoRjp03aO9YNNlgB4tciwIPvbmUWrtSR+F+Fhc+dYNZ4xvKr6acNQtkMYe1 imkw== X-Gm-Message-State: AOAM533z+Crw1ddOZ4dKOw/hJ62oncYOF/jqFQFiKxXhQscjfDBfow+r 2AmibzsantZ0WEJLjUpuRq3hEGdluo/3LZaT X-Google-Smtp-Source: ABdhPJw0DWfVh8XdJz4hcghoxvqGIXvokdTs+pmWDFjhfi21V8EJFloLpdy9uz2PE+5QMsZNfaMVxQ== X-Received: by 2002:a63:355:: with SMTP id 82mr257177pgd.384.1599594533472; Tue, 08 Sep 2020 12:48:53 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id n127sm216922pfn.155.2020.09.08.12.48.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 12:48:52 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH 04/16] curses: Fixes curses compiling errors. Date: Wed, 9 Sep 2020 03:48:08 +0800 Message-Id: <20200908194820.702-5-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908194820.702-1-luoyonggang@gmail.com> References: <20200908194820.702-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::442; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is the compiling error: ../ui/curses.c: In function 'curses_refresh': ../ui/curses.c:256:5: error: 'next_maybe_keycode' may be used uninitialized in this function [-Werror=maybe-uninitialized] 256 | curses2foo(_curses2keycode, _curseskey2keycode, chr, maybe_keycode) | ^~~~~~~~~~ ../ui/curses.c:302:32: note: 'next_maybe_keycode' was declared here 302 | enum maybe_keycode next_maybe_keycode; | ^~~~~~~~~~~~~~~~~~ ../ui/curses.c:256:5: error: 'maybe_keycode' may be used uninitialized in this function [-Werror=maybe-uninitialized] 256 | curses2foo(_curses2keycode, _curseskey2keycode, chr, maybe_keycode) | ^~~~~~~~~~ ../ui/curses.c:265:24: note: 'maybe_keycode' was declared here 265 | enum maybe_keycode maybe_keycode; | ^~~~~~~~~~~~~ cc1.exe: all warnings being treated as errors Signed-off-by: Yonggang Luo Reviewed-by: Gerd Hoffmann --- ui/curses.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/curses.c b/ui/curses.c index 12bc682cf9..e4f9588c3e 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -262,7 +262,7 @@ static int curses2foo(const int _curses2foo[], const int _curseskey2foo[], static void curses_refresh(DisplayChangeListener *dcl) { int chr, keysym, keycode, keycode_alt; - enum maybe_keycode maybe_keycode; + enum maybe_keycode maybe_keycode = CURSES_KEYCODE; curses_winch_check(); @@ -299,7 +299,7 @@ static void curses_refresh(DisplayChangeListener *dcl) /* alt or esc key */ if (keycode == 1) { - enum maybe_keycode next_maybe_keycode; + enum maybe_keycode next_maybe_keycode = CURSES_KEYCODE; int nextchr = console_getch(&next_maybe_keycode); if (nextchr != -1) { From patchwork Tue Sep 8 19:48:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11764163 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9594759D for ; Tue, 8 Sep 2020 19:49:40 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5C8A920768 for ; Tue, 8 Sep 2020 19:49:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gA91ZjGy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5C8A920768 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:42060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFjcZ-0006zS-Dd for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 15:49:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFjbx-0005GT-Aa; Tue, 08 Sep 2020 15:49:01 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:42075) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFjbv-0002Vm-JV; Tue, 08 Sep 2020 15:49:00 -0400 Received: by mail-pf1-x443.google.com with SMTP id d6so26421pfn.9; Tue, 08 Sep 2020 12:48:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FykcAGlQ92KK8Qz4pGd0AfXWzqAA8073pCgMiQdYiFk=; b=gA91ZjGyT/RxlTSgC/+KW6G0ko3p3sKrjs692qW5jAFheJSH6Fk6vYajypISOfcYEI bL0N7sX7eGyRtHjaVKFrtxkmypxQP3RWvJFlwpIItGTbk2RH7lIOQtbUUn/TtzFTsr97 tqpdw/UfQmqPbUyL1WJHhJoSFenFTHuHZXNjvd0XTZQULBTuiwkQSy2fztVygR18q8KI s4WgegmIrUl0YpW5adepw/goJL9Ij4jHXaqrlZMz2SBxUOMMfJFe5sv4YEdOwE/NBO6I 9XanFqYJ0+QWVEkPwjE7pdxYSxlEUVFgwLHNWAhCR3GrUnUo3gsAOwzLF5jSnYgzRwD+ 64IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FykcAGlQ92KK8Qz4pGd0AfXWzqAA8073pCgMiQdYiFk=; b=ub5MSoFPvDiG/hfLq8Gsye7TrnLt9JWzQ1veCL3aFPsq6vH50w2rrqFQWDzAgQ9Y2C UCTM4g4+NqRPGTKzmZEBW+/abxenQpsWsx32jmZ8MD7VOD9rpdpAQyVW/O9bkpb12nBK pLPJs7sd4R3iSxEAFufZo/TnKsWQ9YMwp/ScWkyUcOdyg/6uHbIBJvtC/88De5y3luxf +dRh3WGrIekzhUWJGZkMbzxZgZ/hNGuFV5+eRWcK9hn+TAC/0f/MXEYd6jRigc0jDX4l PxPgNq2pxe9HfUGNL836gwq33d8s/8GN5zPbBAWx2O4Fhwnk2ltEN3LufdB2t/hijpZv v8hQ== X-Gm-Message-State: AOAM53035CA7PpveTE7ua6WW6oJp5uGsu8r7xMGroYSch1tLS+QH6g2S NtpK59w4g/PuYRNQ4d28PC+shbwqse1kebt1 X-Google-Smtp-Source: ABdhPJxQgMzmhzlyBh4e55RPzzxExnIpT7gbimqnyDkR6dUkmHFJEqdv9IcxKi4wmhGm+IK16gC2gA== X-Received: by 2002:a63:5515:: with SMTP id j21mr253428pgb.31.1599594537629; Tue, 08 Sep 2020 12:48:57 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id n127sm216922pfn.155.2020.09.08.12.48.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 12:48:56 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH 05/16] tests: disable /char/stdio/* tests in test-char.c on win32 Date: Wed, 9 Sep 2020 03:48:09 +0800 Message-Id: <20200908194820.702-6-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908194820.702-1-luoyonggang@gmail.com> References: <20200908194820.702-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::443; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" These tests are blocking test-char to be finished. Signed-off-by: Yonggang Luo --- tests/test-char.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test-char.c b/tests/test-char.c index d35cc839bc..80e5bac61a 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -103,6 +103,7 @@ static void char_console_test(void) g_test_trap_assert_stdout("CONSOLE"); } #endif +#ifndef _WIN32 static void char_stdio_test_subprocess(void) { Chardev *chr; @@ -126,6 +127,7 @@ static void char_stdio_test(void) g_test_trap_assert_passed(); g_test_trap_assert_stdout("buf"); } +#endif static void char_ringbuf_test(void) { @@ -1471,8 +1473,10 @@ int main(int argc, char **argv) g_test_add_func("/char/console/subprocess", char_console_test_subprocess); g_test_add_func("/char/console", char_console_test); #endif +#ifndef _WIN32 g_test_add_func("/char/stdio/subprocess", char_stdio_test_subprocess); g_test_add_func("/char/stdio", char_stdio_test); +#endif #ifndef _WIN32 g_test_add_func("/char/pipe", char_pipe_test); #endif From patchwork Tue Sep 8 19:48:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11764193 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 930F659D for ; Tue, 8 Sep 2020 19:52:39 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4991D20658 for ; Tue, 8 Sep 2020 19:52:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MmxlGmlr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4991D20658 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:58498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFjfS-0005EW-6V for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 15:52:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFjc2-0005T8-4l; Tue, 08 Sep 2020 15:49:06 -0400 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]:51226) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFjbz-0002WE-Vz; Tue, 08 Sep 2020 15:49:05 -0400 Received: by mail-pj1-x1041.google.com with SMTP id a9so143225pjg.1; Tue, 08 Sep 2020 12:49:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ax2yAUytKuTKhH+tVXqGE0gj/9bVazXwd00LBZJO+WI=; b=MmxlGmlrMB1zBns2ND17DCcVu5QJTtV4ywCMlFKhGerHtvmlE1yfh7ZvjYKPlrYmYa rkWiTDoEhwpZABoIxYId+AUhQMD749hWgwl/3vKuHEuGBBD21/KiUK4+IeUxqdyXwg4a n7tNfMl6zBvJWGwA6MN3KsCm8H4AsJQ6qGlAS/mGJq7loosLyE75jJT+z6mTZ19cUSpG 8kFNpZxCl0nrtpyDKA782cJ+4IexMdU8674UmO+RQIv52S5kHXMMHU1JOFwGzc5HKb1B FkY7o7NHa50dI8TShpgTjo5GPHZBXYmsPKYEUECy/2BN2ACg+mgHr08YgsFJ0J8Qxaob aY/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ax2yAUytKuTKhH+tVXqGE0gj/9bVazXwd00LBZJO+WI=; b=jK4U0lrx4JHbnHYnennmoxgyd0Kau5p4EhQpDwtZI+9yQMrY6BWW6XJZ4DsaeORabv 1QIrm0aK5m7MO5WCsnHBcAp36L21lY+jyhynSCY/eY8i3F40hGh5dxywGR0VKytwIjRe 3+/v3oU4cUYlF5SjzTyf3xaekUmxx8I1/F9JqZRcNdIxGa6vSiUk0CzRK7n2/XLy+V4Q qxNqw5T5qk7TyLLCKe5VpCQ0P9gX3nBBRiWrtQL0KyPGu9gaRAA9OBCjdSpNvz8fsxsJ g5jKv+2vCsxivq/XPKqzFfzOy/hOdknIlZfUwgPAx0fHd6XYIE/MbT0FjFTpz3/EcC5I xnbw== X-Gm-Message-State: AOAM5328ranJ81uLaa1KvtX4pGsGZf7KmtgOtPn7cSCQBD24uaRVuadN pdPu9ZrBBHVn1+/slTjZzTMlzRXRwoPGpY3F X-Google-Smtp-Source: ABdhPJwuiwpUeTbHuqs/dXumJCl1Ay02yRcM/Gw8gnR8b65y//rpHsDalbFMxECVUncPV/ct4wxcCw== X-Received: by 2002:a17:90b:100e:: with SMTP id gm14mr375504pjb.200.1599594541765; Tue, 08 Sep 2020 12:49:01 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id n127sm216922pfn.155.2020.09.08.12.48.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 12:49:01 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH 06/16] ci: Enable msys2 ci in cirrus Date: Wed, 9 Sep 2020 03:48:10 +0800 Message-Id: <20200908194820.702-7-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908194820.702-1-luoyonggang@gmail.com> References: <20200908194820.702-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1041; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1041.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 --- .cirrus.yml | 24 +++++++++++++++++++++ scripts/ci/windows/msys2-build.sh | 28 ++++++++++++++++++++++++ scripts/ci/windows/msys2-install.sh | 33 +++++++++++++++++++++++++++++ 3 files changed, 85 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..d9d046b5b0 --- /dev/null +++ b/scripts/ci/windows/msys2-build.sh @@ -0,0 +1,28 @@ +mkdir build +cd build +../configure \ +--python=python3 \ +--ninja=ninja \ +--enable-stack-protector \ +--enable-guest-agent \ +--disable-pie \ +--enable-gnutls --enable-nettle \ +--enable-sdl --enable-sdl-image --enable-gtk --disable-vte --enable-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 \ + From patchwork Tue Sep 8 19:48:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11764191 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 72FEC1599 for ; Tue, 8 Sep 2020 19:51:16 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 31F4C20768 for ; Tue, 8 Sep 2020 19:51:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hsoKjpZz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 31F4C20768 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:51168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFje7-0002K3-69 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 15:51:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFjc5-0005dB-M2; Tue, 08 Sep 2020 15:49:09 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:38280) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFjc4-0002Wf-0F; Tue, 08 Sep 2020 15:49:09 -0400 Received: by mail-pf1-x444.google.com with SMTP id l126so43459pfd.5; Tue, 08 Sep 2020 12:49:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J6p0/9F4oWoBiAN/SDJT/VDhYaeCOAUy66N0oF2OF+w=; b=hsoKjpZzU++qYNwxRHVkn7unxV1wvAL5SLrtYf0HPBMbwexpaK9bF16X4RI2iuFwMI /c5LJJIERYGn+qE631uorCteGmCYA4KHyzqtdoyQ8QlYnQf+QTlNG7vFWUMa+iex5IdR 213PDpIREnAPF5rPXxfyQcycnEmYHCOEjGg+jGfWHyGHs538dwc0pZ/kF9uOQcq9r8S2 eSfKVPYwhEuQeuW36L2f3LmGLMbbubj29B6RQhKvG2/VcIiTa83qZcDXhxpNyRnWADGg mosR0wtx072zNAY+uTIXVsZAeG98fJXNhC/ff+54Xm6oKOnRr2nAuQaw7QzVHb6SyYnn KqyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J6p0/9F4oWoBiAN/SDJT/VDhYaeCOAUy66N0oF2OF+w=; b=oA7ooErdyVflAvg81EsOBjQpsV5yrEV4KboyTzsGtlCrTTQGAJIL/cIRsmNrkHVi3O ci9Vdulq4+HYf+hx//k+nvBrPLfKQL5VOGqhvaPqKRn+JtwaoLY9WeEIcgKl9sgDWo99 dQVkLyXLstVxl55xwruOR636GrajuIUBPhQFmeCpiA0q0C76+HU/fsXAhmEphDizthir qDAwKlEWkALt4Acx3M0+Y9DBTQUqe7vOCWNVCw53bRrPoWlay8cUpAY8nVHpEyEJu9U+ 4WAGG0azZiRfGv0bKy3PoUL+JJ3UBwiA1taxr9qsBXY6fvQt9j8AxfHce+SsVi3GfhsT 0BDA== X-Gm-Message-State: AOAM5330plJigzH6wwzCa/wvyp0Vqc6pTBuRfRwzJVgcErYjBoCFp02G XR5tBuupnWMgJIALZgjt8cZlzSMEUpNAN1+4 X-Google-Smtp-Source: ABdhPJwVmd6Jr3RlNaxRhsLJ2RSAEOD2zxNZVC7vSsSsIr4O7GwlkBC8SaamvjCs4thNSSF4gHTSAw== X-Received: by 2002:a17:902:74c8:b029:d0:a7b5:248a with SMTP id f8-20020a17090274c8b02900d0a7b5248amr640915plt.13.1599594545896; Tue, 08 Sep 2020 12:49:05 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id n127sm216922pfn.155.2020.09.08.12.49.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 12:49:05 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH 07/16] tests: Trying fixes test-replication.c on msys2/mingw. Date: Wed, 9 Sep 2020 03:48:11 +0800 Message-Id: <20200908194820.702-8-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908194820.702-1-luoyonggang@gmail.com> References: <20200908194820.702-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::444; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" On Windows there is no path like /tmp/s_local_disk.XXXXXX Signed-off-by: Yonggang Luo --- tests/test-replication.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/test-replication.c b/tests/test-replication.c index 9ab3666a90..cfc1ae6feb 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[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"; +static char s_local_disk[PATH_MAX]; +static char s_active_disk[PATH_MAX]; +static char s_hidden_disk[PATH_MAX]; /* 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(); + snprintf(p_local_disk, sizeof(p_local_disk), "%s/p_local_disk.XXXXXX", tmpdir); + snprintf(s_local_disk, sizeof(s_local_disk), "%s/s_local_disk.XXXXXX", tmpdir); + snprintf(s_active_disk, sizeof(s_active_disk), "%s/s_active_disk.XXXXXX", tmpdir); + snprintf(s_hidden_disk, sizeof(s_hidden_disk), "%s/s_hidden_disk.XXXXXX", tmpdir); qemu_init_main_loop(&error_fatal); bdrv_init(); From patchwork Tue Sep 8 19:48:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11764189 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5D3B21599 for ; Tue, 8 Sep 2020 19:51:07 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0FAD020768 for ; Tue, 8 Sep 2020 19:51:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Fqr90YWf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0FAD020768 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:50106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFjdy-0001tx-22 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 15:51:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40436) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFjc9-0005oi-Q5; Tue, 08 Sep 2020 15:49:13 -0400 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]:39405) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFjc7-0002X3-VU; Tue, 08 Sep 2020 15:49:13 -0400 Received: by mail-pj1-x1041.google.com with SMTP id s2so133676pjr.4; Tue, 08 Sep 2020 12:49:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ptTGH2qI85N+szgczRA8YGLjVKH01noRoeLoG/lJ5SE=; b=Fqr90YWf/CRBl329DxcVSxjwNJrNyNX2p7JYpWNGmFNKIzGbTeJlQCnJNRQZUEbUNf rf9J55AI4T8qLTgILwEPBeVGRJkmoLGJIbNIKz4tIqYzjE62nFwVetF8jA3wSlOLUhr2 0rd35ABpFXGmh5xY+BF2flsM0UV+qSRJt4we3pmqbOQj2y8Ywv4rLgyh9NwO0jUsovF4 x+AYUA3DQUcX6qIJUF5FFRuy4MAQps4LJ0T+qXFLIEBF/k+ccfbYovBzxSaRhy0xa/h5 wH+tD3us4QCnguqZ8J5NJwSUJ6AsLDh2slqvqioaGVEwPmEPUKyTexLuLv7m9V/O8v1I B60A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ptTGH2qI85N+szgczRA8YGLjVKH01noRoeLoG/lJ5SE=; b=T/vch4fRf4gu9ae81PEofIVBL2szCYyWQIylx7HGcX99CKLt4xsm6c+vUcNeUklxHR f46AhqbYindoYB8vJl79zNc7p7gSoJye2TEL40YVtjxgO+tNFS+6C0kUNYO13voTDC5T WwYaNgJEgc3q6FoSJHywYFNm6WJCoFkTJElze6Kxxagcfuqz18j4OUjyWC/O6u8DRIKf l7I6/KZaD+2STKtHwAuyZULe7IzGaHOxLB3wr3bL336rE5dy8R9hDE2J/nTbKiuf7c7p hTptIRmQmTfwVqZ+0EGQm/ZzsWVrxwf7lW67P709sP53cFqP3O/vn3I+dHGIbR716vs7 6Ncw== X-Gm-Message-State: AOAM5324B7vCK+9f7dAJsk4TIs5xkX12LLuI9vGfjWTT9bIrhuYYnYfh I4qdh85QwevhcDsAUaGjiL9Ogh3wGO5+WvPZ X-Google-Smtp-Source: ABdhPJz+TEu6zL1phhnqip2QfWORUbltlcV0twxCNmxAHLDIVg0YPrAuYK6yKTXOvhkkVXXtJynk4w== X-Received: by 2002:a17:90b:1050:: with SMTP id gq16mr410499pjb.234.1599594550024; Tue, 08 Sep 2020 12:49:10 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id n127sm216922pfn.155.2020.09.08.12.49.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 12:49:09 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH 08/16] block: get file-win32.c handle locking option consistence with file-posix.c Date: Wed, 9 Sep 2020 03:48:12 +0800 Message-Id: <20200908194820.702-9-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908194820.702-1-luoyonggang@gmail.com> References: <20200908194820.702-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1041; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1041.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Yonggang Luo --- 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"); From patchwork Tue Sep 8 19:48:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11764195 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 03D8959D for ; Tue, 8 Sep 2020 19:52:41 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BDD3120658 for ; Tue, 8 Sep 2020 19:52:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="b9Jz+yFL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BDD3120658 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:58548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFjfS-0005Fi-T6 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 15:52:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFjcD-00060f-TL; Tue, 08 Sep 2020 15:49:17 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]:43352) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFjcC-0002XL-Bf; Tue, 08 Sep 2020 15:49:17 -0400 Received: by mail-pf1-x42e.google.com with SMTP id f18so23474pfa.10; Tue, 08 Sep 2020 12:49:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XFEZh3+xvAfqz2f0h/nVnmxCipA8eA9k8U4UHOk894U=; b=b9Jz+yFLKdvbyfqRNfyX+pj+pQdmgwK96Mmn1NqM3m7Re3Kbu5mQ5RgCJSnsm/ul6o uBEsQEGxc6HVJ8jQmflr9eJU/oOdd+1RrMgJUJDktCD0fUJn8Qi410biySUeytKieBa2 0F1s2/gcmm0aJy6INd8avwkHA9G06pIAF+iYgC/56GL2r4ixMk9CNXYlzlbhmpMDBllJ Dg+YG1WOOoEi+yhSbLRScbx7QYpAFVzydcb41nebjuQtcuqX0tVUKFHuUcZc22Xeesxq kjQRK0+HQ/7wp9kdMJQo9cAmvtD3q2l4cDPybFoB9HA6m0Z0hsHoNLbd55RPBcSL2tjT SbVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XFEZh3+xvAfqz2f0h/nVnmxCipA8eA9k8U4UHOk894U=; b=fAKLvT3ORjQHYC8LkLraOPvFZa0DtolmRNWNnaBQP5HEe1Gyn2o7gkzxLpg8pEp3K9 seOae21VWX0IzGEOJK74c4oVsM9Rim6cuqexbVYSaz6espARP+iYx4WFDnOwhdy+TtQg VJ2wJKkDfF5jLmcg2cMOkEILwoGVrxlV92Ip8f+sauD1ysuy+VhZyPgMIqjwM9aTcD50 Mgw0KPn8nbeluQ+CuuU5mxl6RY70G4kC/+jU3AzWaKH0DiWw/2bgkznJ12abngILovaZ x3Dxi9SsSm5MUzdcczNmSomAI7nuGMXfPkB63+tAPUSAmukbTSin2mS1ebyOuHmqjtR6 S2zQ== X-Gm-Message-State: AOAM5308MKuaZxlKKNs+0lMI2zJg+Wj+0CpV//H+SzINQPe16cRJhaMC ofx+3yw3veFa+ml/TXlVunKw3vA9scu9+bHJ X-Google-Smtp-Source: ABdhPJwhGI60FA1ia0Cg6mDAzAE8FTNof1LIQ+rqzksih1Ry/t+o8zghnJ06WgqXTYQxcLLLGZ1org== X-Received: by 2002:a17:902:ac83:b029:d0:cbe1:e71c with SMTP id h3-20020a170902ac83b02900d0cbe1e71cmr698009plr.42.1599594554182; Tue, 08 Sep 2020 12:49:14 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id n127sm216922pfn.155.2020.09.08.12.49.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 12:49:13 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH 09/16] osdep: These function are only available on Non-Win32 system. Date: Wed, 9 Sep 2020 03:48:13 +0800 Message-Id: <20200908194820.702-10-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908194820.702-1-luoyonggang@gmail.com> References: <20200908194820.702-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x42e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 --- 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" From patchwork Tue Sep 8 19:48:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11764197 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BBEC51599 for ; Tue, 8 Sep 2020 19:52:46 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7B08520658 for ; Tue, 8 Sep 2020 19:52:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="V6nn4pcn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B08520658 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:58774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFjfZ-0005Le-Ky for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 15:52:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFjcI-0006Dl-B2; Tue, 08 Sep 2020 15:49:22 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:36204) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFjcG-0002XV-J9; Tue, 08 Sep 2020 15:49:22 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d9so51269pfd.3; Tue, 08 Sep 2020 12:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=INK+kK1nWbJF7y+rXihzR5UqDDo3HdyPVAq4bdijot0=; b=V6nn4pcnL30ehqXQzPe1KBoBzzKm6eGqBUxesciQmyC8zX6UVJ44msCrAKEx5e9t7y TD/1Rn3SsreOBSOGOfSaf8R5aWQmVKRIxPU5wp5YqhmwDHdXcn6jvHoqFiA7V1HzaNDy Pt4uiiMKCSDlgMHFJyRldDrDpZqHYtGnKN8O8Kf+LyWl6YOhfviFAsGu4kx1rFfASE85 5Qu7Rv358uzVCQsVLY4HFZP7hSD/maA5uefNBXLgVw7c8y2pWtv8bXeGaZcxmsD0fJ61 8DFcgBSUsowLRPKyb5HPthfn/Vf35yHK8MgtXqiKcgfkpRsmoZSnVD5gcIQ8o/mPgg4I R09w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=INK+kK1nWbJF7y+rXihzR5UqDDo3HdyPVAq4bdijot0=; b=PyKK73La6RYyDt+im6zNQyd0m9FiEjUxKoo81OcLhNB9LbCJjRV/scNM8YrPzipe2i ET83dAfTJpihtSyc4Tpny8pk9b4O6qcpyNj2sg1ms7ocGa5GCCJT9C8kqgXZhHPFrBiO eMOHviogHwoaq6R+TdCsWx2TvbKXnfvBvntqZPI/AkFzqGANAcRTxbKJGlV7YqPeLfFL tvyRI0nZ3tMPfST8PwCOFnPk3buDK00WZo6I//YxnNq5TpJYCHWvroGTcuYOJvyLnyb3 rLqUl91votqnUbixcNze0ficoZs9HIznPg3pCabpj0QzOwE46IgWWxhrzA28b+C8Oo2+ UOrA== X-Gm-Message-State: AOAM530IRVRzkpjRL9gp3UwWgQWGHxhuvUX7tXbw9QNbWmPmsvW7vqvi eIb3a5OEpttcV77sMJpUZ8jyn6JRe1BwkR/f X-Google-Smtp-Source: ABdhPJwUDRreLw/8rTSc/YKm5sOooQFPCdwHcxyxDNOBrOsWzOnRPWsqBHwJQc3mDrR6hf931EywWw== X-Received: by 2002:a63:4405:: with SMTP id r5mr270755pga.382.1599594558554; Tue, 08 Sep 2020 12:49:18 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id n127sm216922pfn.155.2020.09.08.12.49.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 12:49:17 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH 10/16] meson: Use -b to ignore CR vs. CR-LF issues on Windows Date: Wed, 9 Sep 2020 03:48:14 +0800 Message-Id: <20200908194820.702-11-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908194820.702-1-luoyonggang@gmail.com> References: <20200908194820.702-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x42c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" On windows, a difference in line endings causes testsuite failures complaining that every single line in files such as 'tests/qapi-schemadoc-good.texi' is wrong. Fix it by adding -b to diff. Signed-off-by: Yonggang Luo Reviewed-by: Eric Blake --- 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']) From patchwork Tue Sep 8 19:48:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11764205 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1565B59D for ; Tue, 8 Sep 2020 19:54:19 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C030620768 for ; Tue, 8 Sep 2020 19:54:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AtAeqahI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C030620768 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:38870 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFjh3-0000Fz-Qt for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 15:54:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFjcM-0006Qv-Ub; Tue, 08 Sep 2020 15:49:26 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:42081) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFjcL-0002Xn-06; Tue, 08 Sep 2020 15:49:26 -0400 Received: by mail-pf1-x444.google.com with SMTP id d6so27238pfn.9; Tue, 08 Sep 2020 12:49:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yqpsa73bQrzKkEPT9F/kH2K7vNqI8slBD9edFCTrOo0=; b=AtAeqahIaVUAJpCf42i75pB5vhCazSyFJ1qxd/QD5jCVs3AbQWsB99T9KIYqZ6v9nr DhuhCoqTNMcItNGyHOYhUen9VEemY5E+20Q+PA3niKFeg03OLtXJtxz8JsFxFE8e5hbQ EoVn8Q3UeUYlkLCQazOv3tx3tsUd64znywDmoic1Q0peyJu1Z1hcCDzO6L5xy7cERp3Y MbHRTM93gKIDTwrK+QXttFfn0Ml6OSzaJoeRK8t9PEx6IhLBZ1c07TXp+2MPcQBCqZ9i 31weaSVCOr613ig8oGkLwEHTaQ7bbaLjDQoQ4msv/ZkOKW5i/1wejs6ZbrLFJg+lKRwf WeTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yqpsa73bQrzKkEPT9F/kH2K7vNqI8slBD9edFCTrOo0=; b=UcKhCAdbP0EZWMY9YkMigtQ0cWQNjQMi3mIIPHvGSsLAU9+yxI+QQn22EvgVniELRg E5odi13pTJQ3A0Ys3c9xMOgY9Ngu/Gq5HB2j8ptEr7eiwIZt+IcuYSpIV0fM2ZKi7ev0 O3AnBXKG2QJei3I+NcHm9bBY4IXoOh7fQdGs+FU4psPN3aLYm+G+mTRNa2PcWJbJdozn CURsCZM/CeV1a7DTau9k1t8EDftzNN4P+uYBYz2P5pVjuhGPaK5R/fV9v7GazzXBsEll JK9K3WIc3ShYoLAy2gQMim+xI4RxBSHhoeAr8P4bfnaYfF+P/looM+Xh4Nq3jtmEAbmq jzmA== X-Gm-Message-State: AOAM530Cq1jETJ/3b3qDlWEWlez3fkgo2PnVWED8LDI9fpCw9JwG3zFy qReWH+9G0tcL6G2GzxFeUqWSbdRUwdBTHMzd X-Google-Smtp-Source: ABdhPJzJAZgO9ILHPeHhANTLXXAoaJCB71EdQqYU0pL8Mv0UX1o/59Z3ZzAqA254z5A9Py1GTocjUg== X-Received: by 2002:a17:902:8f8a:b029:d0:cc02:8541 with SMTP id z10-20020a1709028f8ab02900d0cc028541mr694317plo.32.1599594562940; Tue, 08 Sep 2020 12:49:22 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id n127sm216922pfn.155.2020.09.08.12.49.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 12:49:21 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH 11/16] meson: disable crypto tests are empty under win32 Date: Wed, 9 Sep 2020 03:48:15 +0800 Message-Id: <20200908194820.702-12-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908194820.702-1-luoyonggang@gmail.com> References: <20200908194820.702-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::444; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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]} Signed-off-by: Yonggang Luo Reviewed-by: Thomas Huth --- tests/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/meson.build b/tests/meson.build index 998e4c48f9..b470a90e3a 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], From patchwork Tue Sep 8 19:48:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11764201 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E331C59D for ; Tue, 8 Sep 2020 19:54:12 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A9A1620768 for ; Tue, 8 Sep 2020 19:54:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="q+p85ef8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A9A1620768 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:38352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFjgx-0008UE-S3 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 15:54:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40510) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFjcQ-0006bV-OE; Tue, 08 Sep 2020 15:49:30 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]:42794) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFjcP-0002Y0-40; Tue, 08 Sep 2020 15:49:30 -0400 Received: by mail-pf1-x42e.google.com with SMTP id d6so27356pfn.9; Tue, 08 Sep 2020 12:49:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=30KkRCFEtXNka1aga0YHq3EqESHJABavOs610tDas18=; b=q+p85ef8a3EKzgpllK8bF6DDmoTMT3WWdcPtbx5xDANt1wZ4ydgna8jRjINQtGKxtN RALOjee9svUEpcKlEvwoprqPAxrLvfIN+ptIHCj6UEmGZJ4rPlovYLN8JEIjDfWcdGiV mLnvKcjy9Gn7pY9en7fBvDh1pwEXXrvE+TI/07JFugE3DXHd/pPZc4vWwAtPclGbzLjZ D2+KJym71ZA+Z5nV+gmPFwhJN9mx7ytJt+otdq4REVYAaKycHsFSkqAmSImE56r+Pgw4 c3gcwaNPSlV2sFOqv0z0re2SjgQ/8P243QkjH30i/Xk9EhmhQcT/l00yXAxOUXKPMtS6 TTEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=30KkRCFEtXNka1aga0YHq3EqESHJABavOs610tDas18=; b=cvic1TnsDIOuudt5JOgAA0rVsbeuNPcuo8ld1TzkAG0xAra+0vATqPGkx1CNhf5Cf0 iAXxtBHL/J+R1LzLT8WPxHexFnYRBH3zexK+f3I7/Ki2MqHGsH+17UQvaBjJAHFGa0Yu Q5x72B3JN0NoeygYnIDnXq7+J/0Hhqs/BhaYQz00hkukq2wuDkcZF6epDE0V5oe3WoU8 PkOK0O1I9irTuuo//9pVZ4SxLVaiRhCUnRqP69DekgdxhvJ0LG//UvEodZVeeUW7Gx9i +n5RCNtLCa2/lRQhMsx+EnWXeqbdl6dtwNNCtpDfM4y/e6AWTd+vxD137qRX0FkAHUX0 4aLA== X-Gm-Message-State: AOAM532oYLvg6DZiAfGOqPjfUKiDePj/5J10nHxLB8U8S5/bMvtN5ueh swdTNnMwAkEtRCQR4FL57YWmd/j8zF0nhBjT X-Google-Smtp-Source: ABdhPJykW8UuNSMZAZRXw7m1Asu0y7vFxSy05CIZz/DrPpBfErJPgb/XlGJAn3SKc2VbbCOKv1hOmg== X-Received: by 2002:a63:5160:: with SMTP id r32mr301050pgl.112.1599594567064; Tue, 08 Sep 2020 12:49:27 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id n127sm216922pfn.155.2020.09.08.12.49.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 12:49:26 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH 12/16] meson: remove empty else and duplicated gio deps Date: Wed, 9 Sep 2020 03:48:16 +0800 Message-Id: <20200908194820.702-13-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908194820.702-1-luoyonggang@gmail.com> References: <20200908194820.702-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x42e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Yonggang Luo --- meson.build | 6 ------ 1 file changed, 6 deletions(-) diff --git a/meson.build b/meson.build index 5421eca66a..0b1741557d 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 From patchwork Tue Sep 8 19:48:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11764219 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 584E615E4 for ; Tue, 8 Sep 2020 19:56:02 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E387B2177B for ; Tue, 8 Sep 2020 19:56:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pz4IkLjK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E387B2177B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:47500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFjii-0003mt-ST for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 15:56:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFjcV-0006o6-4s; Tue, 08 Sep 2020 15:49:35 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:42081) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFjcT-0002YP-GL; Tue, 08 Sep 2020 15:49:34 -0400 Received: by mail-pf1-x441.google.com with SMTP id d6so27495pfn.9; Tue, 08 Sep 2020 12:49:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9VMmLATL4hLY9MeoSmcNwnDOjnsVNymdFAgQMcXeglM=; b=pz4IkLjK8gQWUXjVwDneCTJm3Owd5jgTCAkilSbIlKyREL3bW3t+9SJfpJBJ3jKjcr 6M5GXy09Kf7xPlsg1ltYDJnbDuFp+SLzhuToSQQAlOznmAQKdFvWn8Le5+XyP5AEL2Hc kU5UYgevfWRTX7Z5bhOC1SSDJXGz847EnHaINBuIoyhdKosu1h8fdYwAPI2ZFKveO4+/ lXGHYUgSsgyirlmEcVQwuav0GUfIr4YxB39REK5oxpnPUseXOliyTAJYCRZfS4qPjKq0 WyKCnQghts/YmgPHxaNpPMEZXjZdA70rMPXmtSheIpIxkNVQj0tn+KRup7lSUHPHA6jO zneQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9VMmLATL4hLY9MeoSmcNwnDOjnsVNymdFAgQMcXeglM=; b=SgjRBPQp7dFo9ZpvVh3oS90L2YIXQXF3mH1dBEcSHgFIFVRGATjEdKahN40u/moYj2 qF0FLLFZmbngF33QgaM8WXDQpPhrPNQVunUsXEUrXr4GxBaGDhEMh9fkSvfzQ2lg1mJT ecnfu9rnX/e6viWmmDiwaqJR62IkwVCIuMQIEpKnewpyv1tjBCmdyJ6aKlXWRn9FAOKs mHXfnXn2Hz9Jh4L0isAo+K2MvmG9epzsoDA1ST9RzKslr6iMm3hqLv2j+v/HwRwIc54Y CspDpOrPa5gfhcOE1dUvW094njwyWEfFjsa3h37tQfHC8atkmj/p5OSO9MCkHZ4j/iu5 0OKQ== X-Gm-Message-State: AOAM5334FqFNS8yz7X8rn6wu1rtSxBrNmrfhkzIIVBIhtQOiCLUIt9Tp vip6ZBoGGVcQNNDxSCo8iIBMFtaLY3/ctyme X-Google-Smtp-Source: ABdhPJzIgvb3QM/Xr6VxZDXvFm5dAVucnZ+CTpDQylrdcso2aEW8cYsdFy7sm7klA8XklHvzRvPOmg== X-Received: by 2002:a63:b44f:: with SMTP id n15mr280153pgu.282.1599594571379; Tue, 08 Sep 2020 12:49:31 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id n127sm216922pfn.155.2020.09.08.12.49.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 12:49:30 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH 13/16] vmstate: Fixes test-vmstate.c on msys2/mingw Date: Wed, 9 Sep 2020 03:48:17 +0800 Message-Id: <20200908194820.702-14-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908194820.702-1-luoyonggang@gmail.com> References: <20200908194820.702-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::441; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The vmstate are valid on win32, just need generate tmp path properly Signed-off-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- tests/test-vmstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c index f8de709a0b..4c453575bb 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; @@ -1487,6 +1486,7 @@ static void test_tmp_struct(void) int main(int argc, char **argv) { + g_autofree char* temp_file = g_strdup_printf("%s/vmst.test.XXXXXX", g_get_tmp_dir()); temp_fd = mkstemp(temp_file); module_call_init(MODULE_INIT_QOM); From patchwork Tue Sep 8 19:48:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11764207 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6A30C1599 for ; Tue, 8 Sep 2020 19:54:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1B52C20768 for ; Tue, 8 Sep 2020 19:54:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qeZCYnAu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B52C20768 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:39514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFjhA-0000WO-6K for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 15:54:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFjcZ-00071j-LY; Tue, 08 Sep 2020 15:49:39 -0400 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]:36944) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFjcX-0002Yq-PF; Tue, 08 Sep 2020 15:49:39 -0400 Received: by mail-pj1-x1043.google.com with SMTP id kk9so140700pjb.2; Tue, 08 Sep 2020 12:49:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GCgbOADJo9SgTrFvdP0jEa9PoTonwhtwSH4+oqHE/pQ=; b=qeZCYnAuB0kBO6Xa2vSII4TZV8F5o3T8ImYKprseime9E25SZUkMhgZeC4/iyWyy+z 4wH3LK20LK7NNbe12EQ1GR1czMvTt+YAWW5x18htqeiGMae5fQjionmgaxqdAw8AoCcx OEpfaCFMOXa9Kk0MmzQXQnBpwlqiRfj3mtGvBnw2Ipi/N22C8wii1K5C/rflsAPN1K2w s25QsznwS4LcIKmsH7fFK5aq673WK96KZkzTaDAGp/0/nhF5eco2SvRwUwPxMuooxqWn nGZdCWzk3FBij9EEENrcQHd5kIwdqBXQFqnNHFfR61Ld6ncTvENwJA6tjU4QKAnpU4nu OfJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GCgbOADJo9SgTrFvdP0jEa9PoTonwhtwSH4+oqHE/pQ=; b=mBv4cVe+YW7s/y7KTUfCrlTXXu6UY/GHM0e/0XxW8YUcbuS2M6mRd6HaLliWX8QhVG 3Fk0kmfNaEgkNttJ3ispokyYtUS8JPgn/uJxtQXPcnzutFGyYP/FrMwN4xY3ms2fDWrc 8kjZF3QIypVQH2JyKMLLRlp1xY/bWGiElhb8Udqn+AHorjOUbRtbqkW1e8VBy3sLFilk jpjwd7xnfgxSSDJSBRRnjXwi4bS0aYIEYqL5bNZC3ky/IJbO+vln4Degeh9w6idVBS6+ ItmWakiJiPx8B9mpyzuh2SBUMSCJf27SzyQ0z2wLOXitIYmakCL7mMoOIYOZMrsaUKN6 ziFg== X-Gm-Message-State: AOAM533Zlb73EbjlIWSvWQpU96kzybLirLYrO7NEJo6fvuJ7UbNmA2fO PIHL05CYk7sgqrY3f8WmELKPDfK5HvH4ga1m X-Google-Smtp-Source: ABdhPJzesUiP89d2OpcpfflMG3gpwaXNh6vkkODppPb+vIW+h117zoi3dssKQIjuPN/2xYMHpMsavg== X-Received: by 2002:a17:90b:317:: with SMTP id ay23mr402557pjb.68.1599594575549; Tue, 08 Sep 2020 12:49:35 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id n127sm216922pfn.155.2020.09.08.12.49.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 12:49:34 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH 14/16] cirrus: Building freebsd in a single short Date: Wed, 9 Sep 2020 03:48:18 +0800 Message-Id: <20200908194820.702-15-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908194820.702-1-luoyonggang@gmail.com> References: <20200908194820.702-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1043; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1043.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" freebsd 1 hour limit not hit anymore Signed-off-by: Yonggang Luo --- .cirrus.yml | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 49335e68c9..b0004273bb 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 From patchwork Tue Sep 8 19:48:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11764221 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 79F0B59D for ; Tue, 8 Sep 2020 19:56:04 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 18EBA2166E for ; Tue, 8 Sep 2020 19:56:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bVrMSeRQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 18EBA2166E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:47708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFjil-0003uu-5w for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 15:56:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFjcd-0007Dd-Og; Tue, 08 Sep 2020 15:49:43 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:35742) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFjcc-0002Z5-3c; Tue, 08 Sep 2020 15:49:43 -0400 Received: by mail-pf1-x443.google.com with SMTP id o68so169932pfg.2; Tue, 08 Sep 2020 12:49:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NnBwIumxkiQ9pXVAp8TmFXF/H8dsT5OnHNvh40zg8GM=; b=bVrMSeRQ1oJyHgTsyvccvg7Eys2QNfVoit8TIHv11obq3zBlAnFtY9jQtUptzWSfNT ZpgijD3Hpx9e7C6s1+mqrlTX2dBE3VfliItg0evYCeQguej3+sXeptYAtjFuWGUBWEij HonDhHRsx6PRr/mDSDbTsRwn2i9n/TufGWVZgOdMwc2x6JvqlxKAHbVi/ANSrQkg/bB6 NZogTh+WfUoxm5a7v4wwL5pKELEGWJDRmyQrhMofjj5VWTUPLnHkHXwsp1R/6E29LW5e h8sJ6kheb4NzLBcglEGW9wdylU5uNjf5W51I50GWCNsgU8y6QMFVt8JhVqFaVFtCUxdD SKRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NnBwIumxkiQ9pXVAp8TmFXF/H8dsT5OnHNvh40zg8GM=; b=uBSk4EEgHupuXnaJ7jsdwanvqYYKI1+/+dmhbmEtn492I6fT7IWhe0KENSKWU+LU+u rOt6AFEXdfiCH2/sd5B8793vDQ4vraYLtnxbqkn1fiySoKsNW1k3isUQiNE0HBdY+WQ0 ZbpK/Jvj3zQOO76WsgpsJdcTfyrpnpQYdJuyWkVGK3f2DCd9MgekdoqGukd9BkTSaCgN LFyidFFbEf1D78qXjSvLcRJlcyWPwhem5JTixL/4G+k6kbLasifCBdTKC4m1sHkMH2wP qxqe2aQdzQM2Z0rYQF1rWQDBpIeCw0R3p+GAlNPOBW0r0Tm9BvKQlvUS5e7Wd1OiUpqL /KjQ== X-Gm-Message-State: AOAM5337Sd/Lp0IrVpM9P2h5LRRAgFMtQ+YNVLJVbTj7JrQ2TMvVf9X+ h1yXBqD4a4389Z2wmCQ0xQ3Au4BA9keu33P4 X-Google-Smtp-Source: ABdhPJxECESF3wPXCyYYQUzIWk2HMf16oIUBmW2M6gkpxRjx2wzUqMWQgcm2J4OUwRb7QFkDIcxTug== X-Received: by 2002:a63:fa10:: with SMTP id y16mr271272pgh.304.1599594579828; Tue, 08 Sep 2020 12:49:39 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id n127sm216922pfn.155.2020.09.08.12.49.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 12:49:39 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH 15/16] logging: Fixes memory leak in test-logging.c Date: Wed, 9 Sep 2020 03:48:19 +0800 Message-Id: <20200908194820.702-16-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908194820.702-1-luoyonggang@gmail.com> References: <20200908194820.702-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::443; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" g_dir_make_tmp Returns the actual name used. This string should be freed with g_free() when not needed any longer and is is in the GLib file name encoding. In case of errors, NULL is returned and error will be set. Use g_autofree to free it properly Signed-off-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daudé --- tests/test-logging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-logging.c b/tests/test-logging.c index 8a1161de1d..957f6c08cd 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); From patchwork Tue Sep 8 19:48:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11764199 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C33B91599 for ; Tue, 8 Sep 2020 19:52:57 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7EBAB20658 for ; Tue, 8 Sep 2020 19:52:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pdjv6DK2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7EBAB20658 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:59556 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFjfk-0005ez-Kx for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 15:52:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFjch-0007Oj-MF; Tue, 08 Sep 2020 15:49:47 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:39831) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFjcg-0002Za-0Z; Tue, 08 Sep 2020 15:49:47 -0400 Received: by mail-pg1-x543.google.com with SMTP id v15so297678pgh.6; Tue, 08 Sep 2020 12:49:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Mis/yrVWeY+EL6B3pLHydPEbEg8SDdnmsH3w5+AQmwk=; b=pdjv6DK2sXnNkV4WyJA5AnDPpSusmMZ8P9FJ6/K3nDcsYAuKUben43m+b3LZl5BS1p QnW2dZvjGfISKebySIomBqTWDm5xa89rSferkqUUYxLYlZd7GGWwTbLcqvQEVaDR/B3j pLd+3YhpDRiZNJlE+pyy2pbYQrvOD6DmfkjPjAfYkidpMA5QS+5kLyqR5d7887wJs2oa 1eFY+GE/TAY428vGtseYEdBmDWe6mrlGBSAEWohimQ2AGQlbo6Q0al7tekuHYcEkcfzl wAxjVhR5Nq1jYWMdb5qv1N85TMgEF8Ryilmu1X2H9HOdaDXJoNtUgcGrsgNmxxL4DZLx 35tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Mis/yrVWeY+EL6B3pLHydPEbEg8SDdnmsH3w5+AQmwk=; b=sQvDSYqEZbUK/sYYeIShIvCmmo5PV7nBmUUMx5fp9ueAOxbeybnmUHy2G56hivy+Gk VJpyoMZ7SoQHeH+iZBzN7brfrHB/RhPuuVgmi/RIXyMg4PDRRRONLEe0D5ypXmjepRon puw9zSKgc3FA/DEL/5RCAkIdUeA6nwm7LVOsJ59q0G+Xn4Y3amB1czcu7DAJ7O3NA8Br OnnIf2r9HtYnJIV1Ufh2/EMjNdGF+OYXQEq1AGGkksIWesz7rPEHNJtxYxjTpaL9csak ylvta5HFhrbc1Oy3niUE5dnpONWtSpD/zT6gvo8nwb1z9c2kZUlhQFEHB5nS+NCbYHFq INHg== X-Gm-Message-State: AOAM533WWPqZAK2eQrWMEE0RDE6TGd62+xsBxAn9J0nn3fh8wWBM4Ux+ zfN9LRMurdACpOe1v7wfgrBS1u2UH0CfiBFk X-Google-Smtp-Source: ABdhPJwYvcMEOL5IhmQwJqYtLcqd6NNGfn8WKwiWzfaVRLdwNyBLflmEtMtt28D8Z7MeQ/T6ZqksOQ== X-Received: by 2002:a63:5d4a:: with SMTP id o10mr268551pgm.346.1599594584013; Tue, 08 Sep 2020 12:49:44 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id n127sm216922pfn.155.2020.09.08.12.49.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 12:49:43 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH 16/16] rcu: add uninit destructor for rcu Date: Wed, 9 Sep 2020 03:48:20 +0800 Message-Id: <20200908194820.702-17-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908194820.702-1-luoyonggang@gmail.com> References: <20200908194820.702-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::543; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x543.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is necessary if the pending rcu calls are closing and removing temp files. This also provide a function void rcu_wait_finished(void); to fixes test-logging.c test failure on msys2/mingw. On windows if the file doesn't closed, you can not remove it. Signed-off-by: Yonggang Luo --- include/qemu/rcu.h | 5 +++++ tests/test-logging.c | 2 ++ util/rcu.c | 37 ++++++++++++++++++++++++++++++++++++- 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/include/qemu/rcu.h b/include/qemu/rcu.h index 570aa603eb..dd0a92c1d0 100644 --- a/include/qemu/rcu.h +++ b/include/qemu/rcu.h @@ -124,6 +124,11 @@ extern void rcu_unregister_thread(void); extern void rcu_enable_atfork(void); extern void rcu_disable_atfork(void); +/* + * Wait all rcu call executed and exit the rcu thread. + */ +extern void rcu_wait_finished(void); + struct rcu_head; typedef void RCUCBFunc(struct rcu_head *head); diff --git a/tests/test-logging.c b/tests/test-logging.c index 957f6c08cd..7a5b59f4a5 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(); + rcu_wait_finished(); rmdir_full(tmp_path); g_free(tmp_path); diff --git a/util/rcu.c b/util/rcu.c index 60a37f72c3..43367988b9 100644 --- a/util/rcu.c +++ b/util/rcu.c @@ -308,10 +308,20 @@ void rcu_unregister_thread(void) qemu_mutex_unlock(&rcu_registry_lock); } +typedef struct QemuRcuMessage { + struct rcu_head rcu; + void *message; +} QemuRcuMessage; + +static int rcu_thread_exit_called = 0; +static int rcu_thread_exited = 0; +static QemuRcuMessage rcu_thread_message; + static void rcu_init_complete(void) { QemuThread thread; - + atomic_mb_set(&rcu_thread_exit_called, 0); + atomic_mb_set(&rcu_thread_exited, 0); qemu_mutex_init(&rcu_registry_lock); qemu_mutex_init(&rcu_sync_lock); qemu_event_init(&rcu_gp_event, true); @@ -327,6 +337,26 @@ static void rcu_init_complete(void) rcu_register_thread(); } +static void rcu_thread_exit(QemuRcuMessage *param) +{ + atomic_mb_set((int*)param->message, 1); + qemu_thread_exit(NULL); +} + +void rcu_wait_finished(void) +{ + if (atomic_xchg(&rcu_thread_exit_called, 1) == 0) + { + rcu_thread_message.message = &rcu_thread_exited; + call_rcu(&rcu_thread_message, rcu_thread_exit, rcu); + } + + while (atomic_mb_read(&rcu_thread_exited) == 0) + { + g_usleep(10000); + } +} + static int atfork_depth = 1; void rcu_enable_atfork(void) @@ -379,3 +409,8 @@ static void __attribute__((__constructor__)) rcu_init(void) #endif rcu_init_complete(); } + +static void __attribute__((__destructor__)) rcu_uninit(void) +{ + rcu_wait_finished(); +}