From patchwork Wed Sep 9 09:45:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 305830 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58042C433E2 for ; Wed, 9 Sep 2020 09:48:18 +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 E1BD121D79 for ; Wed, 9 Sep 2020 09:48:17 +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="OixHOT3K" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E1BD121D79 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFwi8-00081C-Qy for qemu-devel@archiver.kernel.org; Wed, 09 Sep 2020 05:48:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFwgc-000691-Dc; Wed, 09 Sep 2020 05:46:43 -0400 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]:35308) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFwga-0007fK-Ik; Wed, 09 Sep 2020 05:46:42 -0400 Received: by mail-pg1-x52c.google.com with SMTP id g29so1698147pgl.2; Wed, 09 Sep 2020 02:46:39 -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=OixHOT3KaPYqoUwhFrDwExzHIdp4Vc0XCFEi/EZQ1DTw+mlpPbwl9IeEzA8RUPZh32 YTZEHHPLWn7eEqyLlsnVjYEI8MIJZ5Gdq//MvHphpR+SJ7F+vmndnk2CJGL6Mwh+Pozt mKavPGvWXRUqFseZ8qvKhCMtHNwf+OGqIsYMPp65prfF7dK7xWRZGPhotpgbhl6nl2oH NE8HzBElsc8fi2yqyyZk5dZO/mRl9aixyycGe+wpcn2hDLrWY5mYvyO+n+uSKwwgE773 9BNxu6AazVyGnmavVH1t9v+yeGPnDYNjCd1Y6uk+x6zW3s+kIdeDZrVrFV3hLgWfbq6R WhHg== 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=eOpHY96neSnwtY76/tTglS+M6lzl2X+RGHrrnHNkJCpXkEcvoOMwdrOG+O4bhjvJ6P mokPran0vEVzDXxhww5Oa1WYrWqn6/uiVIBkB/io7P1c3i003qSLuBzFsIGjfMCT4ecU tA18IM/FMv+ESyLUxHzvyY4Sg1ZnjvpAi3QKYx2SxKtvVZip7NdeyEy4RBd50bwsNzvi lHrqG3kkepQn2pbc9HOymlP7S7zpX+bdZmb45c5TWY0eGC0s/ClIYkJAMp2n9DJzo548 kjXrWFLOHw07Kiq28W1UxzRyisogpw05jaXDEJo1IhhtTEl/2kONZGyg7wClHk6IuZTv Wiiw== X-Gm-Message-State: AOAM530xSmSkiq8gLxJjjYN25Kz3l8NxAGHJ7NdpHODVTCo1p2dIxpLT VQxKiPwikqOO1sRUB50mVIG5kzcpREAtYrL1 X-Google-Smtp-Source: ABdhPJxwFfqpbPvNIGJ6oD1uG0Ri2owu6ZosKjJxEgrzsdFhMLSojBgYC1D6dCaCPzYc6tNyiSCKqw== X-Received: by 2002:a17:902:c411:b029:d0:589f:6e1c with SMTP id k17-20020a170902c411b02900d0589f6e1cmr217248plk.0.1599644798122; Wed, 09 Sep 2020 02:46:38 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 64sm1708312pgi.90.2020.09.09.02.46.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:46:37 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v2 01/21] block: Fixes nfs compiling error on msys2/mingw Date: Wed, 9 Sep 2020 17:45:57 +0800 Message-Id: <20200909094617.1582-2-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200909094617.1582-1-luoyonggang@gmail.com> References: <20200909094617.1582-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52c; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x52c.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 , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.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 Wed Sep 9 09:45:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 274158 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50556C10DAA for ; Wed, 9 Sep 2020 09:52:00 +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 E337421D80 for ; Wed, 9 Sep 2020 09:51: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="ECHoqcsl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E337421D80 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:48626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFwli-0005Vm-Op for qemu-devel@archiver.kernel.org; Wed, 09 Sep 2020 05:51:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFwgg-0006EL-2s; Wed, 09 Sep 2020 05:46:46 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:44683) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFwge-0007fU-Fl; Wed, 09 Sep 2020 05:46:45 -0400 Received: by mail-pf1-x444.google.com with SMTP id o20so1660892pfp.11; Wed, 09 Sep 2020 02:46:43 -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=ECHoqcslXY6SI41cif/GUNa8W+ADqyruiaV0LAm51EPs73p0ARBNiFqdoLSVfiA+8R N9EnHnhqEYXnS07qRCWRvj3IWy1fQqmAMA1XkEp7xOWpZAZR46Y3FOLof1ojhDkm70hJ 5bhkmcCEPZlZdKtlbbSAjVIHcNkbQahKa8SFKRxvQL+A1l62xgnRBRl6vlJ9lWi7ng7V krzdPkeFQBstNq275yZg0HO5MMB518MbgGK4zP2o3vzuXClJHCXw6l1UyONVttmt/o4Y sKRYbdon+cROeaxevUKmyP/TWAwad9p8aTL3d2jHZqsui3uUKk2tPXhHOb02i71ycX5/ 7U1Q== 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=eF5GQ4Bg5fJRVEskMkBvxzdsfIj5EChD6p4nmNP5Tr/FY1Z9oqsqB9Y1QNrYwAehOx b9ITzW5vT1kACfXm/1Pnqx6fZABfBZcwijY6IkUuqCjJIr5L6r6/GAZV/Ni4Bhv6KRGr T0a66BwoutCx8rYP2q5/kNn3vK6dMKQPr0YVjC0x2QWMK4tFpMzGkxTw7X8NoPfY7JKK ElaT/4SO528S9N68RoKgiAr9BKq1YcphFOn7AT0fjJ66Ql8VQhSlXkaSCCN5SQC8k8OD HqsxP17Tldg6aQ8jzutgS9rca/U8keXF8xtMACZVPsVlo16u8WegHNxy8NfXtZedbsRN gAzw== X-Gm-Message-State: AOAM531Qcn59ietSx299uWtznc5ALTM3eDM9nUe7bGrrnRFdYrdQH/d2 mbLQ+TUIbHMLUJG2xRDaKCCgnp04Sfbm0whD X-Google-Smtp-Source: ABdhPJxWFkhZ84+aby6QOk2XAIoPTAlLF+hEl3VFGl8f2X3rxAUjV+nkn+a86yoBR9ntqku6razz2g== X-Received: by 2002:a62:1bc7:0:b029:13e:d13d:a0f6 with SMTP id b190-20020a621bc70000b029013ed13da0f6mr177781pfb.18.1599644802301; Wed, 09 Sep 2020 02:46:42 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 64sm1708312pgi.90.2020.09.09.02.46.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:46:41 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v2 02/21] ci: fixes msys2 build by upgrading capstone to 4.0.2 Date: Wed, 9 Sep 2020 17:45:58 +0800 Message-Id: <20200909094617.1582-3-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200909094617.1582-1-luoyonggang@gmail.com> References: <20200909094617.1582-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 , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.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 Wed Sep 9 09:45:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 305828 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 571B2C433E2 for ; Wed, 9 Sep 2020 09:50:45 +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 E64432078E for ; Wed, 9 Sep 2020 09:50:44 +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="Rvl7gmCX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E64432078E 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44360 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFwkV-0003hi-OL for qemu-devel@archiver.kernel.org; Wed, 09 Sep 2020 05:50:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57108) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFwgk-0006Ow-Fs; Wed, 09 Sep 2020 05:46:50 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:43094) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFwgi-0007ff-Nv; Wed, 09 Sep 2020 05:46:50 -0400 Received: by mail-pg1-x544.google.com with SMTP id t14so1664254pgl.10; Wed, 09 Sep 2020 02:46:48 -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=Oe6b7vQEMWi61d/j8MH3WghB3lqxs27bPNlw+G8pAq8=; b=Rvl7gmCXbHqcU+ww4RnoqwwpztyCJkGLah3EHmhvdUaJO0E3sDszV4j+KS7edUP78q S5HzAQJPK8QV13y0Jiwqp12LsROMIWM+0VN9Hb9MapErDEFtZsGRuJ9jCSVf/Hrmuh0k HAvtk4KqubYpRcnGbUHxEtiRvEhc1ktmQZXT74VBPAxvD/x2tZj6CDvi6owe4a0qWFr4 EG8Dm2emY/JWPE6H9OOV7UVtPhjzNW/KVho5MJjFp3cU26UUltmCIUVUGD8M/DnbM1cl S0ynqawGw4FI/Pbj+MDcThbHSJ7/yGpw5Lo3s2nlqN6FO4UKsRPgAAChjF9QHL9Ev7Ub EdkQ== 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=Oe6b7vQEMWi61d/j8MH3WghB3lqxs27bPNlw+G8pAq8=; b=pWor/mnj+9XT2v17GnZ5LkomxvgkD345X+zQSHJnW67Y0/oDAPKTzQFC0OlCtsqQZF /pWUwCIA20TRrItN2PLjDyaw62CNkVtYUAoU+4x3bl0gCSdqKw8RxC79LuTo9iRAlhIc SuTzb4nRHGRpcPXks+FNmIapzsgg9AFtTQe7wezDo3eu1GZYV7opO5OA9+T+35ncmSCA K05I3V3Eu1WPQ+0nNNkdImRbm5J0BkK4YnFp412Pqo9lzVbpJH0VnPnEDmSYVuKCNk6X rtyVHEuIHM4pV1SEyubOwi1CcS3FOG4hn3ApPicmz4M2R7IqJuen4UFCq541JYS29ixQ zw3Q== X-Gm-Message-State: AOAM530NCM/Y9oTAWsIpShU66zbp5i1VAt95HMJV8uJLTIDXTkqt3RfJ a6RqV5xh89Z/7OZky1xdOG1zO8PEdQxATfMZ X-Google-Smtp-Source: ABdhPJyRfYuxAeotsc+/pRRS2a2nKKgHsqbL4Idu0FsV3ZHgqxwZgjJrKmwL8ID6LZNrPpK8fos8YQ== X-Received: by 2002:a63:1d4c:: with SMTP id d12mr2419173pgm.365.1599644806449; Wed, 09 Sep 2020 02:46:46 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 64sm1708312pgi.90.2020.09.09.02.46.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:46:45 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v2 03/21] configure: Fixes ncursesw detection under msys2/mingw and enable curses Date: Wed, 9 Sep 2020 17:45:59 +0800 Message-Id: <20200909094617.1582-4-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200909094617.1582-1-luoyonggang@gmail.com> References: <20200909094617.1582-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::544; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x544.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 , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.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 Wed Sep 9 09:46:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 305825 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2DC8C43461 for ; Wed, 9 Sep 2020 09:54:22 +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 67A7F21D79 for ; Wed, 9 Sep 2020 09:54:22 +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="WmYvQCJj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67A7F21D79 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFwo1-0000tR-7d for qemu-devel@archiver.kernel.org; Wed, 09 Sep 2020 05:54:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFwgo-0006Z5-Kp; Wed, 09 Sep 2020 05:46:54 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:42611) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFwgm-0007fs-Sm; Wed, 09 Sep 2020 05:46:54 -0400 Received: by mail-pg1-x543.google.com with SMTP id m5so1668030pgj.9; Wed, 09 Sep 2020 02:46:52 -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=s4O1f6yoxMsnnDNuUCRmwCFjeJefj3nbZpXkl1R+kT0=; b=WmYvQCJjJknqB9ryBg6cUmmTxm2CTRJJ2zcW8fehdFKIaaeYt4R24aCAPdI40W8tga w5aEDs5p/Q9Swv1de2MM3H2YlefyOeOyROGkAw+FrSNsKh1ZiD4HOtwOHNja8yvAFTpf yeeFPc5bCcDafnr/mU4q594hY732hbtrzZwmIzZEZjSMSXaFybXz1Cs2TgKWuQcB3Adn WPM9MXC3b4q7dInfiawewRgK7f0JSRXW59ui07K0s5YR2CIUOex/EtSfC96DdYJvENWY iHHDncAdx9tcYyk+HnRL5cAuxPDWWHDgKHKMkhXSBj7KLPFh9ZF/TamoenChWf3IE3P9 dWwQ== 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=s4O1f6yoxMsnnDNuUCRmwCFjeJefj3nbZpXkl1R+kT0=; b=OIFFKOpw5HZYRs/j5by9UuC30cuSFKT0YWgVuLn1dG1thAvkE5qzrCVNgLC1cgUA58 drOR4eR5pDIgulcW59I9QD3bdOamHHCXLCfrsrWyo4BDwqh3Yt+B3/CNzq98oNw41Vmv Kro6pSSoq2UDwt60MGFHzZedQn3U3cVo1fvrMsmAcoWKNbN/7nF9UPpOpznBl6/5K1et 25XeAJsQUxYuo2SSzWck1gzQaCyMQK1CeeNAbTzUHGwoBC4Vt08k4g5qsh7faAzcyMUz FB5wbxp6U+4kPBy9vs2+OntGyu2zMtUn6kFpyJ6dM5SYejJAsx/toKFDBpCjGFk8klpU 06lw== X-Gm-Message-State: AOAM5307988cXyEkC9PBUSeiqXXg9RVMnorqBR3HhdhyR7tYgu/2RPmR eI3MFV3lL7ArDGDwdI6+7lBC5vWuEgK/X22s X-Google-Smtp-Source: ABdhPJxUMaMkSlfxP6+Ei5eMHskD8j2Y/CBkOG71TWLUilUCQYg/x0AZCunq9jIz4eRhgE6XyDaOtA== X-Received: by 2002:a62:7616:: with SMTP id r22mr116663pfc.48.1599644810807; Wed, 09 Sep 2020 02:46:50 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 64sm1708312pgi.90.2020.09.09.02.46.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:46:49 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v2 04/21] curses: Fixes curses compiling errors. Date: Wed, 9 Sep 2020 17:46:00 +0800 Message-Id: <20200909094617.1582-5-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200909094617.1582-1-luoyonggang@gmail.com> References: <20200909094617.1582-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 , Peter Maydell , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.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 gcc version 10.2.0 (Rev1, Built by MSYS2 project) Signed-off-by: Yonggang Luo Reviewed-by: Peter Maydell 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 Wed Sep 9 09:46:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 274161 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC190C433E2 for ; Wed, 9 Sep 2020 09:48: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 6FF8621D79 for ; Wed, 9 Sep 2020 09:48: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="IFJsgCbr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6FF8621D79 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36288 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFwiT-0000LQ-5u for qemu-devel@archiver.kernel.org; Wed, 09 Sep 2020 05:48:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57140) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFwgs-0006jJ-T3; Wed, 09 Sep 2020 05:46:58 -0400 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]:51311) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFwgr-0007gS-8W; Wed, 09 Sep 2020 05:46:58 -0400 Received: by mail-pj1-x1042.google.com with SMTP id a9so1071077pjg.1; Wed, 09 Sep 2020 02:46:56 -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=QPOpSG9Zo5ax6O+oTlvoQEKu10ulnbdfFW/pj17nxUM=; b=IFJsgCbr696oMGcFoMiuw94twVJ0hxIZIxqJaTRRkVwT28XFw0ctJfF50N6GbE868Q 6IqCHwKum1aVEmEuEwG18BLJrD+dXglRHBTHtKFOabAg/9MQ7hpaaECI/cTd00TX3PLM LQytcWEkKKDKVEeLWlZmrNyUeo2n5urKYu08N4DSpYY1TA1RP4QYsd+2GV8tNCbVZ14R nZUDxDvaDhe6ma1qyBVgGmYDDJLIDj/EPeoPO331aRQOu2IxBxQw3+K20HdAhZTI9YW5 cMW37z1JgHpGScyC5ylWcCmS94Rv70xzbfoED8unl35kxzWP6XTtoP8+78hPbFaZXKfi Uqpg== 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=QPOpSG9Zo5ax6O+oTlvoQEKu10ulnbdfFW/pj17nxUM=; b=S2A1G8SofIkGalaAdBPtYqaTZed17I35jlckQu2OV/+C6Pr7AqBWiNYOOPtxS7Px8y kTOUkLZ8v5KwW7oGlYJ7HAHn/3cdNmcIIdFAggaZB6CegTgw9PsGDYkE3KbT9qCNbieV Z4IZXaarMxzUJL2oCWgk9UgWrHgc3opNvxuW9JQA4z6pW7kF0rNcPc0MU59696AiOmkt vI2ztz2wf/5aw+PDu5dRf9hs9Pt/5qN3yIs5GRuwk6O0nMKPel4CbGikTl1G+3TOc37t ma3rgGoUQv4O5YeUYAFq8ofCseQfL1RdBqv8YrNi9K0l3wvqxQSA1Zzn4HZGiuUSK+uy aqSA== X-Gm-Message-State: AOAM532YK2PPhGLPM0vA1x+uCqcxWs86+VOTFZAsZYSQpwVIqASPhQTf 0RlJIGz5Py9eRJvhd/af0tKJHX2LFdmyCQ0e X-Google-Smtp-Source: ABdhPJzBNbrqC4gJ0/fzYXe8BK/zG6edytANrC2VU8cHxHNRFgQsFXTzKVPKo+J/SdmwNOOjLvQGjQ== X-Received: by 2002:a17:90b:4b82:: with SMTP id lr2mr111870pjb.184.1599644815180; Wed, 09 Sep 2020 02:46:55 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 64sm1708312pgi.90.2020.09.09.02.46.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:46:54 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v2 05/21] tests: disable /char/stdio/* tests in test-char.c on win32 Date: Wed, 9 Sep 2020 17:46:01 +0800 Message-Id: <20200909094617.1582-6-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200909094617.1582-1-luoyonggang@gmail.com> References: <20200909094617.1582-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1042; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1042.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 , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" These tests are blocking test-char to be finished. Merge three #ifndef _WIN32 Signed-off-by: Yonggang Luo --- tests/test-char.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test-char.c b/tests/test-char.c index d35cc839bc..ab037647bf 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,15 +1473,13 @@ 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); -#ifndef _WIN32 g_test_add_func("/char/pipe", char_pipe_test); -#endif - g_test_add_func("/char/file", char_file_test); -#ifndef _WIN32 g_test_add_func("/char/file-fifo", char_file_fifo_test); #endif + g_test_add_func("/char/file", char_file_test); #define SOCKET_SERVER_TEST(name, addr) \ static CharSocketServerTestConfig server1 ## name = \ From patchwork Wed Sep 9 09:46:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 305826 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A961C43461 for ; Wed, 9 Sep 2020 09:52: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 A4EB021D79 for ; Wed, 9 Sep 2020 09: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="s6VWn/IM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A4EB021D79 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:52836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFwmM-0007EV-MI for qemu-devel@archiver.kernel.org; Wed, 09 Sep 2020 05:52:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFwh1-0006qT-AX; Wed, 09 Sep 2020 05:47:07 -0400 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]:33617) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFwgx-0007gt-OT; Wed, 09 Sep 2020 05:47:06 -0400 Received: by mail-pj1-x1044.google.com with SMTP id md22so1092015pjb.0; Wed, 09 Sep 2020 02:47:00 -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=s6VWn/IMwwxOXa9Qc2QL5cDAKioih+klRKQWpFeznXQsj+TnFpRjDHCL5LRgWXIEHk vvTLKMuIlzN7i3n8oylZm1qlh0OUUGwE5eRbXRbhq3v7Gmjf8nZoszW6eNAArB+4QdLA KvCPxfQqQE+JU8LH8T/VjAugg0a1sygf/kPtkFKIlQuF0wQV9Std+Ds/20lRR+fk0fhV mcwBnrVk56WYEerChSKK/6aod4NStLgbKn8COjQgLPeBEMg4BrzzB4Hsr8Jc4wydxL86 W0C4iwSWdhBOy1t2bA3JnYZWeFkd8PJvGF1y7Ig5PalHiSRWJhrh7wEJ6awVB1H1mbXo 6zvw== 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=Vwpu9pggOTQcI2rpB1L6Me+vVeRKyUSVtp8tN7h/4ll9OCfVaBjipgXIuxMm444tNp i8jeW/X7D3D0qlTnYWZNofPrbpyT9H7Z5a7hzLoOVtE/tZeQIWDPFS23ZH0KZwasaEeW E9PvW9dH5gW+Srx2u2ZbDOZkdiCnmXEdUppZybhK+ZFN1zdThkPMaRFIE0GtDmpQyLyL F6emMGZXOcKf6vFxgsAR/ZnS+GqaMygeJ1HEEJKmaZobSwRM6Aghblzcd8mtsiNPAulW C8CEYt3vc9MrgJbu2AwRRIvwBgbSPPLcf7UF4r29SiRLB6/7sG1UOS4Kwx2ylpy8aXao RnsA== X-Gm-Message-State: AOAM530521BYyE9m2YXj/zxyp+/vw6z88SpJGRyC5JHYBSDQi+O6E+Kl i631Q7l6vyArI8ukpxybMGiuR11JWNPqANlq X-Google-Smtp-Source: ABdhPJzx2K21gbT2VQ/hH3b2abO6ULimj9IaHyZKgH38QBu2p9bHz1Ce6cMGHmZfL11UK8H+h8giQw== X-Received: by 2002:a17:90a:f415:: with SMTP id ch21mr137362pjb.18.1599644819267; Wed, 09 Sep 2020 02:46:59 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 64sm1708312pgi.90.2020.09.09.02.46.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:46:58 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v2 06/21] ci: Enable msys2 ci in cirrus Date: Wed, 9 Sep 2020 17:46:02 +0800 Message-Id: <20200909094617.1582-7-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200909094617.1582-1-luoyonggang@gmail.com> References: <20200909094617.1582-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1044; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1044.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 , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.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 Wed Sep 9 09:46:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 305824 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D939C433E2 for ; Wed, 9 Sep 2020 09:54:56 +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 A319521D7A for ; Wed, 9 Sep 2020 09:54:55 +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="jjmMiQQ7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A319521D7A 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFwoY-0002Iv-KL for qemu-devel@archiver.kernel.org; Wed, 09 Sep 2020 05:54:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFwh2-0006sD-1G; Wed, 09 Sep 2020 05:47:08 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:34382) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFwh0-0007iF-Da; Wed, 09 Sep 2020 05:47:07 -0400 Received: by mail-pf1-x444.google.com with SMTP id v196so1811280pfc.1; Wed, 09 Sep 2020 02:47:04 -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=476E7aHWp8h1cxEJLePHYcg3LlpMgvhjzr9aOxTQys8=; b=jjmMiQQ7W/4RWaYy1KkssJhtbXe15QiGy+7y102kLhzCuvViBIgEubZ60ipPk0yjCo x80sX+rrlUeSw3CK22ZGGBKxPs33HbTpfcozJJnpnt+/zMy+aV7+foPWmf4ekONpMb8d Z/bYbVc0LRoB6TwdJlMwtwpreRSnmM5L3Kf07IZy899XCVBD9oEN5b21hvYcrYplkBhQ UuIZ0hf6tzT5X6pzU8IiR4hC84whwRC0tJTQYyPHC21F9aT5ncJXRX3KFAxjE/QJzwlh Aj4EUS36elfCTrjI/csCR1FGKl8pV3sWYmW65cjWaic+OeEAySAaZdjSXP29CsTj/x1G wTMg== 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=476E7aHWp8h1cxEJLePHYcg3LlpMgvhjzr9aOxTQys8=; b=BS4Kue7seI+ja9HLR/i64WjPRp3gba6gSvG4+SFqAhaX+b0QQGkQcBKcqGreDyfUDG LVc0/lq7eiQpfyIBiAGmCgiFXkEk5AhfJSwV6mSgen5F70tp+Bo5kXSqUFXSzBTKwiyn DfEcXw69Ht7iy0AZo0cGI17x7VrHofTqn0z0xrQyUo6KpNxgiq5wcKR63NaMRXLiufgZ J/oWGURcpuken/elhoX7iUjdABeyEASc4hr6wzqiPvXF4ihPm4SXZ+eGnPdKjJg1fViO ePpr7/GO72iXZ3RO1NaYskzytBm1TtnB0RGFPi48bhNAEt/rYvsc25lFmqhONm+n6aYe chAw== X-Gm-Message-State: AOAM533+mabF4w89HyhbCU+MZzPAzC2I5a1YFadAIIFJnMAUHRD1a4b3 vzpL/k+5weMUX7+6zlAEL2O47lmOvrsP4G8W X-Google-Smtp-Source: ABdhPJxgIU/Udq43HufOMq8LZMsm5nt4aKP/degqjunGtfDAngD6mMRWOcyjFrEDc6YjdWWAUYzyqg== X-Received: by 2002:a17:902:ac85:: with SMTP id h5mr43006plr.50.1599644823417; Wed, 09 Sep 2020 02:47:03 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 64sm1708312pgi.90.2020.09.09.02.46.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:47:02 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v2 07/21] tests: Trying fixes test-replication.c on msys2/mingw. Date: Wed, 9 Sep 2020 17:46:03 +0800 Message-Id: <20200909094617.1582-8-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200909094617.1582-1-luoyonggang@gmail.com> References: <20200909094617.1582-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 , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Windows there is no path like /tmp/s_local_disk.XXXXXX Use g_get_tmp_dir instead of /tmp. Signed-off-by: Yonggang Luo --- tests/test-replication.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/test-replication.c b/tests/test-replication.c index 9ab3666a90..e7cbd6b144 100644 --- a/tests/test-replication.c +++ b/tests/test-replication.c @@ -23,14 +23,14 @@ /* primary */ #define P_ID "primary-id" -static char p_local_disk[] = "/tmp/p_local_disk.XXXXXX"; +static char *p_local_disk; /* secondary */ #define S_ID "secondary-id" #define S_LOCAL_DISK_ID "secondary-local-disk-id" -static char s_local_disk[] = "/tmp/s_local_disk.XXXXXX"; -static char s_active_disk[] = "/tmp/s_active_disk.XXXXXX"; -static char s_hidden_disk[] = "/tmp/s_hidden_disk.XXXXXX"; +static char *s_local_disk; +static char *s_active_disk; +static char *s_hidden_disk; /* FIXME: steal from blockdev.c */ QemuOptsList qemu_drive_opts = { @@ -571,6 +571,11 @@ static void setup_sigabrt_handler(void) int main(int argc, char **argv) { int ret; + const char *tmpdir = g_get_tmp_dir(); + p_local_disk = g_strdup_printf("%s/p_local_disk.XXXXXX", tmpdir); + s_local_disk = g_strdup_printf("%s/s_local_disk.XXXXXX", tmpdir); + s_active_disk = g_strdup_printf("%s/s_active_disk.XXXXXX", tmpdir); + s_hidden_disk = g_strdup_printf("%s/s_hidden_disk.XXXXXX", tmpdir); qemu_init_main_loop(&error_fatal); bdrv_init(); @@ -605,5 +610,10 @@ int main(int argc, char **argv) cleanup_imgs(); + g_free(p_local_disk); + g_free(s_local_disk); + g_free(s_active_disk); + g_free(s_hidden_disk); + return ret; } From patchwork Wed Sep 9 09:46:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 274159 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7EDBC433E2 for ; Wed, 9 Sep 2020 09:51: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 654B521D79 for ; Wed, 9 Sep 2020 09:51:02 +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="D1WD9oKH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 654B521D79 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFwkn-00049d-CH for qemu-devel@archiver.kernel.org; Wed, 09 Sep 2020 05:51:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFwh6-00071s-FF; Wed, 09 Sep 2020 05:47:12 -0400 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]:39506) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFwh3-0007iZ-Vx; Wed, 09 Sep 2020 05:47:12 -0400 Received: by mail-pj1-x1043.google.com with SMTP id s2so1072946pjr.4; Wed, 09 Sep 2020 02:47:09 -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=tUjxHhiaHU9hEAJ1XQZ8uS7Hz0JekKVDba8C4SdQqRg=; b=D1WD9oKHPDt5fEFr7qqlZtzuRS3FOLxPJQ1HpaUZU82BZ/oo7GsAO3do/fF7aXzb9w 4/N7+DHBglSPhDASLaUaJr1xjrWRtI+szdTNEflWVPn0H8zaRwx364vUedCjUV2ZmTrG 8S+CtUY8ZDQx/qANKzm2sOgzOANbEHzmiIl8y+tIv1WT4P75AJJt3DXHyUrVQGUkCFy7 TzOff4ZVHG3JmQE3AjPmeDpw8eEarA3zqJlmLFRCv1jr8gWO9k+5RSY1b/cR3hFEe0nA crgsDnHQ8lhLLHPkXbPKZIj8swcbfTau8uvS3dUO2yBkv955ruYB+JCB+lVuehoRfLSL fATg== 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=tUjxHhiaHU9hEAJ1XQZ8uS7Hz0JekKVDba8C4SdQqRg=; b=KzEOENvAR+AU9t6p8QaY+g/uSfmdHD3URBmv76o495ZP3ivgNtImnS0/sTSTe7dMy8 9N6ZAu3dUuo6vU6TvZzeGNl3tK3sAvqp6kOShYBz5N3PdSYdtd1lTbhM8c0d4P+i9QU3 lyG2VJRM7IvI3mPaCCSg+BY+UwtxSNjXvwqn0255w6OCtwnpM/pe/kjKPq8pWv1sshKa Dn9/mBlscD7Rt5GrY+RYTslXdTKX3yMBebb3XRlsCp+8IwjUvJLLSbz/3dfXHO7+6E/R RCuydx1LR9kO9HZCCK7dndvgQHZO6HB5pyzdix+Nqs5fez0rjIaxkdCasm1UM7IUQHpg Bm3A== X-Gm-Message-State: AOAM532L/PjjF0uDb0SsLji4ikpw5TbYdBLD5Bfbt+Kj7/S9QwlrUe25 XBfvrRIAvzRL9KHZE5gpNDOFZB84xFoPqa56 X-Google-Smtp-Source: ABdhPJx6RjhzTIUeQOwzAOnamw+FkD0CxZJ06NvkuE+a9TW8g3a57osbIqajFjG48TtH+035BGQ0mw== X-Received: by 2002:a17:90a:aa94:: with SMTP id l20mr92561pjq.95.1599644827751; Wed, 09 Sep 2020 02:47:07 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 64sm1708312pgi.90.2020.09.09.02.47.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:47:07 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v2 08/21] tests: test-replication disable /replication/secondary/* on msys2/mingw. Date: Wed, 9 Sep 2020 17:46:04 +0800 Message-Id: <20200909094617.1582-9-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200909094617.1582-1-luoyonggang@gmail.com> References: <20200909094617.1582-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 , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" They cause failure on msys2/mingw, that's because file-win32.c not implement .bdrv_reopen_prepare/commit/abort yet. > $ ./tests/test-replication.exe > # random seed: R02S3f4d1c01af2b0a046990e0235c481faf > 1..13 > # Start of replication tests > # Start of primary tests > ok 1 /replication/primary/read > ok 2 /replication/primary/write > ok 3 /replication/primary/start > ok 4 /replication/primary/stop > ok 5 /replication/primary/do_checkpoint > ok 6 /replication/primary/get_error_all > # End of primary tests > # Start of secondary tests > ok 7 /replication/secondary/read > ok 8 /replication/secondary/write > Unexpected error in bdrv_reopen_prepare() at ../block.c:4191: > Block format 'file' used by node '#block4287' does not support reopening > files Can you try to find out what reopen this is? I assume it's for switching between read-write and read-only. In this case an implementation of .bdrv_reopen_prepare/commit/abort that can do this switch is required. This is more serious development work, so I can't propose a quick fix. Alternatively, we could just declare replication unsupported on Windows and let configure make sure that CONFIG_REPLICATION is never set for it. luoyonggang: That might be missing functionality in block/file-win32.c. * davidgiluk yawns and looks up luoyonggang: The block/file-posix.c block driver supports .bdrv_reopen_*() while block/file-win32.c does not. It's probably because no one has tried to implement it. OK, I got the direction, Just need implement .bdrv_reopen_*() functions in file-win32.c Signed-off-by: Yonggang Luo --- tests/test-replication.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test-replication.c b/tests/test-replication.c index e7cbd6b144..b067240add 100644 --- a/tests/test-replication.c +++ b/tests/test-replication.c @@ -392,6 +392,7 @@ static void test_secondary_write(void) teardown_secondary(); } +#ifndef _WIN32 static void test_secondary_start(void) { BlockBackend *top_blk, *local_blk; @@ -546,6 +547,7 @@ static void test_secondary_get_error_all(void) teardown_secondary(); } +#endif static void sigabrt_handler(int signo) { @@ -597,6 +599,7 @@ int main(int argc, char **argv) /* Secondary */ g_test_add_func("/replication/secondary/read", test_secondary_read); g_test_add_func("/replication/secondary/write", test_secondary_write); +#ifndef _WIN32 g_test_add_func("/replication/secondary/start", test_secondary_start); g_test_add_func("/replication/secondary/stop", test_secondary_stop); g_test_add_func("/replication/secondary/continuous_replication", @@ -605,6 +608,7 @@ int main(int argc, char **argv) test_secondary_do_checkpoint); g_test_add_func("/replication/secondary/get_error_all", test_secondary_get_error_all); +#endif ret = g_test_run(); From patchwork Wed Sep 9 09:46:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 274157 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E240C43461 for ; Wed, 9 Sep 2020 09:53:10 +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 ADBBA21D79 for ; Wed, 9 Sep 2020 09:53:09 +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="ZGl4qqkW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ADBBA21D79 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFwmq-0007cp-NU for qemu-devel@archiver.kernel.org; Wed, 09 Sep 2020 05:53:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFwhD-00079H-L5; Wed, 09 Sep 2020 05:47:19 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:52301) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFwh7-0007j3-VN; Wed, 09 Sep 2020 05:47:15 -0400 Received: by mail-pj1-x102a.google.com with SMTP id o16so1069104pjr.2; Wed, 09 Sep 2020 02:47:13 -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=ZGl4qqkWxPcp+1u/vu95J1yjmFXXI1yW5UsDfNWfoCYEXfyqzcD/kl9ZdgDwWgdMZI aIDiuZwfYRXCWPRVox0Ud6FFq5H70wMvTtS3wI0ktXmGhG4qffVWv11cr79Cyv2fp57F t/gIBzaIU6IJtpazBQ0pzGtPC9JOI4BL1um70ffpeD32/5gwQxXty+cdO4yPxvMBEq+r NL3wDicrUI/PsTB11SHnvC52mL13mtIxTDk/5lt3xbI2xg1M1Qnix3Ikx+7+D4oN3pUZ pF4voyKiHppQBKf5mFM+UvtwK56ln10z2OeGf4ii6OSIo6fmTtmQhnXbGsatvJMEMeiC q3eg== 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=tgfAbDMKuXjpkNVyz1OVXaMhD46iOso+wTbYFW7d9MCRRpWzDWX+rDoYrv1stfsPu3 RukKs6IMwq0p5EBQuJ5sFYkNh66k1c9thep5XMFVNkcGFrP+aQXvgvLXDs6zvAXnBNTB aoJYGu4w8CYoV6q9a1Pnz7L7SED+sneOMooA4ZNOPqACcl41Fo0yksy3Eeld6/oxZ2WB lX2+hWHpr4CLa2TVfKf+6gkR9Ewh3VD/QkEAx+ImdgpvVPcKtsG0CvR4mkQupUEizM6K 0KoIWdsA2abDL5O7wQzmu1hvmBqdFpgCt+/9vElMZcnDk1WJ2JYZLpmpP2SbNhqorI2X V+pg== X-Gm-Message-State: AOAM530R0bnehL2yvC9/nRHEWJDZfJ8Ccu17gutne3VnAvgSu6B+h8YB ypxIclf9GXxCPlix88YapDgPfx6IU4PvAR6t X-Google-Smtp-Source: ABdhPJyakJW9crd8/X+I9GJ0HWKM33BoAwk3yZODcTam17ktjdZ0gsDCdMmU9JAteQleOxQpCCRh+g== X-Received: by 2002:a17:90b:889:: with SMTP id bj9mr96111pjb.101.1599644831957; Wed, 09 Sep 2020 02:47:11 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 64sm1708312pgi.90.2020.09.09.02.47.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:47:11 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v2 09/21] osdep: These function are only available on Non-Win32 system. Date: Wed, 9 Sep 2020 17:46:05 +0800 Message-Id: <20200909094617.1582-10-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200909094617.1582-1-luoyonggang@gmail.com> References: <20200909094617.1582-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x102a.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 , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.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 Reviewed-by: Daniel P. Berrangé --- 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 Wed Sep 9 09:46:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 305829 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2E90C43461 for ; Wed, 9 Sep 2020 09:49:36 +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 7C09A21D79 for ; Wed, 9 Sep 2020 09:49:36 +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="F+PIYi8M" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7C09A21D79 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:39690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFwjP-0001mB-4E for qemu-devel@archiver.kernel.org; Wed, 09 Sep 2020 05:49:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFwhF-0007DH-Lw; Wed, 09 Sep 2020 05:47:23 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:39205) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFwhD-0007jM-Oh; Wed, 09 Sep 2020 05:47:21 -0400 Received: by mail-pj1-x102d.google.com with SMTP id s2so1073109pjr.4; Wed, 09 Sep 2020 02:47:17 -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=F+PIYi8MXTHPybJS2JY5O1vD0YT7Ij5s6a7jfa3+Noa5dpLhL/d67hS9X3avrHc7Tu utCFH5EMRiiK313o9mYPpEp3qmNZWOTF5cuSSlWdefK5gosOoOKIIEltsK1bgV7uEjGJ NwTHM3oUcBPt+vBGzHHe3AGRrk325FhwgiXqpVY4x0hpRRlW7vb/qs95k6fruHbFlste tBSUbc2oS2QZfaa730BGHLCjngqfZpK3zMiybjIGI6pEEQNTl9FSO4Z/kN8jdU0Lzwwj CVBpus7K7RIcT898ELJxZ01LvhRLtHkRAaLfuxdf679FNIeyPLEXPoYxe9Ec6cjnKJol nBxw== 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=gurdyu5TvNdpxGXeNHrNXstNmmwL2LY8Gp+eBya6TKMR+RNAc9Z+9HG7YySJ/L/FPO CHBuenfm4gfOz4G/xPOy9ZuG/T809JQEbkLKJ4dPCQMgHr00FUAZATrtJrh/sT09CpD/ JlsPsJu5SSWvvH5V0XKxXDWMAMA+UAHur+D8TMc41y09292I/V0YtBV5YE/oX7zNt8f7 pXCsxaTrgCnwbGZ07YRwXk/yGYQNi4mA7TOSa95FH2Z7mHEjX8TQjBYTYbVbbwdEGMNU VWhoLcKFJCNK0euMbPHm3fqg+VDTjQc7I9cQyJ2lhpUEcDO5QbnD/QwFycbAm+KPdKHx qGvQ== X-Gm-Message-State: AOAM5334mGq2rWtrtve1HSIMeeaqvK6mcQqOiaLDJvtbnHUqp6gk29Jl hx4j72Il5YTC8ambW0jEopmSfVfZOS6Q1I76 X-Google-Smtp-Source: ABdhPJzDZHd6UN4xCMQIqimIPrd5LOU+9wtTB3eGc88jxGoblZKdu1vcz+W1WAZNUOVHLKa4+1t+hA== X-Received: by 2002:a17:90a:d315:: with SMTP id p21mr129524pju.88.1599644836259; Wed, 09 Sep 2020 02:47:16 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 64sm1708312pgi.90.2020.09.09.02.47.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:47:15 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v2 10/21] meson: Use -b to ignore CR vs. CR-LF issues on Windows Date: Wed, 9 Sep 2020 17:46:06 +0800 Message-Id: <20200909094617.1582-11-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200909094617.1582-1-luoyonggang@gmail.com> References: <20200909094617.1582-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x102d.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 , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.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 Wed Sep 9 09:46:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 274154 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2C64C433E2 for ; Wed, 9 Sep 2020 09:56:22 +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 819AA207DE for ; Wed, 9 Sep 2020 09:56:22 +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="jxt/VXbK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 819AA207DE 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:39518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFwpx-00057I-E6 for qemu-devel@archiver.kernel.org; Wed, 09 Sep 2020 05:56:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFwhM-0007GN-74; Wed, 09 Sep 2020 05:47:32 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:32845) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFwhH-0007jr-Mt; Wed, 09 Sep 2020 05:47:27 -0400 Received: by mail-pg1-x544.google.com with SMTP id s65so621320pgb.0; Wed, 09 Sep 2020 02:47:21 -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=xBOHLIgzzS+cZLXuoOhLEV5Djuhr7s8VvLqqjTlGHNI=; b=jxt/VXbKXcB+OjQ8v70XeIXG4aTVqQYrSDG3sZW+CYjblVC/Es9a2PSay0tDBlt1FE byKua9WlGu0y3UfltY2syZZk1zI1GdFilgmF5WePl9QUHARfxOmXpuJWA4SlhWYZxLNF xdyxkoUpSDFG4ebw3s4SpLZ1+2iQ3nj8wvrDdmCzs6YwmCYvcfbAI9IgDT8+hadnveSt BpGRbNMkOaDTO8G69Qk8jkSQpLnJY8gWqr6zugSwLN9NwJWUShfpBYpZYezRuNmvAYAe ku8gQ3hWu+xi09jc5tcd14/iOJGKlfawYJUkV4sfp4o+tPEATAZr+7k0uKLyweRmgzB7 qeew== 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=xBOHLIgzzS+cZLXuoOhLEV5Djuhr7s8VvLqqjTlGHNI=; b=Ore9D/31/++1tfdQot9/hFSCfv12AiIaexe4qZdFeENJg/I+GZvw/rzIxCN0f2EuZv iBVhc7d81bR9gRWHoOe95iDY+dC5OavPFb864k9TWZiRvjEfw9oPmLbOUaOzJNKvxIDr 4LBc3ZVcu4Zsv9+WQ6ipMeSLIPfPOR3SKctMgpTVpr4Chqf7OMOVENDaBPx/o0JceBaC hg1ihAKoX9WNSa/9Up6C/H2GfOD54tiA1U1hdh8IwU3uZMTmeJ3wUZ9eGgk4O0i61/eh 4xwVAYEh8tFYfyOk/ZS8TN70vAUE0p61d+sl/GXNu2U/hyasS4HrLzuS7P0Uaw2bw4t1 +Wfg== X-Gm-Message-State: AOAM533jDv+GCxt0AtPwoE3T737Zyu9LWo4Y3Y8wZ0OtZE8qtD+Zuje/ OkTuMMFCuOUOWTapxoa411DI+TKGyYH2arhf X-Google-Smtp-Source: ABdhPJx0An2o17UGp72a+1OQ9mCUVSV/KLSwc5LpdLJfM5hFi/7vsVHpWr9CTHjduc+70VF6EN+3pg== X-Received: by 2002:a62:5212:: with SMTP id g18mr124535pfb.8.1599644840472; Wed, 09 Sep 2020 02:47:20 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 64sm1708312pgi.90.2020.09.09.02.47.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:47:19 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v2 11/21] meson: disable crypto tests are empty under win32 Date: Wed, 9 Sep 2020 17:46:07 +0800 Message-Id: <20200909094617.1582-12-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200909094617.1582-1-luoyonggang@gmail.com> References: <20200909094617.1582-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::544; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x544.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 , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.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]} These tests are failure with: ERROR test-crypto-tlscredsx509 - missing test plan ERROR test-crypto-tlssession - missing test plan ERROR test-io-channel-tls - missing test plan Because on win32 those test case are all disabled. Signed-off-by: Yonggang Luo --- 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 Wed Sep 9 09:46:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 305827 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 965D8C43461 for ; Wed, 9 Sep 2020 09:51:55 +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 2DDD721D79 for ; Wed, 9 Sep 2020 09:51:55 +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="hOshdSmh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2DDD721D79 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:48108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFwle-0005Iv-1Q for qemu-devel@archiver.kernel.org; Wed, 09 Sep 2020 05:51:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57424) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFwhR-0007HY-7s; Wed, 09 Sep 2020 05:47:33 -0400 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]:40244) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFwhL-0007ki-Du; Wed, 09 Sep 2020 05:47:32 -0400 Received: by mail-pg1-x52c.google.com with SMTP id j34so1679481pgi.7; Wed, 09 Sep 2020 02:47:25 -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=hOshdSmhDTzmww24DpGMW7nyBoMYJzcHkS7SS0kUGuNj4TO0Z9iQUw845TVBC2s7m4 sDilJBcbgGiU8euYz3Uemt2zEqcx8jBmfPuFiWbBO8m91dM35jPDR19uswlIg/RLbhlE 0qWJCF/kgC3RtoezlQExE3S41gbj9dmJEEiReKGnmYF/kjTzJ63qiyfejLj9xVBvT+ZB tcgylzrMKvwMi8gvUamP7BHKy3R2OeC/lB7F5LUIfpoNvKgh6GTHZrUaT+B7VxFn245K VmEPfLGm0pP8EiGhT6q/UxKQYqh3Y26P/EZpXKD7MfbGbE6P8Y9MOj4mn4RqevnfLUaf 3y0g== 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=NynkNDgWOaH3edlMnc7x2Z2Kr9j3X9cAUc0XChAWUEpxm2s29vUmjJo/h+A8YmEcrQ HXKddozsr8nOb6Ftef92Rq84mfD3KhGHyPRuuit07Z3vnEZg8AYIES8hxJqSSoMxDaS2 kPiTZJ6gQDZJwK0x+hieE53i58TUFBAbaB48C5Tt0WeNPqDlF26RUs31xw8I6g6Bm1zj t4YQmVzj+DcbnQZnIy0ON3Jk4WB5JDyjdnJDoM7Uk7Tyt5StetomiReVXIFD9KLCirxm jv/fKSDq6Axkb24YSw2iIYaq3q/ieBHsCpD8jvf5VFb7mbkeMyv03wZ4hHWf1h1yutr5 ABkw== X-Gm-Message-State: AOAM530o/aUFHxs1Y9Ghgia6d+XyOSoiyvTWkVdGH9Uph9ZaDvQabAeq FD240xstgZelV2e9kzZlfNTGg4Vak5Z6nuBZ X-Google-Smtp-Source: ABdhPJzutvOQp7rgKMAS/3ZDlyVkDAmzSPvudA9ez3fS680rPc3jKBRW1L5UuidUrbJIqpVamvvapg== X-Received: by 2002:a17:902:d888:b029:d0:cb2d:f274 with SMTP id b8-20020a170902d888b02900d0cb2df274mr175043plz.13.1599644844631; Wed, 09 Sep 2020 02:47:24 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 64sm1708312pgi.90.2020.09.09.02.47.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:47:23 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v2 12/21] meson: remove empty else and duplicated gio deps Date: Wed, 9 Sep 2020 17:46:08 +0800 Message-Id: <20200909094617.1582-13-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200909094617.1582-1-luoyonggang@gmail.com> References: <20200909094617.1582-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52c; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x52c.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 , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.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 Wed Sep 9 09:46:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 274155 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13F9EC433E2 for ; Wed, 9 Sep 2020 09:55:23 +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 8430821D79 for ; Wed, 9 Sep 2020 09:55:22 +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="MLVyoFZb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8430821D79 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFwoz-0002yF-F7 for qemu-devel@archiver.kernel.org; Wed, 09 Sep 2020 05:55:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFwhT-0007J5-M2; Wed, 09 Sep 2020 05:47:36 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:40097) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFwhQ-0007lK-Vr; Wed, 09 Sep 2020 05:47:35 -0400 Received: by mail-pg1-x544.google.com with SMTP id j34so1679607pgi.7; Wed, 09 Sep 2020 02:47:30 -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=1H3XAjUyQVQg87Q3viZPdyOz1U48/GMRVDi4jjT6ZrI=; b=MLVyoFZbLRdUS6mWF0I/1V99HZZuuSbgP4lBJPZTjERGzbHBJ3VvpTujyPs3AbYDNK QS9VKq3gDT3T+FQGKfiuv/b00fnRZM4FV4EeVRj2JF2a+QEAsSbX5x/3P7kvPe5L5ggT Y43urd9FQpq8ZwvAfHBW+ufH9q6FeUfI2q9nVjmK+aplxX7JrLWtJHA40O8hMs9Qs2gC 01PCMcSwfSUB+Zhevih9PCsAc+lkMol2CqVXS7LmISumRQJcKmmbjH/slarrs/o9YM7a SuyWKB7+hN4l07vamX3r35GRwUCoTibi2HvKqgPbHYj3WLZnl29ZRbKW52erPOLtrcu8 pGyA== 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=1H3XAjUyQVQg87Q3viZPdyOz1U48/GMRVDi4jjT6ZrI=; b=BsRl1R2e/F3psKkHrz26/4hVPyd9Y/YmAbkTnM+6/w7FoqpbAiN6rcAexAULkrOYsS UGnAvWMbLHmHN7GqtncHQ3/Mv7GkpbYppCfnot8V0Xj7AKaLOO9R8SniblyLTTgbhxEE yr/Ln1DX1Pf+6JTAa4z8ZvSgc+kxmffWqH69Y32USgbRuxoMa8cFoRMIPu8hfzqCn92t 4aUndJZwHaVx6B+feWYk0BlOfq2Khn9OcRs2UbcX/rNN2kZE/4RN+yZz2b8WC3MvAQ9T 9lWFuiJ7xyMrm7WN8WPler00V8oL4C4vFcY0NaLaqeARqDVfv/qmkAqyxqYYiZwpFPfx c13A== X-Gm-Message-State: AOAM532FtQIwuXgDHE0MHbVawPCd9/0nSQkiryAr2YpbgSoy/msDhdoY DtFXuRKpLfQwXsKRSclMf4biRFX7d+RTDbnf X-Google-Smtp-Source: ABdhPJxKy1jW8PzjttVOe+FiVdxzvit4xS+TLkq1yxB5GvOUlVHx8fwEAOGs7PExx1DNBpNDABQ3oA== X-Received: by 2002:a63:4556:: with SMTP id u22mr25864pgk.248.1599644849123; Wed, 09 Sep 2020 02:47:29 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 64sm1708312pgi.90.2020.09.09.02.47.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:47:28 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v2 13/21] vmstate: Fixes test-vmstate.c on msys2/mingw Date: Wed, 9 Sep 2020 17:46:09 +0800 Message-Id: <20200909094617.1582-14-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200909094617.1582-1-luoyonggang@gmail.com> References: <20200909094617.1582-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::544; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x544.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 , Thomas Huth , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.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..51fe8e8ec5 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 Wed Sep 9 09:46:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 274153 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5EFDC433E2 for ; Wed, 9 Sep 2020 09:56: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 667A9215A4 for ; Wed, 9 Sep 2020 09:56: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="IFLyt/os" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 667A9215A4 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:43396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFwqY-0006nO-Bl for qemu-devel@archiver.kernel.org; Wed, 09 Sep 2020 05:56:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFwhV-0007Jb-Dj; Wed, 09 Sep 2020 05:47:38 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:38504) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFwhT-0007lp-Mq; Wed, 09 Sep 2020 05:47:37 -0400 Received: by mail-pf1-x443.google.com with SMTP id l126so1686336pfd.5; Wed, 09 Sep 2020 02:47:34 -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=IFLyt/os1Kz3umu0InjnND3iJkDSJnunIc7oqtgR5D6XTnTxlybshJxmazKZzXGBLM SE3dCr8JxNamr/ralPMVmprggWXtlx5S+eBZc/Mmghi0p/xQHB44CO8FxNFAAZr7bHYy USMj6gRa2BKbLZigxTlRHuFNnfHtaWfH+0ZykSRTGw/ljHgyXfjjn0r+4sCGbtAvedoU FpFCG1P++3xQQ+aD6agIiwkyR2jCeNzwKAkpcyx3gWDHVbA+vbsfpbriKO+R16Phv5A9 o6j9V72EsoV7f2h6zVvJ2WmA3gwv0PG7jlOMcghxNKgwOrVDo+u/BuntpGEZZIvuG6WZ uzcg== 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=b5zhDcZpBEGKeV/kDHJ7XdHtMBE1NObD88yzJXWrGQEpflZolfDTElllMsyAqAIglr N8x5vUGRS7hGRpf/F5Dx3Bhz/pGp9hnnv3gIGUd6FlTci8Q1mvZgnbCyUM7/6IzGoQBo kappz5R8s9GyFQtmL9mHTqZyexf3YL/q2lrOlBH6Cc3Y7ddxDtL2FybJ5cantXVTltx9 V6mFnVKLp3/m4H7Nfh/DFX3hSoCUblp7Eopwplf7YiXAUALcK88r8luTs12sfX1KUXTc /u4z7SCwrgBHcoqzyOiPR7zd7+K9wk4HgWMs9vFdnKNMoggN3xGReWxAwiHVMxJZ/p8l utmA== X-Gm-Message-State: AOAM530sIMDT67e6YSNMRWPzzSIRR+fgKpafIWpzyOdnjvycBg+KxuVn dCQoXJu1Rf5mnn5/IhIqmVXr2jJgGu4TfzIF X-Google-Smtp-Source: ABdhPJwWDmJdZI/C5MM7W+4kpQne+qrZISEznPbN7+/4X1Ft4eEy+mpGr8V0ojSTfGrHLYjjb2+yUA== X-Received: by 2002:a17:902:74c8:: with SMTP id f8mr40743plt.78.1599644853193; Wed, 09 Sep 2020 02:47:33 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 64sm1708312pgi.90.2020.09.09.02.47.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:47:32 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v2 14/21] cirrus: Building freebsd in a single short Date: Wed, 9 Sep 2020 17:46:10 +0800 Message-Id: <20200909094617.1582-15-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200909094617.1582-1-luoyonggang@gmail.com> References: <20200909094617.1582-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 , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.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 Wed Sep 9 09:46:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 305822 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41C8CC433E2 for ; Wed, 9 Sep 2020 09:56:55 +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 B6927215A4 for ; Wed, 9 Sep 2020 09:56:54 +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="QHVFHbfk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B6927215A4 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:42944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFwqT-0006c8-87 for qemu-devel@archiver.kernel.org; Wed, 09 Sep 2020 05:56:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFwhd-0007LQ-52; Wed, 09 Sep 2020 05:47:45 -0400 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]:35436) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFwhX-0007mP-Gw; Wed, 09 Sep 2020 05:47:44 -0400 Received: by mail-pj1-x1044.google.com with SMTP id jw11so1086484pjb.0; Wed, 09 Sep 2020 02:47:38 -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=8S8LCq0vzh09WirR5+SRleiM+m06nOYh6OfHaB3TjgI=; b=QHVFHbfkRsdPSv37curnQ32C7mlhImkKmvTfHTLHkBBWdOkcU35r0/sKAAR+gfhiKK ePU6Lsb6kElFW2aUmR0eEBZDEDYAmQDwOJ8Skyonjahw6T4WX4vE12JEEzVvIyb50xFO o8g6cUFqKkziCTBeN+MBh0mrR1FtpQWE6L86lFYM8QTT8Zcy4MMyvHHEXXOFft8uyaXT IQNTFFCddE/NTDpuYsicX7t+/WPLm6MG8hR8oMHTt8nLhAfVlhPUQyI0RHig4Iol0Opu NiG4hSSDVCRQCqKv0PqtWWx9SWqd7EhUFTeiWhplrlFhsOSd51cJbiGo93s/ErY9RMf5 3f/g== 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=8S8LCq0vzh09WirR5+SRleiM+m06nOYh6OfHaB3TjgI=; b=anBfq/PrLr2p8HYGIaKDp7ITkqaIgniYPvLEjUIApOnotSPqiPi2ZizYtnT79l+UtX JWi/ZWB9T8UvNHjpUbfgIpH3cT6mzWyWfHvbWe9k9wgR1IPK/SANbj63b8c8bloygvE5 VTuqnRKCm6d/A9lblkAO4ktEYYuWMvNkxy7rLA/rRv7sOSteGoc2RF98IYj3Nl7nif9O AJhrYuQszRe2R6IpIW7DINz1AK0pSHt5lTBbfrR7lQMYmJXPIWRLcz+dFLwBJTV4MO67 IWdTQmRV/FelQcBmr/Kc2rUb9jTY0bex/iNCFGu/j+fiBdKrgJYBpp34DOWgegKCSMNw kQtw== X-Gm-Message-State: AOAM531D5kWWBoW8nPp+ctNk5sy00rVzjcU5We923tS+6ZyCSTaeeLsn 5mdps9kkgFozXS1NXU5M7NEy1zt12yZ7KR+q X-Google-Smtp-Source: ABdhPJwKxtD3JKLpSULe5IyfuMvqgMWxvb+kppkNNSOX7stOty4L6jYiB1/K9IHnlhq6BNI6rG5n4g== X-Received: by 2002:a17:90a:7f8a:: with SMTP id m10mr108458pjl.47.1599644857477; Wed, 09 Sep 2020 02:47:37 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 64sm1708312pgi.90.2020.09.09.02.47.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:47:36 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v2 15/21] tests: Convert g_free to g_autofree macro in test-logging.c Date: Wed, 9 Sep 2020 17:46:11 +0800 Message-Id: <20200909094617.1582-16-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200909094617.1582-1-luoyonggang@gmail.com> References: <20200909094617.1582-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1044; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1044.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 , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Richard Henderson , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" g_autofree are prefer than g_free when possible. Signed-off-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daudé --- tests/test-logging.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test-logging.c b/tests/test-logging.c index 8a1161de1d..783fe09a27 100644 --- a/tests/test-logging.c +++ b/tests/test-logging.c @@ -196,7 +196,7 @@ static void rmdir_full(gchar const *root) int main(int argc, char **argv) { - gchar *tmp_path = g_dir_make_tmp("qemu-test-logging.XXXXXX", NULL); + g_autofree gchar *tmp_path = g_dir_make_tmp("qemu-test-logging.XXXXXX", NULL); int rc; g_test_init(&argc, &argv, NULL); @@ -212,6 +212,5 @@ int main(int argc, char **argv) rc = g_test_run(); rmdir_full(tmp_path); - g_free(tmp_path); return rc; } From patchwork Wed Sep 9 09:46:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 274156 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EA88C433E2 for ; Wed, 9 Sep 2020 09:54:23 +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 AE52C21D7A for ; Wed, 9 Sep 2020 09:54:22 +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="G4LOm3jB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AE52C21D7A 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFwo1-0000tT-LP for qemu-devel@archiver.kernel.org; Wed, 09 Sep 2020 05:54:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFwhe-0007PI-Te; Wed, 09 Sep 2020 05:47:46 -0400 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]:54694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFwhc-0007ms-Vy; Wed, 09 Sep 2020 05:47:46 -0400 Received: by mail-pj1-x1042.google.com with SMTP id mm21so1062114pjb.4; Wed, 09 Sep 2020 02:47: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=faIdeALUAvLzj2kx9mbA5+e0PxUK1yXyWPv+NWO3/qo=; b=G4LOm3jBbJ1twzr17e/NtytI0gmonbXYgPwwv6iMltAQhv7FdVgulOLV1gqahG4xrG R2MtLQLDfhXHfQclUDcuacQezz0wlcHl9Jw+lypTB5mPaDU4CJvjmZqW2OmoIojogJ6L zgeBLX7FDK/R+x2PNSsC7P9gCyQS2rNEjLI2LIlibJdtx/uM3oVX4pbsGfhfbbnINhJM PRywuAl0QHg4kYt05G5nUTGziZ7uI+1D1ZTzsgGnIk1vHPSdFxFZaAufBApyjlLKDwez nxpovOA/wIqw8UIQwnLez0iBanReo06r4vmDNFNtBbzYX7GfFFkffJfOSLQrFBYN5PQk 7sOQ== 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=faIdeALUAvLzj2kx9mbA5+e0PxUK1yXyWPv+NWO3/qo=; b=uJDMKWlhX7T4tqiCtI84wEfA6PYZNdIvEmYzvs1tMDkAoETNB0Czr1KrL1K/ekaxyT +zXrn7GlqDas3Ax6nJy0EbNt64tgA/i9ktD5VU2cCl3WUINaiCyKUTsgM9zwcKA0KO6M XKFvMLTu0X0b7qyH+KH2arxMynd+AwTPY94qBEJAufYL4ELB4MOOD0VQmTkETgJdatdF huNrwif4D4Ag2gPA/JHbiXhgWjCRE7Q60cmQ337bwAAs69WXYPmA2kvryoUUyJL1Xg+I eSUlZeGC0FcKF4oHt/4UeGza2nzLGYNWCcu5zac5XLDC9qgwuNnI7ruGWryVGrsrD8W7 +SxQ== X-Gm-Message-State: AOAM531RH2Ix+8lkdUIX5yMFcoQIzFGbejh+cm1J6x1/Tg42kKb030qE zfqTUL5PgdbwV08KOObE4KioVzLeYeHfFVQi X-Google-Smtp-Source: ABdhPJzLPE/Mchrbh0iTFyjsCW7aPQ5RuuyT6Gz85HoER/Lvym9aSfIa6A4Vqr4qK3SNQO+xc3+HyA== X-Received: by 2002:a17:90b:289:: with SMTP id az9mr107979pjb.31.1599644861563; Wed, 09 Sep 2020 02:47:41 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 64sm1708312pgi.90.2020.09.09.02.47.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:47:40 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v2 16/21] rcu: add uninit destructor for rcu Date: Wed, 9 Sep 2020 17:46:12 +0800 Message-Id: <20200909094617.1582-17-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200909094617.1582-1-luoyonggang@gmail.com> References: <20200909094617.1582-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1042; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1042.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 , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.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 783fe09a27..1fac9250aa 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); return rc; 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(); +} From patchwork Wed Sep 9 09:46:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 305823 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F0DAC433E2 for ; Wed, 9 Sep 2020 09:56:17 +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 B70CE21973 for ; Wed, 9 Sep 2020 09:56: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="tFv1NBTZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B70CE21973 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFwpr-0004nf-M7 for qemu-devel@archiver.kernel.org; Wed, 09 Sep 2020 05:56:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFwhh-0007VR-Ao; Wed, 09 Sep 2020 05:47:49 -0400 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]:38056) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFwhf-0007nA-Lf; Wed, 09 Sep 2020 05:47:49 -0400 Received: by mail-pj1-x1044.google.com with SMTP id u3so1077087pjr.3; Wed, 09 Sep 2020 02:47: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=MQuDwQckI5S2vA+zFEp3FlYAMN7BnHoGVlcCkcEdpEg=; b=tFv1NBTZeuW89mz8Nc2c1yIFqE8pX6UggYf0k6ekGywuJ03hqs519tDB4SImAGqeiZ 5Wrd+1+vVlPCRVjz/jpf648JtmV2eja9VqyrUvCkBdczHYijEaqoNcdBDZtSdDqDLYJy lnwiq5GO2yVUqRLg1BHqyGZW5ETjgEn3uFauUT99d60JhMTXTJiCoZEOz86e4xtJbtsx 5mmwNNQJFJ7d6tbd1QqmwSJrGA/B3vtyD5J7gzR1G3kfR1gNRGnrgftmmodSEhxDWla6 IiUjLuN3NDFPAWQadK6Y34AeVSziOuEfBrr6pYbhe6jC6151wRmz2RaKadNieeIZNdr9 4h5g== 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=MQuDwQckI5S2vA+zFEp3FlYAMN7BnHoGVlcCkcEdpEg=; b=q4dfbwS2dUq3nswHxGzRkMobn5HS62aZCMdC4Yz3OSkeoIbh/ul4L6jx+RhhT/r4n9 uFtx1yuDw8ciZm3ZfZFr42Sdu/3I47PiZV0ATgtlnuxTUe+ne3zphGx5Ypr+qS7KwOB7 LeMNgrjezAet8TSRikpeR6q507kI+OVu35OIgkDXdWZ671WhF6xCvk4A8h8iWDWwSXfm gunlIQ5OzdjvUmwoOE0Ik/ZZFsj43+HIjDOh5NlHdSb9mc0DamAI0BypjpCur2/ZrGFd dgexjABa+6wh+xvI4NYwnuOyq2x7RUxdsTn6lsKZ9sf/xNDkUUH0+ILYPOVq5oZnPr5e Y01w== X-Gm-Message-State: AOAM531dbUO64nk2xa7HAeCbF6Nq9g11nEswAtK6hgLNyuwW6RKRTr/o UJQUqAnrHpwyMgjeC4lGnkRPt10Wo9YIoW6v X-Google-Smtp-Source: ABdhPJzn8aDSVgEP2Ql2lVscVVKyupwKbDlfZQC9n8jA6bldYi++NNG/uYGzU/6qrqIt0cERcrjLqw== X-Received: by 2002:a17:90a:f415:: with SMTP id ch21mr140010pjb.18.1599644865639; Wed, 09 Sep 2020 02:47:45 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 64sm1708312pgi.90.2020.09.09.02.47.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:47:44 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v2 17/21] tests: Fixes test-io-channel-socket.c tests under msys2/mingw Date: Wed, 9 Sep 2020 17:46:13 +0800 Message-Id: <20200909094617.1582-18-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200909094617.1582-1-luoyonggang@gmail.com> References: <20200909094617.1582-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1044; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1044.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 , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Currently test-io-channel-socket doesn't init with qemu_init_main_loop and that's cause the qemu_aio_context not inited, and the following is the stack when null pointer accessed: qemu_fd_register (c:\work\xemu\qemu\util\main-loop.c:336) qemu_try_set_nonblock (c:\work\xemu\qemu\util\oslib-win32.c:224) qemu_set_nonblock (c:\work\xemu\qemu\util\oslib-win32.c:230) socket_can_bind_connect (c:\work\xemu\qemu\tests\socket-helpers.c:93) socket_check_protocol_support (c:\work\xemu\qemu\tests\socket-helpers.c:141) main (c:\work\xemu\qemu\tests\test-io-channel-socket.c:568) __tmainCRTStartup (@__tmainCRTStartup:142) mainCRTStartup (@1400014f6..140001539:3) BaseThreadInitThunk (@BaseThreadInitThunk:9) RtlUserThreadStart (@RtlUserThreadStart:12) Signed-off-by: Yonggang Luo --- tests/test-io-channel-socket.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test-io-channel-socket.c b/tests/test-io-channel-socket.c index d43083a766..743577d744 100644 --- a/tests/test-io-channel-socket.c +++ b/tests/test-io-channel-socket.c @@ -25,6 +25,7 @@ #include "socket-helpers.h" #include "qapi/error.h" #include "qemu/module.h" +#include "qemu/main-loop.h" static void test_io_channel_set_socket_bufs(QIOChannel *src, @@ -556,6 +557,7 @@ int main(int argc, char **argv) bool has_ipv4, has_ipv6; module_call_init(MODULE_INIT_QOM); + qemu_init_main_loop(&error_abort); socket_init(); g_test_init(&argc, &argv, NULL); From patchwork Wed Sep 9 09:46:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 305820 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1AED9C43461 for ; Wed, 9 Sep 2020 09:59:11 +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 996D921973 for ; Wed, 9 Sep 2020 09:59:10 +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="K8ZoRTok" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 996D921973 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:52300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFwsf-00024L-PF for qemu-devel@archiver.kernel.org; Wed, 09 Sep 2020 05:59:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57568) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFwhl-0007f9-Ni; Wed, 09 Sep 2020 05:47:53 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:32853) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFwhj-0007nj-US; Wed, 09 Sep 2020 05:47:53 -0400 Received: by mail-pg1-x543.google.com with SMTP id s65so622113pgb.0; Wed, 09 Sep 2020 02:47:51 -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=eTowCOmFGkug/aztHy6I04JZoGONhdCbvgRzQeqIV9w=; b=K8ZoRToknBhwy0LNMcAhBC1cEnYNfdYq96viBxRBKirtjwmhEzHf+AEr8UKIswdGKx KbOahrPAzn3L+TI6sr6uiYNXbTyW1O2PxlrbnJ2WW9DuSivF1XoiW5rA1yfwfrke9bCT 7eyshGsY5zuTLmC3OiJoNqb0W1tUmHWjGe0D20Vn0M03wIQ9jNx5aiK2dT76IzpxoYQf M2H1jVnUYKPEj8LUz4b+9UP8HqAyq7Lhjsw7AT4SigRnyZk3fBs6q91jFDe2SCCZtAWx AbYtTOkN/of44gKqts7SwyDYgWkz+Gqb2pjXJhGvScE13iBrHW2KmrmZSgtF2EhupdpM 5B1A== 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=eTowCOmFGkug/aztHy6I04JZoGONhdCbvgRzQeqIV9w=; b=jePXxqurQI8jBHgVoTu/sXSY4yVJ+Ru2sd0jjaxW/aWg0u75fCoOpv+cgiNZm7r4bd 5WF4s6hjood9wwxYAtVj1ZVgyoiwu8Psyozk2nu3/2m/iiVI27aKjgdzS/VZs6sGMWVJ negGTySmrvlz+Oqk0gl+TY3Ixm6jZ74vU/3eNaUiLKOAt8e7TVCJQ5xBbqyFWuH1CScX Vc+asyCW+0A89GcZ1fMaWMygPNdK7ss1yGsHDAE31ozjGN9XEbYXSJ+TSB3Ij0Q67qZs lUpwkqSAfexwpzTQrCjlQ+k3AQkE6n9QZLoPeDD0xoxQ2Lsvo+3RcmiYTV1OhOkwGZNW np2A== X-Gm-Message-State: AOAM533m+uAdA04QqMoS9nuIiH5g3K88Wy86owWzLt2w+ZgqkGCEvzTq kZKbjef5M5ENv+TE9midfUb3lRfjyeLOVLle X-Google-Smtp-Source: ABdhPJz/EmY8mi/fgXvn4htiS42BvHvRaIcGP0iCQSSB7G9thmwCDB9zkaS6qCEoOaFOPLpO3fEg8A== X-Received: by 2002:a62:7f13:0:b029:13e:d13d:a087 with SMTP id a19-20020a627f130000b029013ed13da087mr171278pfd.30.1599644869715; Wed, 09 Sep 2020 02:47:49 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 64sm1708312pgi.90.2020.09.09.02.47.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:47:48 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v2 18/21] tests: fixes aio-win32 about aio_remove_fd_handler, get it consistence with aio-posix.c Date: Wed, 9 Sep 2020 17:46:14 +0800 Message-Id: <20200909094617.1582-19-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200909094617.1582-1-luoyonggang@gmail.com> References: <20200909094617.1582-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 , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This is a fixes for (C:\work\xemu\qemu\build\tests\test-aio-multithread.exe:19100): GLib-CRITICAL **: 23:03:24.965: g_source_remove_poll: assertion '!SOURCE_DESTROYED (source)' failed ERROR test-aio-multithread - Bail out! GLib-FATAL-CRITICAL: g_source_remove_poll: assertion '!SOURCE_DESTROYED (source)' failed (C:\work\xemu\qemu\build\tests\test-bdrv-drain.exe:21036): GLib-CRITICAL **: 23:03:29.861: g_source_remove_poll: assertion '!SOURCE_DESTROYED (source)' failed ERROR test-bdrv-drain - Bail out! GLib-FATAL-CRITICAL: g_source_remove_poll: assertion '!SOURCE_DESTROYED (source)' failed And the idea comes from https://patchwork.kernel.org/patch/9975239/ Signed-off-by: Yonggang Luo --- util/aio-win32.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/util/aio-win32.c b/util/aio-win32.c index 953c56ab48..9899546a8a 100644 --- a/util/aio-win32.c +++ b/util/aio-win32.c @@ -37,6 +37,15 @@ struct AioHandler { static void aio_remove_fd_handler(AioContext *ctx, AioHandler *node) { + /* If the GSource is in the process of being destroyed then + * g_source_remove_poll() causes an assertion failure. Skip + * removal in that case, because glib cleans up its state during + * destruction anyway. + */ + if (!g_source_is_destroyed(&ctx->source)) { + g_source_remove_poll(&ctx->source, &node->pfd); + } + /* If aio_poll is in progress, just mark the node as deleted */ if (qemu_lockcnt_count(&ctx->list_lock)) { node->deleted = 1; @@ -139,8 +148,6 @@ void aio_set_event_notifier(AioContext *ctx, /* Are we deleting the fd handler? */ if (!io_notify) { if (node) { - g_source_remove_poll(&ctx->source, &node->pfd); - aio_remove_fd_handler(ctx, node); } } else { From patchwork Wed Sep 9 09:46:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 305821 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD224C433E2 for ; Wed, 9 Sep 2020 09:58:11 +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 5995F21973 for ; Wed, 9 Sep 2020 09:58:11 +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="SCCbY9R5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5995F21973 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFwri-0000CE-A4 for qemu-devel@archiver.kernel.org; Wed, 09 Sep 2020 05:58:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57582) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFwhp-0007pH-R9; Wed, 09 Sep 2020 05:47:57 -0400 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]:53053) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFwho-0007nx-18; Wed, 09 Sep 2020 05:47:57 -0400 Received: by mail-pj1-x1042.google.com with SMTP id o16so1069920pjr.2; Wed, 09 Sep 2020 02:47:55 -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=Kj9TtIFHlCghHqJUVATBEyOAMMRb9PuUwVel+thcnto=; b=SCCbY9R59kWVgxQ9jIfByocS+w2whmewA9PVz+Pgr+QF8KDPwWDg3gFGS1JwprIsP1 YaXfcfmG7oJ/aUYxnGM7tapff4qv655+q4vpK8zCuFdw6RQLVHOAizHFCsJv5SpU9gx+ 84h5DAsDwIHdvRekGSstdfp87NYO4tcoj7Ml8vfA4E/nnj0qtPgEPVTeCqBN1+324vhd yBQ/wdmbzCYGAc2TklRpeYeTOlHDn6bJS+eSjtmnJWYbsvBw83aGZVlL/UVnMdTogoKa vFNL6mcPsc6yzNkMyCxmWqdBKKmVNQZr70/aR/baCSjhk1Krzp39rk1xfLjk4sjanAEn NedA== 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=Kj9TtIFHlCghHqJUVATBEyOAMMRb9PuUwVel+thcnto=; b=GWggFwFOXfA/RVfw4ig8K0Dyxa2pV27jP8z9z9GBfdvgD0ggSPUS0CJ1GFO/AHn+p+ 5rBSm/tKIhxi9EyOlMoe6qO1PWBCjE6qHQqo+egtQyDQCOxbCrfAxeyD0gQG0i6LJ0u/ yr6vJ382SVKbzcC0bXQi/bQGcH+2YDm0d8ZXOu9FgYAdM7gfQETl8xxVvIH/Dg6i/NW8 O5K5lJrdReCM2CVUjTp51DAzFy9YQCUgVkCOpucd9ajCL6kmdEoXVMQ1bwNS/ajVATeq 1hCXT5fZfBULqYtqLi/O/UMp8Twpcba2aQjsWP1gcwS4Fl5qraahn2Rh9wIbOLFM7/dD 8nvQ== X-Gm-Message-State: AOAM531kGK6dnXfMJW/EddJrZLATS/x5uWFm+QNYQ4BhPrdmRDJs5sVa s9agzHnfijkaIgzv/712WPGojxJvRuSpYTXZ X-Google-Smtp-Source: ABdhPJyMtTLNdBnfaIlGb25lmVZuqM9KNGCEPgAG3bGpRedKYmh6P1/u0Ic1r+fPsDtCBAks3dvpKw== X-Received: by 2002:a17:90a:aa94:: with SMTP id l20mr94975pjq.95.1599644873798; Wed, 09 Sep 2020 02:47:53 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 64sm1708312pgi.90.2020.09.09.02.47.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:47:53 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v2 19/21] tests: Fixes test-io-channel-file by mask only owner file state mask bits Date: Wed, 9 Sep 2020 17:46:15 +0800 Message-Id: <20200909094617.1582-20-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200909094617.1582-1-luoyonggang@gmail.com> References: <20200909094617.1582-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1042; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1042.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 , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This is the error on msys2/mingw Running test test-io-channel-file ** ERROR:../tests/test-io-channel-file.c:59:test_io_channel_file_helper: assertion failed (TEST_MASK & ~mask == st.st_mode & 0777): (384 == 438) ERROR test-io-channel-file - Bail out! ERROR:../tests/test-io-channel-file.c:59:test_io_channel_file_helper: assertion failed (TEST_MASK & ~mask == st.st_mode & 0777): (384 == 438) Signed-off-by: Yonggang Luo --- tests/test-io-channel-file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test-io-channel-file.c b/tests/test-io-channel-file.c index bac2b07562..75aea6450a 100644 --- a/tests/test-io-channel-file.c +++ b/tests/test-io-channel-file.c @@ -56,7 +56,9 @@ static void test_io_channel_file_helper(int flags) umask(mask); ret = stat(TEST_FILE, &st); g_assert_cmpint(ret, >, -1); - g_assert_cmpuint(TEST_MASK & ~mask, ==, st.st_mode & 0777); + /* On Windows the stat() function in the C library checks only + the FAT-style READONLY attribute and does not look at the ACL at all. */ + g_assert_cmpuint(TEST_MASK & ~mask, ==, st.st_mode & 0700); unlink(TEST_FILE); object_unref(OBJECT(src)); From patchwork Wed Sep 9 09:46:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 305819 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63AC8C43461 for ; Wed, 9 Sep 2020 10:00: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 CC38E21973 for ; Wed, 9 Sep 2020 10:00:26 +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="hzw57DVR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC38E21973 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFwtt-0004ZB-ON for qemu-devel@archiver.kernel.org; Wed, 09 Sep 2020 06:00:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFwht-0007yY-Og; Wed, 09 Sep 2020 05:48:01 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:33083) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFwhs-0007oE-08; Wed, 09 Sep 2020 05:48:01 -0400 Received: by mail-pf1-x443.google.com with SMTP id c196so1820776pfc.0; Wed, 09 Sep 2020 02:47:59 -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=QpJB9KhDFroEY186G+IS1GoMDL1LgPmHhWlmX/8IYNM=; b=hzw57DVRB+AmY9PbkSSNOSXzrrAWKSRDCtsa9BblQc/JhPUIUzrziaXWmEb2WontrF mosQVaQLyhm0Ht+MQuyzz9xe+hszBSLkaOMES/9FnLsHityBR/w2M3805yseGLt/r71m anS3/i1l5WPkjIcQa+j3N5HQo6Pt2ZOLsyyb6zPgsPLKZlYBI9DRJOvI/QfTtUge0m/3 jiy8QlYl2QVbOXxQBug7MCVaS6TGU7dylkBq+dAs8XvMgZtq0gqT2DDg6sBpCH9eHb+j VLTGkAx2JiNuhkhACJ5oXPE/doIyoVAPaxmtH64OHcONvdaSo4gBdRk/gmLCaMOY9v3L HyFQ== 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=QpJB9KhDFroEY186G+IS1GoMDL1LgPmHhWlmX/8IYNM=; b=DRntxiZb1f7Y/EFHNDZHt3LQqNkatN3c2umjhk/srJYVc7m43eGDkT/MDKtv0+3h4k MkKP+H1wa9UO+NTcI4+0CZS192Nev8bE52G+jDIupqQ8yOLFtHS6l3gytspb7tXoF0OY iOZKVaPm0Za34pbfnaJPywjZRfuKNdbk3zr0GmddL1enSinGMYyrCZFFVr/P/VivA8qO 8mG+VcA3iq19sUbYIzlJkHm2/d0RZRM3am5h1x9lAuf0YwHvuow/epkmPoPt5iqtbnJx mHBoArfeMZWKkOYz9LiEYZEYwCH/DEJTsQszB2zDYRLnCF84S5/s/BSX9+KXizwGCrSf MZIA== X-Gm-Message-State: AOAM530QIhPN76Bb7aW2jgsBfHwF1R1lENIlUDhkiJvTtkjzqVaTYBZY kDzrNHt0ROrIduNKQunxe+XR5EEMoVABeoZ1 X-Google-Smtp-Source: ABdhPJwT5fhpwxd69ydVPWxAMyqhgPNeIt9J9OXZoGgwmas+I7QqELIPKML0wpdpUvoA5qnJVI6gSw== X-Received: by 2002:a17:902:7886:: with SMTP id q6mr22435pll.7.1599644877928; Wed, 09 Sep 2020 02:47:57 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 64sm1708312pgi.90.2020.09.09.02.47.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:47:57 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v2 20/21] tests: fix test-util-sockets.c Date: Wed, 9 Sep 2020 17:46:16 +0800 Message-Id: <20200909094617.1582-21-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200909094617.1582-1-luoyonggang@gmail.com> References: <20200909094617.1582-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 , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Fixes following errors: Running test test-util-sockets ERROR test-util-sockets - missing test plan # Start of name tests ** ERROR:../tests/test-util-sockets.c:93:test_socket_fd_pass_name_good: assertion failed (fd != -1): (-1 != -1) Bail out! ERROR:../tests/test-util-sockets.c:93:test_socket_fd_pass_name_good: assertion failed (fd != -1): (-1 != -1) First should call to qemu_init_main_loop before socket_init, then on win32 doesn't support for SOCKET_ADDRESS_TYPE_FD socket type Signed-off-by: Yonggang Luo --- tests/test-util-sockets.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test-util-sockets.c b/tests/test-util-sockets.c index af9f5c0c70..1bbb16d9b1 100644 --- a/tests/test-util-sockets.c +++ b/tests/test-util-sockets.c @@ -75,7 +75,7 @@ int monitor_vprintf(Monitor *mon, const char *fmt, va_list ap) { abort(); } void monitor_init_qmp(Chardev *chr, bool pretty, Error **errp) {} void monitor_init_hmp(Chardev *chr, bool use_readline, Error **errp) {} - +#ifndef _WIN32 static void test_socket_fd_pass_name_good(void) { SocketAddress addr; @@ -227,6 +227,7 @@ static void test_socket_fd_pass_num_nocli(void) g_free(addr.u.fd.str); } +#endif #ifdef __linux__ static gchar *abstract_sock_name; @@ -321,6 +322,7 @@ int main(int argc, char **argv) { bool has_ipv4, has_ipv6; + qemu_init_main_loop(&error_abort); socket_init(); g_test_init(&argc, &argv, NULL); @@ -340,6 +342,7 @@ int main(int argc, char **argv) test_fd_is_socket_bad); g_test_add_func("/util/socket/is-socket/good", test_fd_is_socket_good); +#ifndef _WIN32 g_test_add_func("/socket/fd-pass/name/good", test_socket_fd_pass_name_good); g_test_add_func("/socket/fd-pass/name/bad", @@ -352,6 +355,7 @@ int main(int argc, char **argv) test_socket_fd_pass_num_bad); g_test_add_func("/socket/fd-pass/num/nocli", test_socket_fd_pass_num_nocli); +#endif } #ifdef __linux__ From patchwork Wed Sep 9 09:46:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 274152 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 854A7C433E2 for ; Wed, 9 Sep 2020 09:58: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 F3F5A21973 for ; Wed, 9 Sep 2020 09:58: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="Sg4bKp3C" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F3F5A21973 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:48356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFwrp-0000T0-Rt for qemu-devel@archiver.kernel.org; Wed, 09 Sep 2020 05:58:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFwhy-0008AM-Aj; Wed, 09 Sep 2020 05:48:06 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:36311) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFwhw-0007or-4G; Wed, 09 Sep 2020 05:48:05 -0400 Received: by mail-pg1-x541.google.com with SMTP id m8so1696368pgi.3; Wed, 09 Sep 2020 02:48: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=XHC/DSYKKw+7p0nzLLzEY49FP0TKj5MM1g4o4UmgUFI=; b=Sg4bKp3CFxGJlzZIXfxAAM39pI/MzEaTDyM8QBgaT0iug3BwwlCc7001KBVGuW9tPp D3S5giFj/PeMa3H4pQT2yOAKkwn6+MyzC1qnK2hO8sZUYvYyH0dDQetLLz4ehsGi0zID AWRjXfSIgjhw/v9kZ+ZcgJrXNgltykXbQAV1g67cd5xEclqMx1Yu2iubYBwDzDx21kDB EdEsaqaYOroLV5oAgAdyS3Il7QbEs4mviAwfityDpM2X/CElvwtiH84oOZ+L4Rekpu3n mGUmjjVg/SZw9Ym6RA7ekqktKdW+4y2LT6qEb7EQIyYn9JMclI68ZNp9wBxvpRHeyo2n Xkzw== 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=XHC/DSYKKw+7p0nzLLzEY49FP0TKj5MM1g4o4UmgUFI=; b=TXqL10FD5JmyesMkzCNVsJqV5w/vyTJiiioDlZgR2rYYtjXs8yBP8iMDoQgU1LQER1 DYgikoG/X1PWh3cH7Yrtz8/2FfrgVHH3Y537ZdF4922pTJLn2cJ7Eu7r3l0gyvnm+iTW 4faMkR+H1/jl4ZYNcgq2/PtBhAEhjj8kA9DfLOeGjP2OlCIY6GCCOdOy2a/g3P62SBHq P5UfIfodGnVMVV06Kf3whDRP9V5Rg5cTB8/3F0A9PxfcRJquypAXL4s7XOhminxSrc9g SPPXF7n93ykf7SkwCtmkYYV9yt2+6nuG/JDN+d/ONB6SwILvVbEgdy11BOQp7TwadpKb yCGA== X-Gm-Message-State: AOAM533ylxzfytClNsW/3zLKkC9Ml7/3EcA6ekl5U+6xodFLZZ5BcSGy yamPZZgfU5Qe/BMTQXM8mLQsljf+Zlwccywg X-Google-Smtp-Source: ABdhPJw0+7KTm5sB03H1oOUzN/kXT+MqytcUIB/JkbJjCE/hj4VOqPZXN+1GCRzfir6KLyLSWs+aqA== X-Received: by 2002:a17:902:b908:b029:d0:cbe1:e7ab with SMTP id bf8-20020a170902b908b02900d0cbe1e7abmr197516plb.28.1599644881994; Wed, 09 Sep 2020 02:48:01 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 64sm1708312pgi.90.2020.09.09.02.47.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 02:48:01 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v2 21/21] tests: Fixes test-qdev-global-props.c Date: Wed, 9 Sep 2020 17:46:17 +0800 Message-Id: <20200909094617.1582-22-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200909094617.1582-1-luoyonggang@gmail.com> References: <20200909094617.1582-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::541; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x541.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 , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On win32 the line ending are \r\n, so we skip the \n in function test_dynamic_globalprop Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrangé --- tests/test-qdev-global-props.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test-qdev-global-props.c b/tests/test-qdev-global-props.c index 1e6b0f33ff..d8762a9756 100644 --- a/tests/test-qdev-global-props.c +++ b/tests/test-qdev-global-props.c @@ -250,10 +250,10 @@ static void test_dynamic_globalprop(void) g_test_trap_assert_passed(); g_test_trap_assert_stderr_unmatched("*prop1*"); g_test_trap_assert_stderr_unmatched("*prop2*"); - g_test_trap_assert_stderr("*warning: global dynamic-prop-type-bad.prop3 has invalid class name\n*"); + g_test_trap_assert_stderr("*warning: global dynamic-prop-type-bad.prop3 has invalid class name*"); g_test_trap_assert_stderr_unmatched("*prop4*"); - g_test_trap_assert_stderr("*warning: global nohotplug-type.prop5=105 not used\n*"); - g_test_trap_assert_stderr("*warning: global nondevice-type.prop6 has invalid class name\n*"); + g_test_trap_assert_stderr("*warning: global nohotplug-type.prop5=105 not used*"); + g_test_trap_assert_stderr("*warning: global nondevice-type.prop6 has invalid class name*"); g_test_trap_assert_stdout(""); }