From patchwork Sat Sep 12 22:44:05 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: 273907 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 5A69EC43461 for ; Sat, 12 Sep 2020 22:46:54 +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 9EF58214F1 for ; Sat, 12 Sep 2020 22:46:53 +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="MmtHkXkL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9EF58214F1 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]:58330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHEIG-0004Ss-G8 for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:46:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEGP-0002b3-Oc; Sat, 12 Sep 2020 18:44:57 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:44721) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEGO-0004D3-3A; Sat, 12 Sep 2020 18:44:57 -0400 Received: by mail-pl1-x641.google.com with SMTP id j7so2651966plk.11; Sat, 12 Sep 2020 15:44: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=hrJEqDkxFKpoRhRzMOgEeJejUGbXqPW0+cFjCJrQlA0=; b=MmtHkXkLKig+O2YtkgqHDZaPXeZc10YWkqpZUhUSqqlqyGWoFntsFAzo7dykpBcgim HT566YA1t7oiJwW96tFw/o5My2j5WVMxTf0XrljIYVR7lMehPDiqha+8sluoUKnauy5D M4hYX0lxkYHA65ya8U+obMtAzUo/f87tFgxMVfDFzRwgv/5TgQSqZOBLjEuhqtKdMzYc YRvWbRhn3nbdyIPghTxedjBl2I6Ky6049qcPszuI5JMOmAEOmsJMPTYA/BU5b4qNT7wu f3Fjv4cMDRSOI3qW3h9QF/czvlL/8gmTFsrpmV8N6qB4DCln5z/vqDCsox755F9MJei/ 5+ew== 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=hrJEqDkxFKpoRhRzMOgEeJejUGbXqPW0+cFjCJrQlA0=; b=TWjOg9QI4GctoJ5vR9aG3nB0Jlwx6gOLdR/qQR7wUPAtCoqoBiuRSzl2kIPcGdkPL2 evJLNtj5FB4/uZU9h12Bd3QhHHLY3flMWSrr3IyEQyIJtCIMzyBXz0Lso+HJXa5dptIF 8hpJg/ey/VE6G7HVh0oX3/xgltg3Q+Tm45DqNJlY2T7UtyBFDqB9qnfzkFViBllvn7mD dss/tc34+FszrfcIlzoUr1hfTFysg+Pf8oO7cXCChu+dMBQP1lK2DWvA/ql7k0yRKSh0 HHXjLaZtY+0PyMjatdSZOeMyd+hVOQuPCs3IBHSSz+UvcknrxdKoLOJt1NcisG3OqAHv ox0Q== X-Gm-Message-State: AOAM530STrWOQm2ui1m4OQgwHj2Ac3gShj/H8bdBZt2GKm4Qy4u2xIEy pvPAc6T4Ijm6Y3JxGTGWMMd5whYg5eQvb0s4z7w= X-Google-Smtp-Source: ABdhPJwoHcObldCAwI7YCoB6+jl63wLQ9+UBhj5Xp2pkGE/6mOvz7XHUcbuOYN9AxmYncBFlDPW0jg== X-Received: by 2002:a17:902:441:b029:d0:89f4:621f with SMTP id 59-20020a1709020441b02900d089f4621fmr8565413ple.7.1599950693927; Sat, 12 Sep 2020 15:44:53 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.44.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:44:53 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 01/27] rcu: Implement drain_call_rcu Date: Sun, 13 Sep 2020 06:44:05 +0800 Message-Id: <20200912224431.1428-2-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::641; envelope-from=luoyonggang@gmail.com; helo=mail-pl1-x641.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 , Maxim Levitsky , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Hajnoczi , Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Gerd Hoffmann , Stefan Hajnoczi , Wen Congyang , Paolo Bonzini , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Maxim Levitsky This will allow is to preserve the semantics of hmp_device_del, that the device is deleted immediatly which was changed by previos patch that delayed this to RCU callback Signed-off-by: Maxim Levitsky Suggested-by: Stefan Hajnoczi Reviewed-by: Stefan Hajnoczi --- include/qemu/rcu.h | 1 + util/rcu.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/include/qemu/rcu.h b/include/qemu/rcu.h index 570aa603eb..0e375ebe13 100644 --- a/include/qemu/rcu.h +++ b/include/qemu/rcu.h @@ -133,6 +133,7 @@ struct rcu_head { }; extern void call_rcu1(struct rcu_head *head, RCUCBFunc *func); +extern void drain_call_rcu(void); /* The operands of the minus operator must have the same type, * which must be the one that we specify in the cast. diff --git a/util/rcu.c b/util/rcu.c index 60a37f72c3..c4fefa9333 100644 --- a/util/rcu.c +++ b/util/rcu.c @@ -293,6 +293,61 @@ void call_rcu1(struct rcu_head *node, void (*func)(struct rcu_head *node)) qemu_event_set(&rcu_call_ready_event); } + +struct rcu_drain { + struct rcu_head rcu; + QemuEvent drain_complete_event; +}; + +static void drain_rcu_callback(struct rcu_head *node) +{ + struct rcu_drain *event = (struct rcu_drain *)node; + qemu_event_set(&event->drain_complete_event); +} + +/* + * This function ensures that all pending RCU callbacks + * on the current thread are done executing + + * drops big qemu lock during the wait to allow RCU thread + * to process the callbacks + * + */ + +void drain_call_rcu(void) +{ + struct rcu_drain rcu_drain; + bool locked = qemu_mutex_iothread_locked(); + + memset(&rcu_drain, 0, sizeof(struct rcu_drain)); + qemu_event_init(&rcu_drain.drain_complete_event, false); + + if (locked) { + qemu_mutex_unlock_iothread(); + } + + + /* + * RCU callbacks are invoked in the same order as in which they + * are registered, thus we can be sure that when 'drain_rcu_callback' + * is called, all RCU callbacks that were registered on this thread + * prior to calling this function are completed. + * + * Note that since we have only one global queue of the RCU callbacks, + * we also end up waiting for most of RCU callbacks that were registered + * on the other threads, but this is a side effect that shoudn't be + * assumed. + */ + + call_rcu1(&rcu_drain.rcu, drain_rcu_callback); + qemu_event_wait(&rcu_drain.drain_complete_event); + + if (locked) { + qemu_mutex_lock_iothread(); + } + +} + void rcu_register_thread(void) { assert(rcu_reader.ctr == 0); From patchwork Sat Sep 12 22:44: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: 305579 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 4610EC43461 for ; Sat, 12 Sep 2020 22:46: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 CC175214F1 for ; Sat, 12 Sep 2020 22:46:58 +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="RoJ5h7HU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC175214F1 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]:58930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHEIL-0004jZ-Su for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:46:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEGW-0002mP-9W; Sat, 12 Sep 2020 18:45:04 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:44068) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEGT-0004DD-CX; Sat, 12 Sep 2020 18:45:03 -0400 Received: by mail-pg1-x532.google.com with SMTP id 7so8750557pgm.11; Sat, 12 Sep 2020 15:44: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=+TzCV5YsUfMO+qMrCqWTpCCJj1Kw1e96uTxGZjpZ7yY=; b=RoJ5h7HUzaS1ue8F5TpGaSZjXJlG7R5qzmAI0xdP9qzpiU7KZlbsUGD4wO7J17iKv8 Djf5jp6RVYcFPPFGzpnqw7Hl9XigO2vcSUCk/rpzpIIcIdZlyOJhXXpRgpWu/NhEJyTo D8Nuqjb4r8w8htufpMWARKO1olKH6/yYzLogI+EvyQsJ1AtEZvdZdHVp81/4stOml193 1HZcvuo7wSYbmo12h12DoW4y1fWmXX8FMdj1tiRczgwkYV98PI9hee1QfIexiKiSZTYg vzQebt+b7q7Bz7riqYIkMOeoqceFWvSKEijmd/gTegSgzQvw2vejpwMdUlwjOyai3Vcn +13A== 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=+TzCV5YsUfMO+qMrCqWTpCCJj1Kw1e96uTxGZjpZ7yY=; b=HY1osVByaGoGf593bFN+uNkpjfsv9dBhNUHpgjzm5AX5S0XZVr6qyvYop3Gb/cXD2Y FcUPcByDKjXvNrI2x5Tk9SDzUVJ9K8yR401BRWlXxkjWPsLMbtz9DAA88vGlFtiNC3XE zrYn3ERalnuIIs4cJGNbg3r6EOgXRqXUmiSDB4rIxRV+fXG1vmd2tw4VkMo/+DqjNc7m Kpw0D3RgVmYjPj/J0FOkasx12vQGZknpJ6xHBgi0qbV89HVRZWaTsiaigxs8AAP+Q1G0 jNR/GdaV37noVIC/kkhkrx6TaXEKduSN46PbrbFInEeJk3RO8Qt1ispgN2ZKfB0/aQNP nzCQ== X-Gm-Message-State: AOAM533Ai2UDP6Gaf5+joDuANRIPIe5MqaFKtlIZweugC4ZsWixrIahl qoc26e0/sdGGjgtp6zXJLXi3kYIv2IF0y+wgHMM= X-Google-Smtp-Source: ABdhPJwvrozLNINoV9oSQuHNXi219Srb/88H0vGjEL0W/34/+xp7eKxZwz5zChCpIXFFzzLx2W0HBg== X-Received: by 2002:a63:d157:: with SMTP id c23mr6134640pgj.281.1599950698152; Sat, 12 Sep 2020 15:44:58 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.44.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:44:57 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 02/27] block: Fixes nfs compiling error on msys2/mingw Date: Sun, 13 Sep 2020 06:44:06 +0800 Message-Id: <20200912224431.1428-3-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::532; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x532.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 , Paolo Bonzini , 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, 22 insertions(+), 4 deletions(-) diff --git a/block/nfs.c b/block/nfs.c index 61a249a9fc..98b48f363b 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,9 @@ typedef struct NFSClient { bool has_zero_init; AioContext *aio_context; QemuMutex mutex; +#if !defined (_WIN32) blkcnt_t st_blocks; +#endif bool cache_used; NFSServer *server; char *path; @@ -70,7 +80,7 @@ typedef struct NFSRPC { int ret; int complete; QEMUIOVector *iov; - struct stat *st; + struct nfs_stat *st; Coroutine *co; NFSClient *client; } NFSRPC; @@ -419,7 +429,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 +555,9 @@ static int64_t nfs_client_open(NFSClient *client, BlockdevOptionsNfs *opts, } ret = DIV_ROUND_UP(st.st_size, BDRV_SECTOR_SIZE); +#if !defined (_WIN32) client->st_blocks = st.st_blocks; +#endif client->has_zero_init = S_ISREG(st.st_mode); *strp = '/'; goto out; @@ -706,6 +718,7 @@ static int nfs_has_zero_init(BlockDriverState *bs) return client->has_zero_init; } +#if !defined (_WIN32) /* Called (via nfs_service) with QemuMutex held. */ static void nfs_get_allocated_file_size_cb(int ret, struct nfs_context *nfs, void *data, @@ -729,7 +742,7 @@ 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)) { @@ -748,6 +761,7 @@ static int64_t nfs_get_allocated_file_size(BlockDriverState *bs) return (task.ret < 0 ? task.ret : st.st_blocks * 512); } +#endif static int coroutine_fn nfs_file_co_truncate(BlockDriverState *bs, int64_t offset, bool exact, @@ -778,7 +792,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 +814,9 @@ static int nfs_reopen_prepare(BDRVReopenState *state, nfs_get_error(client->context)); return ret; } +#if !defined (_WIN32) client->st_blocks = st.st_blocks; +#endif } return 0; @@ -869,7 +885,9 @@ static BlockDriver bdrv_nfs = { .create_opts = &nfs_create_opts, .bdrv_has_zero_init = nfs_has_zero_init, +#if !defined (_WIN32) .bdrv_get_allocated_file_size = nfs_get_allocated_file_size, +#endif .bdrv_co_truncate = nfs_file_co_truncate, .bdrv_file_open = nfs_file_open, From patchwork Sat Sep 12 22:44:07 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: 273906 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 6E898C433E2 for ; Sat, 12 Sep 2020 22:47:01 +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 CDECA214F1 for ; Sat, 12 Sep 2020 22:47:00 +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="GeBLTVQG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CDECA214F1 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]:59130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHEIN-0004pN-QF for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:46:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEGY-0002rP-Lc; Sat, 12 Sep 2020 18:45:06 -0400 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:36817) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEGW-0004EY-S0; Sat, 12 Sep 2020 18:45:06 -0400 Received: by mail-pl1-x643.google.com with SMTP id k13so2652710plk.3; Sat, 12 Sep 2020 15:45: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=/Q/d/vfX2r5ok5sWGBwNZjHxKJu0oUaT5gHBOiJ10fI=; b=GeBLTVQGiC9Bte2jlvrN+8UEXf5kwDsRR6fQ1WubZsCzfs+zlv2KTlYfQsD+aVUzRd ukS4/4+Q6R53gEeAd/ebm27/rOlUJu2J/1LoeCK6T7OpMrycf5Q6xMKRk0c301UCmt9I vi9a4t0xh644YBbWGw2Z66avGDdCOvOvo3FUkjvB6Po9uIgJPBBSIrh+MktLkKEnPaX1 mCkEB/rZmt3O3BzewD41LdTR5ZQB+Covto1CaA0+dFjAy/XTSgfK3c8Zo1A6BMgD40Hp ADGaJZEqH9yf5nXTVNQZzhupJenZGphB97WDHmKtA0NS9Hcq5Lhu422VwquoUbLWHeFv /u5w== 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=/Q/d/vfX2r5ok5sWGBwNZjHxKJu0oUaT5gHBOiJ10fI=; b=bq2+iSEmUWa0uDCiOZAWrxLNZGG8LpLfmVl/k/o5YDGEF3K/9zc9qMdQ1MTf15Q7xU Y2YgeOOClCmDcjBWpHozD4Wh7iBDIjDvyJbZdZazPXX/gd+oHL2eVhrQsvvQdo8IORTu hl1HF+3TSdZe3MPNIUtnLkXb5TZFu+s0YSbYnKhLL4+kXNU7oOkoet5i8/NKcIoByXKi 5CJMYYblqB0AQoIjo7rnblOnKLFNZ0QRyxzVUiugl/lMheEfeB/63A+uxY7ooyigsxnL OzGt/EMNZGmzXYUkRhu4qfCqR7Snt7PB7NrATQjyo2ZiTGpIUIQGBWd9aSQMnuRUK7No Q5Og== X-Gm-Message-State: AOAM533ZLCbWZWDXGwTmFP2OJAUOozHPKl9hEk2iB3nR6Ak8wD7OMUHa MI+/O3My/0+RVCGQe6LUOdrISOQlF3xdYeuAY6c= X-Google-Smtp-Source: ABdhPJxvV0O7ZUDFzx2DCJ98VHoENNuGNZ1RQ1KgQK2n3OP5/3l3IiKO0LsaCdypcWOGSBaJiHSVrA== X-Received: by 2002:a17:902:ff02:b029:d0:89f3:28d2 with SMTP id f2-20020a170902ff02b02900d089f328d2mr7899759plj.14.1599950702588; Sat, 12 Sep 2020 15:45:02 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.44.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:45:01 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 03/27] ci: fixes msys2 build by upgrading capstone to 4.0.2 Date: Sun, 13 Sep 2020 06:44:07 +0800 Message-Id: <20200912224431.1428-4-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::643; envelope-from=luoyonggang@gmail.com; helo=mail-pl1-x643.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 , Paolo Bonzini , 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" If only using capstone_cflags="-I${source_path}/capstone/include/capstone" Then will cause the following compiling error: CC cs.o cs.c:17:10: fatal error: 'capstone/capstone.h' file not found #include ^~~~~~~~~~~~~~~~~~~~~ 1 error generated. 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 Sat Sep 12 22:44: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: 305577 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 7A711C433E2 for ; Sat, 12 Sep 2020 22:48: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 1DB78214F1 for ; Sat, 12 Sep 2020 22:48: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="l8o5I7Uc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1DB78214F1 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]:39780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHEJv-0008Qv-43 for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:48:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEGd-00032m-FQ; Sat, 12 Sep 2020 18:45:11 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:38062) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEGa-0004F8-V9; Sat, 12 Sep 2020 18:45:11 -0400 Received: by mail-pf1-x444.google.com with SMTP id l126so9684066pfd.5; Sat, 12 Sep 2020 15:45:08 -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=TsNOy56cT/aZuPzlGfi9G8/JBTKitoxne2lgskAEKvc=; b=l8o5I7UcyUJB/X7Q2MEcBOVqIWC0OO605C2avtZPFYECDi5bUyQemGUnUDSkp8HPwl YJhOwm5d2UOYN8jzNnPqfpQ4wMchaa1/IShObTiZm93lhrzdAhfmiZNx1XXKpTfeREag 2wYjNnQfSrQ65rjjFIvXsLLKZCyJfhN97771LsEa8yS2BibJPzB0ES1jF++rBNTQS1O2 dYtInvnqZOVW+k/K5GB/Uw5fUyjElUw7mcBKdTVWAFFNcPB6wwod4KUiVck6ZJ64nWvq UTnf/pJyiYu6b6CLWdXUqgjtreOdO7kCe3V5AZsGaoUDjRGc8xgnt0qQjAD7qneMnTSY mayg== 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=TsNOy56cT/aZuPzlGfi9G8/JBTKitoxne2lgskAEKvc=; b=uayrXCflV6EMZMN4lx47Wd2M5Kit37V1d+QuvYxi+GzdL0GWhi7syjoEqMj65NhFso IHd9RRhmwE0tC0PQB6geu7rlxi3NUj99ub8PdIp37JrDlQhuNpx5L9yi1/50HztD/Xy9 /8RpIo1E6WwctdIgWj+cyT9Nd/t3uqoV6ZbvSU/x8unm3JYYf2TfoIlUuABjDt4AMDd1 61Zz8gqsdTnLm6S7Kfqb7uaUSgm59LCEyU1LfkdHEdVg/Txo29NSah/dkfzIG2Lz0lFY HdreSW6FeQ0HLEigWfEZOqmAlPsLKWA2hxHaSaYX9tPu70H/ZSKnMe43zTffdq674459 EXQA== X-Gm-Message-State: AOAM531tGQSq2u66MQG2clzJ/5+hPDEd+YFv46bw8pTxmvpaUG3Re10Q bONJEOdDAJG3EcINcMz3w1cyqhTaigGxtdoYxZg= X-Google-Smtp-Source: ABdhPJx0BKO5Vzsde3xqLHj845g2p80aeYlDo0LUdRPBKfM1WqR/TNjJxX20etnEAz5oZV+zP0SPBw== X-Received: by 2002:aa7:911a:0:b029:13e:d13d:a13d with SMTP id 26-20020aa7911a0000b029013ed13da13dmr7834104pfh.37.1599950706742; Sat, 12 Sep 2020 15:45:06 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.45.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:45:06 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 04/27] configure: Fixes ncursesw detection under msys2/mingw and enable curses Date: Sun, 13 Sep 2020 06:44:08 +0800 Message-Id: <20200912224431.1428-5-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-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 , Paolo Bonzini , 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 not use : as path separator. and we know the command line parameter are not likely contains newline, we could use newline as path command line parameter separator -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 Refer to https://unix.stackexchange.com/a/103011/218958 If your file names are guaranteed not to contain newlines, you can use newlines as the separator. W hen you expand the variable, first turn off globbing with set -f and set the list of field splitting characters IFS to contain only a newline. 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 | 25 +++++++++++++++---------- ui/curses.c | 10 +++++----- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/configure b/configure index f4f8bc3756..b21843fdb9 100755 --- a/configure +++ b/configure @@ -3653,35 +3653,40 @@ 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 ncurses 2>/dev/null) + $($pkg_config --cflags ncursesw 2>/dev/null)" + curses_lib_list="$($pkg_config --libs ncurses 2>/dev/null) + $($pkg_config --libs ncursesw 2>/dev/null) + -lpdcurses" 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" + 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" fi curses_found=no cat > $TMPC << EOF #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=: + IFS=' +' # turn off variable value expansion except for splitting at newlines for curses_inc in $curses_inc_list; do # Make sure we get the wide character prototypes curses_inc="-DNCURSES_WIDECHAR $curses_inc" - IFS=: + IFS=' +' # turn off variable value expansion except for splitting at newlines for curses_lib in $curses_lib_list; do unset IFS if compile_prog "$curses_inc" "$curses_lib" ; then 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 Sat Sep 12 22:44:09 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: 273904 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 AE634C43461 for ; Sat, 12 Sep 2020 22:48:37 +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 597AA214F1 for ; Sat, 12 Sep 2020 22:48:37 +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="qcz/XxqL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 597AA214F1 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]:39916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHEJw-0008UC-Ez for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:48:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEGh-0003C5-CZ; Sat, 12 Sep 2020 18:45:15 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:43402) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEGf-0004FV-6i; Sat, 12 Sep 2020 18:45:15 -0400 Received: by mail-pg1-x541.google.com with SMTP id t14so8749283pgl.10; Sat, 12 Sep 2020 15:45:12 -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=54KjmFONhFVNbISF0ZvZ1gRQPHqntcxYT0Rta8IUzTM=; b=qcz/XxqLuUDOdhSCn1CTMPzaTATQUdD6TYfuzElhnk2ZXLdZUj2JH5m0fHV9B4/SgQ wY/UMKkIVflkoeE+AaLBvu2Sl6N+Ds48OOrwjhCmA6/8IW9UZY8B0hfMiVS78g08QgrA GCemfdPtl44PNJ7030W7dkAIe4fQm6HJt9O5bfzuh5II0AQGFqHeBvqq1pV0JkFeC024 gcuFKA/XuhzW69TENDg2J1DWRmbUzfaPyW7rCXKOK2sbMfg9gMaKLMygJp5I/UvALKo3 jlen3jVIC5GIX4YeZ+mtXQ2Dl5ugPnT2bxXJf2qh8G+L3SanMyLNwn3sgx2nzuIzbuUV ogcA== 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=54KjmFONhFVNbISF0ZvZ1gRQPHqntcxYT0Rta8IUzTM=; b=QBNVcXmmU1/MVfOx98W2vcNlDkrSsyI3vfBjK2dxV2lWmOMsrA6MnNEeumv8l4glaJ 1UI86ntRtzVYmKGhVWr5dTdBNwFL4O0gvN4v5/v4A1o6TtsuhFSr4JNzzTuhzoKCeuhm 4owR9nedY8J9IPZ7zDx8pEPq6rjruAiYKDLlVgPHkdJMnRO+yoOlmBXlEKjxw8mgxVk3 MR/HRBd/00o8FOcYd62ESfKzm4n0W84ufRhNmzhgluY/+EH5O1WYLc96pja2eUWBLr2O MsKaj8Ikb1T1uK5tTrPJ/wKgA00JHWf0tYGbC58YUNkkDZHMZ6q9pijuAQdfaJz+XptE KjIg== X-Gm-Message-State: AOAM533hff9ivMzTmhz3f5nFjADizgkf2jO3yFmTyXshmK40U9MCYiDB gZ/8RX62iJRzSdKWv4nOMeMXvRSsninq9qnA9KM= X-Google-Smtp-Source: ABdhPJycmKmOHRepGpB/3F5nqqXr6UwI0qHt0fYJIABNz8+uCmVLHZoSqyX+BIKMkKePScnHXV5new== X-Received: by 2002:aa7:9309:0:b029:13e:d13d:a10a with SMTP id 9-20020aa793090000b029013ed13da10amr7372708pfj.38.1599950710930; Sat, 12 Sep 2020 15:45:10 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.45.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:45:10 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 05/27] win32: Simplify gmtime_r detection direct base on _POSIX_THREAD_SAFE_FUNCTIONS. Date: Sun, 13 Sep 2020 06:44:09 +0800 Message-Id: <20200912224431.1428-6-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-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 , Paolo Bonzini , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" First, this reduce the size of configure, configure are tending to removal in future, and this didn't introduce any new feature or remove any exist feature. Second, the current localtime_r detection are conflict with ncursesw detection in mingw, when ncursesw detected, it will provide the following compile flags pkg-config --cflags ncursesw -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L -IC:/CI-Tools/msys64/mingw64/include/ncursesw And the compile flag _POSIX_C_SOURCE will always cause _POSIX_THREAD_SAFE_FUNCTIONS to be defined, in new version of mingw, that's will cause localtime_r to be defined. But the configure script didn't provide _POSIX_C_SOURCE macro, and that's will result localtime_r not detected because localtime_r are defined in forceinline manner. And finally cause conflict between QEMU defined localtime_r struct tm *localtime_r(const time_t *timep, struct tm *result); with mingw defined localtime_r ``` #if defined(_POSIX_C_SOURCE) && !defined(_POSIX_THREAD_SAFE_FUNCTIONS) #define _POSIX_THREAD_SAFE_FUNCTIONS 200112L #endif #ifdef _POSIX_THREAD_SAFE_FUNCTIONS __forceinline struct tm *__CRTDECL localtime_r(const time_t *_Time, struct tm *_Tm) { return localtime_s(_Tm, _Time) ? NULL : _Tm; } __forceinline struct tm *__CRTDECL gmtime_r(const time_t *_Time, struct tm *_Tm) { return gmtime_s(_Tm, _Time) ? NULL : _Tm; } __forceinline char *__CRTDECL ctime_r(const time_t *_Time, char *_Str) { return ctime_s(_Str, 0x7fffffff, _Time) ? NULL : _Str; } __forceinline char *__CRTDECL asctime_r(const struct tm *_Tm, char * _Str) { return asctime_s(_Str, 0x7fffffff, _Tm) ? NULL : _Str; } #endif ``` So I suggest remove this configure script, and restrict msys2/mingw version to easy to maintain. And use _POSIX_THREAD_SAFE_FUNCTIONS to guard the localtime_r and counterpart functions Signed-off-by: Yonggang Luo --- configure | 34 ---------------------------------- include/sysemu/os-win32.h | 4 ++-- util/oslib-win32.c | 2 +- 3 files changed, 3 insertions(+), 37 deletions(-) diff --git a/configure b/configure index b21843fdb9..af86ba1db3 100755 --- a/configure +++ b/configure @@ -2495,37 +2495,6 @@ if test "$vhost_net" = ""; then test "$vhost_kernel" = "yes" && vhost_net=yes fi -########################################## -# MinGW / Mingw-w64 localtime_r/gmtime_r check - -if test "$mingw32" = "yes"; then - # Some versions of MinGW / Mingw-w64 lack localtime_r - # and gmtime_r entirely. - # - # Some versions of Mingw-w64 define a macro for - # localtime_r/gmtime_r. - # - # Some versions of Mingw-w64 will define functions - # for localtime_r/gmtime_r, but only if you have - # _POSIX_THREAD_SAFE_FUNCTIONS defined. For fun - # though, unistd.h and pthread.h both define - # that for you. - # - # So this #undef localtime_r and #include - # are not in fact redundant. -cat > $TMPC << EOF -#include -#include -#undef localtime_r -int main(void) { localtime_r(NULL, NULL); return 0; } -EOF - if compile_prog "" "" ; then - localtime_r="yes" - else - localtime_r="no" - fi -fi - ########################################## # pkg-config probe @@ -7087,9 +7056,6 @@ if [ "$bsd" = "yes" ] ; then echo "CONFIG_BSD=y" >> $config_host_mak fi -if test "$localtime_r" = "yes" ; then - echo "CONFIG_LOCALTIME_R=y" >> $config_host_mak -fi if test "$qom_cast_debug" = "yes" ; then echo "CONFIG_QOM_CAST_DEBUG=y" >> $config_host_mak fi diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h index d8978e28c0..3ac8a53bac 100644 --- a/include/sysemu/os-win32.h +++ b/include/sysemu/os-win32.h @@ -48,12 +48,12 @@ #define siglongjmp(env, val) longjmp(env, val) /* Missing POSIX functions. Don't use MinGW-w64 macros. */ -#ifndef CONFIG_LOCALTIME_R +#ifndef _POSIX_THREAD_SAFE_FUNCTIONS #undef gmtime_r struct tm *gmtime_r(const time_t *timep, struct tm *result); #undef localtime_r struct tm *localtime_r(const time_t *timep, struct tm *result); -#endif /* CONFIG_LOCALTIME_R */ +#endif static inline void os_setup_signal_handling(void) {} static inline void os_daemonize(void) {} diff --git a/util/oslib-win32.c b/util/oslib-win32.c index c654dafd93..f2fa9a3549 100644 --- a/util/oslib-win32.c +++ b/util/oslib-win32.c @@ -106,7 +106,7 @@ void qemu_anon_ram_free(void *ptr, size_t size) } } -#ifndef CONFIG_LOCALTIME_R +#ifndef _POSIX_THREAD_SAFE_FUNCTIONS /* FIXME: add proper locking */ struct tm *gmtime_r(const time_t *timep, struct tm *result) { From patchwork Sat Sep 12 22:44:10 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: 305578 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 D284DC433E2 for ; Sat, 12 Sep 2020 22:48:24 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 67F07214F1 for ; Sat, 12 Sep 2020 22:48:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bJuubO2x" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67F07214F1 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]:38584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHEJj-0007wO-Hj for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:48:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEGl-0003Ko-2E; Sat, 12 Sep 2020 18:45:19 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:43773) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEGj-0004Gv-Ct; Sat, 12 Sep 2020 18:45:18 -0400 Received: by mail-pl1-x641.google.com with SMTP id e4so2650278pln.10; Sat, 12 Sep 2020 15:45:16 -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=fONA64XSdMINk4Pb3HJvl02BkTmqUfaoSQk6W/tx2aE=; b=bJuubO2xrm/C9siIXHjDP3vRF+5d0cv8+AvzsMzEDyybJAaGbATG/XYjf7vGqVzJ57 DOkvNF2KhXtGDsPP5A2U5pHlXkRoe542EF54tq14mt71wK6CW2j6GG8Y352kQzlkFwFk SUN7BYbg3+JD/OLXF8OPB4Ac1jX+s1hKlJwB/X3q/NO6ha4LK+coaZXtI+PTZixZU4Jl NE+mLM8OeZYYWb6yHRrvX8QvlO0Xc4OW8gfIw/oe3aF011E2b3omxsnhuGE+YGpCcZYv +h3BLvDqNqxYwEYUehXzHHwyvlf9ztnlc9utiR9Ujhc7J4rfO1jcUdBraYC0DffqvpSf rI/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=fONA64XSdMINk4Pb3HJvl02BkTmqUfaoSQk6W/tx2aE=; b=BOwbB2ctfp0O8FrtMy0RlLTwn6TQkrW5pFEyLmgxQGsqzfLUt/0xcgSdHKET0jlGlD 9RpFq4LJPktlFynntB2VRZjew7LfiIhJxbWMTvLOPQG37kfY9Yj6IFqJ06LL7Si8y9uW RI14c8IckjWVQ8Zyk2JVYZ/W7OPvY2yAf/x2HeJowRVfyosC+LdjDNj1FaLugi7F1iGM 9bWeeZGrzStIVZkH/xoksbrVrFl5/m5iHLc2mzmVd0Lha5WdQsYYW+EJ3329rLQrVAb6 gN5AS/KiRX76DfmOmp34kESq3JNM9D+fak0nLLS41FtR8EuBRc66iLv7h7kWluIuGTd6 D7mg== X-Gm-Message-State: AOAM531vVUKON+rNXaXLMXAqhUskBiIgPiBNLaU6ip4utySl1FQgDGw/ UBKFItixSIdgEpNhC9olsHm/q8uGCWZIFqZNVtE= X-Google-Smtp-Source: ABdhPJwHn7qTof05O3b8ed9rQni1lfpk4hOB+CnTs6FEpjXqOwL7v3C5u39Q5OnYvuaYCROHGg5TYA== X-Received: by 2002:a17:902:564:: with SMTP id 91mr7684596plf.141.1599950715478; Sat, 12 Sep 2020 15:45:15 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.45.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:45:14 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 06/27] curses: Fixes curses compiling errors. Date: Sun, 13 Sep 2020 06:44:10 +0800 Message-Id: <20200912224431.1428-7-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::641; envelope-from=luoyonggang@gmail.com; helo=mail-pl1-x641.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 , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , 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: Gerd Hoffmann Reviewed-by: Daniel P. Berrangé --- 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 Sat Sep 12 22:44:11 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: 273903 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 5643FC43461 for ; Sat, 12 Sep 2020 22:50:09 +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 F2E5D214F1 for ; Sat, 12 Sep 2020 22:50:08 +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="SAkRSbLa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2E5D214F1 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]:48894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHELQ-0003e6-1G for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:50:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEGs-0003QL-Gy; Sat, 12 Sep 2020 18:45:32 -0400 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]:46170) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEGn-0004HW-Ok; Sat, 12 Sep 2020 18:45:26 -0400 Received: by mail-pg1-x52f.google.com with SMTP id 34so8747945pgo.13; Sat, 12 Sep 2020 15:45: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=27ajP4GoRfKO+nbwUgNlBqHfhHBZSCkZ9ODFQ91KtVY=; b=SAkRSbLakXcrY2/xsvzeD8sgrwbmEQu+EcgNVadnCHWWLL20ILu75p5D9jrF4AfqWo T/4UgRNQ4+VjOhCoJTHzCgsY/UNC26kq754KFNBEbgTSeilukXa7aN4Xdab+OO5jQGvR QztfdlVfU4pgS4YeOi1YOSdtQk9boC/2l0wfknkBWTi5dDncCnf/B9ZAL5kWIAcMazB+ QHNXLkMJ/3KjQpRMNuy9/a/+HzOx5+oomiC59tUEF9e2SIuJu3W/mWB/XgFPzk293mBb R2Srh9J7/o2L/LFkQuwvx3CjneHtObAx7UPC4qNJQCiuZpNot2W2QcLqMXHVRlV3LVdz Gg2A== 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=27ajP4GoRfKO+nbwUgNlBqHfhHBZSCkZ9ODFQ91KtVY=; b=k+urYNAy+wobXGhUOZbrsPWlexo9zCN/6kt2QJBCBc3ZJ/TWBeFqVTS8mkQOO0FOgr b4nl+p2M3FvMPihBBsNT4Dikota/OkLUwTRmRZ7jSNd0m29U1qgjPyVfs0LYPQ3ECvSH w5ouSyKZxW5QgX/+3ldgpHidrTe8Mh7+FT7PPs3D0y1XpzceSVM7ukasCqBfkM9vD1DF xVKLUCma1Oabjz9Rux9Qrcxw55tHd05AxITq6qCMJft9qEkOOOh0eaaqAFiRGWNSpr8i Vp6shUe8/e9ITcMiqr3u0z8R9fG7KjksXJdfkSlMKgsp0I/tlEUxgpPF+oo3KgH+wJUp kWyw== X-Gm-Message-State: AOAM531aKYlKFNh7NdLiYaIy8nAMzo1yDDZoxK5JKh66mElQq03XMJUk GPW5bCY81UkN0+cluq2nCd8gJGU+OeJQnwpjQto= X-Google-Smtp-Source: ABdhPJyTFsVzWWvHybQpEZGc11O40htRlNNKxWJX+bnCSgwWp5pqRG6UmieoKZ/pF2rghD+pjoa4fw== X-Received: by 2002:a05:6a00:8c5:b029:13e:ce2c:88bd with SMTP id s5-20020a056a0008c5b029013ece2c88bdmr7761188pfu.0.1599950719688; Sat, 12 Sep 2020 15:45:19 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.45.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:45:18 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 07/27] tests: disable /char/stdio/* tests in test-char.c on win32 Date: Sun, 13 Sep 2020 06:44:11 +0800 Message-Id: <20200912224431.1428-8-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x52f.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 , Paolo Bonzini , 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. Disable them by using variable is_win32, so we doesn't need macro to open it. and easy recover those function latter. Signed-off-by: Yonggang Luo --- tests/test-char.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/tests/test-char.c b/tests/test-char.c index d35cc839bc..184ddceab8 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -77,7 +77,6 @@ static void fe_event(void *opaque, QEMUChrEvent event) } } -#ifdef _WIN32 static void char_console_test_subprocess(void) { QemuOpts *opts; @@ -102,7 +101,7 @@ static void char_console_test(void) g_test_trap_assert_passed(); g_test_trap_assert_stdout("CONSOLE"); } -#endif + static void char_stdio_test_subprocess(void) { Chardev *chr; @@ -1448,7 +1447,11 @@ static SocketAddress unixaddr = { int main(int argc, char **argv) { - bool has_ipv4, has_ipv6; + bool has_ipv4, has_ipv6, is_win32 = false; + +#ifdef _WIN32 + is_win32 = true; +#endif qemu_init_main_loop(&error_abort); socket_init(); @@ -1467,12 +1470,15 @@ int main(int argc, char **argv) g_test_add_func("/char/invalid", char_invalid_test); g_test_add_func("/char/ringbuf", char_ringbuf_test); g_test_add_func("/char/mux", char_mux_test); -#ifdef _WIN32 - g_test_add_func("/char/console/subprocess", char_console_test_subprocess); - g_test_add_func("/char/console", char_console_test); -#endif - g_test_add_func("/char/stdio/subprocess", char_stdio_test_subprocess); - g_test_add_func("/char/stdio", char_stdio_test); + if (0) { + g_test_add_func("/char/console/subprocess", char_console_test_subprocess); + g_test_add_func("/char/console", char_console_test); + } + + if (!is_win32) { + g_test_add_func("/char/stdio/subprocess", char_stdio_test_subprocess); + g_test_add_func("/char/stdio", char_stdio_test); + } #ifndef _WIN32 g_test_add_func("/char/pipe", char_pipe_test); #endif @@ -1534,7 +1540,7 @@ int main(int argc, char **argv) g_test_add_data_func("/char/socket/client/dupid-reconnect/" # name, \ &client8 ##name, char_socket_client_dupid_test) - if (has_ipv4) { + if (has_ipv4 && !is_win32) { SOCKET_SERVER_TEST(tcp, &tcpaddr); SOCKET_CLIENT_TEST(tcp, &tcpaddr); g_test_add_data_func("/char/socket/server/two-clients/tcp", &tcpaddr, From patchwork Sat Sep 12 22:44:12 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: 305576 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 EB6ABC43461 for ; Sat, 12 Sep 2020 22:50:03 +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 910A5214F1 for ; Sat, 12 Sep 2020 22:50:03 +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="Mjr14rb0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 910A5214F1 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]:48274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHELK-0003Ob-Cd for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:50:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEGu-0003SG-F1; Sat, 12 Sep 2020 18:45:33 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:43397) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEGs-0004Kx-H0; Sat, 12 Sep 2020 18:45:28 -0400 Received: by mail-pf1-x441.google.com with SMTP id f18so9677900pfa.10; Sat, 12 Sep 2020 15:45: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=7zvfu2AU8jmrgTOs2oC3Qnm1T8TZc9G/7u0+CpqNJic=; b=Mjr14rb0e3jS5Rj/T/5jYyxRafyYfPQj3wwCljDJw91aV8TSWaXKJJ43M3ZsA8qzOJ J2VxcB7fBBfRSgH221PEh83+sANz9vZoj9WCdxFUUYhDTniz1vHE3wQvMzFp/gWx1TGE J1tTlqEg2VK2XuKo3zpeTXJWGImWIOfcAeIbtznwqyhBtkC/lWO/RX27PFyinUEG1nzT ZSPHBiD3YD42HAO56au84goLictl8BM3E6uYyw83mf8xF2FyQ8vycqGbJh+jFHWrR/Lv 9J6G3o6V180/yuXPtsd/UL34AHoKJP5RxtX1Y40oKmPEybeHg4S/scmmLRF1jo5/nEWt a/6g== 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=7zvfu2AU8jmrgTOs2oC3Qnm1T8TZc9G/7u0+CpqNJic=; b=tAzri1PgliLbBIvzCQa1D3XtUPDsr1uvRPtp5FOLjwJ7mwZy1RSZUVs7vAjSCBvYBM Uj+dQfPwXFTD7IfdEwDdvC3cftYw+bNMpBIZZcXWkCzayDUM29xlYrNavEiBogHCFEP4 Hy9bYifQE5/UtlHMqK6dnUwOcAVRcjt7j2W3emJ0zlqHmc76PVkGBRIV/tKpC4JROhMd 0k5rzDQc7hXSZRTJZDM4WGgEhCVy3ggKfPJf0ijrq1hIVggKGVITrK/wdUCI41LetLnN miNyI8OBhf4g2ajMggWD+YGQTyCpXZUQcELr3RnT0mFMlkL5so3Ok8zXb2Z1aKA4bbtZ tExA== X-Gm-Message-State: AOAM532sMskYBggo4wagVSKxAOkpODlmWnGexCXYgS8dNCyYr4H1rBuK bni0CDeq5pv1y+4A1w/Gnqqfexs7hyY8WdG+9wk= X-Google-Smtp-Source: ABdhPJz/DIVMIkPEv7uy0eedLYpiXBF8o6H8At4cA1bioe3CPb/x1UM866kNex+vjHXjOyP90FFi9w== X-Received: by 2002:a62:2c8:0:b029:13e:9ee9:5b25 with SMTP id 191-20020a6202c80000b029013e9ee95b25mr7906821pfc.1.1599950724110; Sat, 12 Sep 2020 15:45:24 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.45.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:45:23 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 08/27] tests: Fixes test-replication.c on msys2/mingw. Date: Sun, 13 Sep 2020 06:44:12 +0800 Message-Id: <20200912224431.1428-9-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::441; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , 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 Reviewed-by: Daniel P. Berrangé --- 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 Sat Sep 12 22:44:13 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: 273905 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 78F3FC43461 for ; Sat, 12 Sep 2020 22:48:31 +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 1625E214F1 for ; Sat, 12 Sep 2020 22:48:31 +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="IhtVF26J" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1625E214F1 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]:39224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHEJq-0008DH-8K for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:48:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEGz-0003TA-AN; Sat, 12 Sep 2020 18:45:38 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:45790) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEGx-0004NC-AA; Sat, 12 Sep 2020 18:45:32 -0400 Received: by mail-pl1-x642.google.com with SMTP id bh1so2654589plb.12; Sat, 12 Sep 2020 15:45:29 -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=18mOftWXQC3Rn89AKTi/Z7fcDnMtQzhw+fXUDjoqjy0=; b=IhtVF26JU/+ntR2yhL9XU2h3Lqll1gxgh94s0149a8hRbB6rLroxWc7QeGa6/aZN8p z0LQC+MXzBeUXQJ1z2tFfn9oQiW5zJHbnqVxF+p3LCPk3QwXcvYhlhA++oubyQltLz+d gKO+QLV03Yt+Iascu4VJDAk5mTgkCpR94PxcBNULLmeabQVyd0XUZc8FYfFkli4Sw6Uh 81VyfsHaCyYXlOysY+ttJxSMP+SwoCxjBvjcQnxjC6xNomvwPTyNpeIll9TDb9NHIPW0 dRbnhNxsFj73LhCF0EiN6/cDZ5r9R1kc3h9rGILL2B3eh/8DVT+LHZQp99XLx27yrHiN ru4A== 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=18mOftWXQC3Rn89AKTi/Z7fcDnMtQzhw+fXUDjoqjy0=; b=RTod0ncfE3TsU5NmZyJcfxU9SzWjPRgScDxNmOJqHKmZ1ovfMHsEDE1E9CAYfUefNk ThWbI43ZRTUUigCoXzZoPm1TB3z05Xcm8JLit+rRZrakzIGsEmWFFagkUmUQPOXqxijS 7/TNNw9LfroXDRhhXPozgzcrCPj7J8fhGZr08bFHrh962MZqyuhTnCympa4L0aPPzDHl FJ+KNsZmEIC8SBnkJgwvLhwSzI0TBya1Q/q1GDRAodhgoI76T5bU1F9qFzl/fl15MHpx hM9A06mkHjoax4eEtwOlXa5ce2jC04ZGvzWZ8790i66Csqf+gVJBDjnt8gNMgzrfB5bn YkYQ== X-Gm-Message-State: AOAM5333NsTv2vQJCNGALWevU8TiRkw6QR3kLbp0aCWczPt1anlRRcfx Kjszk13hrJGurc5+wwuwSXIEsE0V9T+8ktUFniU= X-Google-Smtp-Source: ABdhPJxPGaZ0Hujfj+vr7jHo33gpnbVCQsXQx3sjQgzKnbXjoofaYzmu0HCpnhB+KKuCVZKOKPprcA== X-Received: by 2002:a17:90b:816:: with SMTP id bk22mr7929358pjb.66.1599950728580; Sat, 12 Sep 2020 15:45:28 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.45.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:45:27 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 09/27] tests: test-replication disable /replication/secondary/* on msys2/mingw. Date: Sun, 13 Sep 2020 06:44:13 +0800 Message-Id: <20200912224431.1428-10-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::642; envelope-from=luoyonggang@gmail.com; helo=mail-pl1-x642.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 , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" They caused failure on msys2/mingw, that's because file-win32.c not implement .bdrv_reopen_prepare/commit/abort yet. This is the error message: > $ ./tests/test-replication.exe > # random seed: R02S3f4d1c01af2b0a046990e0235c481faf > 1..13 > # Start of replication tests > # Start of primary tests > ok 1 /replication/primary/read > ok 2 /replication/primary/write > ok 3 /replication/primary/start > ok 4 /replication/primary/stop > ok 5 /replication/primary/do_checkpoint > ok 6 /replication/primary/get_error_all > # End of primary tests > # Start of secondary tests > ok 7 /replication/secondary/read > ok 8 /replication/secondary/write > Unexpected error in bdrv_reopen_prepare() at ../block.c:4191: > Block format 'file' used by node '#block4287' does not support reopening > files Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrangé --- 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 Sat Sep 12 22:44:14 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: 273902 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 24572C43461 for ; Sat, 12 Sep 2020 22:50:44 +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 BA554206DB for ; Sat, 12 Sep 2020 22:50:43 +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="aTlOgImX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA554206DB 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]:52114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHELy-0004w7-Pw for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:50:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEH6-0003Ux-8f; Sat, 12 Sep 2020 18:45:42 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]:44095) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEH4-0004NV-5M; Sat, 12 Sep 2020 18:45:39 -0400 Received: by mail-pl1-x630.google.com with SMTP id j7so2652392plk.11; Sat, 12 Sep 2020 15:45: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=C/1izafIbfTFDVThqlQpYnHLHf4305LjfMqLD1ztqLA=; b=aTlOgImXy5q4AsmzsiDVujmUVcw1Z2/wlb8Ezi6z/T7C1R1SOMahRIQohPCsV+z58Y 1NjK3PKQnmNoPASC36pgBq35PnykaobajMxL7TmiYyMJu33tN+e2m49ZdzT9OEwR/qrF abybUnujFikdbJXZh3vXjRC9MTgPm7HIqkQQq+ufcNqFpBXVzFAJm1ZPVzhgYeahXHBt fnEY5oxvDurKFep7cuHS7IdCtPe758gDIWhj7/TaWA/Xizt0qMlF/UzbLYIxGh3/rQ60 fj9HEuqg/UMiwEZIqjVmJYlQCeVwyDVOFXVWaLaIkD3WGAKEnMc08EK9iOOQfJhzYs2S +Xig== 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=C/1izafIbfTFDVThqlQpYnHLHf4305LjfMqLD1ztqLA=; b=dd8/Z21CVoB0fJH4jSxJzkr+FtINiLxzIS0cWm1yLvazF+8FkssRdwTRrUtXgVEs/B rIksFlIIf0RiOjf0WCxA4FLE8Ikcd1LqON0wZ0Co4srj2+tsxQR89pypWMEaYXZkjU9t eTawVpaRMebrv8NVn//PKs9ZvVyqj81n+e2BjwHt+QwSUiDfWWq3C7OEQU2Fl/PkUZRt Q5jS1E8VFIb0NusS749FvFtACe5pGQh3O9LrGx23XXXZZ4SklQ8zzRUAOuglcjjrh2ml GtKukytR/Hji7eMLWuDnBoWQE8ptrsL8zRjgiqY6Gml0/Qu32OOaf2Hy1jV5lNXUMOkl uqwg== X-Gm-Message-State: AOAM532MDMqXrZ4CrwfNfSwxjcGo+q5QS5TufI4b0Wt1rmfkZFEwOKEj hlxlmdahOyANGyp1rpA1zP0G5ho4T7I1NF2DyPM= X-Google-Smtp-Source: ABdhPJwOk2mfVoBr+XR9pHHBZlYRSYjl81MHBzmSbLcgbN+dbhqp3XDuG8Isa3CJ9wQ9RatBYLHG4Q== X-Received: by 2002:a17:90a:6701:: with SMTP id n1mr8092459pjj.87.1599950732893; Sat, 12 Sep 2020 15:45:32 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.45.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:45:32 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 10/27] osdep: file locking functions are not available on Win32 Date: Sun, 13 Sep 2020 06:44:14 +0800 Message-Id: <20200912224431.1428-11-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=luoyonggang@gmail.com; helo=mail-pl1-x630.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 , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , 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 Sat Sep 12 22:44:15 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: 305574 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 3B061C43461 for ; Sat, 12 Sep 2020 22:52:01 +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 8E893214F1 for ; Sat, 12 Sep 2020 22:52:00 +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="sNbeUqqt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8E893214F1 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]:56682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHEND-0006rC-LH for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:51:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEH7-0003V5-TG; Sat, 12 Sep 2020 18:45:42 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:35594) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEH6-0004Ng-9y; Sat, 12 Sep 2020 18:45:41 -0400 Received: by mail-pl1-x635.google.com with SMTP id t6so1337809plz.2; Sat, 12 Sep 2020 15:45: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=ehfAiCRVE/Ke9S0rgpD+Y+SHCRLAE8fhmhSay0lCAzA=; b=sNbeUqqtmBVUSJ/zyi+cWCfaqMcJGG7wQpA6pEB6MEQPo3v+vr0BPGOqRl38foAEB+ UnXgiCtJBv63C1clX5tHTuoTtYYpbCw4rRSbYMaWKBah1C8HvhfMC1MYI7GmGBlb9NK/ CrYE+KcdDKyVysa/3IWUIUHqmQmgpu4j+MDibFihnwgQVcyaRmyeQHweTQG7AE8aTGa9 17IdR2xvPNApcCJOND3pMNVMltYDe3h1QmJ2/UwrM9BxNUqRoGles6tP8VNMWHvOOZkI RGqKw3XtO6p2P8FyGteAA8gTXJCItZkHtAH1LIe3I3BpSIU82ZilPymvwq86K8zsa7iw 2+tQ== 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=ehfAiCRVE/Ke9S0rgpD+Y+SHCRLAE8fhmhSay0lCAzA=; b=P1+kiSdHTYidB916lJm5XZjo2FlTnw8nwNtGpl8MxUE3lCtvsD/eHnfD+jwCRrhX+I 6Laz1yRygmP/IleU6vfD+PPo0A8qJxoEOR586gpYA6A6Shh9q9pOepd7GNIghnJUoZM/ k9TLS9UjUhzxG5J0Sjex1eudNHFgWx+nxMN7aCsEppTAhHRUnoheoJlOPJEQBB4Ub6wA 6lnuJYKlal0B39ZbY54PqofSizzrUzx2T7Ot/VcNSMqWPw9dnlIpJElRoQ6Gg2lSf6w0 e169pFcbjvGKjTPW2/w17/r4lKDNx3SA9x42IdEiLp4JSQpwrKPwxkx0YXMEs/Tk4LiL Kyng== X-Gm-Message-State: AOAM530XCK81l9d3ElPzNzvyo8nGuoy1+2UqBdbbpMvlcDxxuFHuArGP 4BjkwoiIDKaft5YQtSgg/nJJo8Ve6jIdW4swsq0= X-Google-Smtp-Source: ABdhPJzT+ktlbu9CJiuObw0fNXTcfGadBsVNT/Vobp5rTDlROvhOkyJac40RG9ji2r4JTtDJbAn4gw== X-Received: by 2002:a17:90b:198c:: with SMTP id mv12mr2349182pjb.236.1599950737413; Sat, 12 Sep 2020 15:45:37 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.45.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:45:36 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 11/27] meson: Use -b to ignore CR vs. CR-LF issues on Windows Date: Sun, 13 Sep 2020 06:44:15 +0800 Message-Id: <20200912224431.1428-12-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=luoyonggang@gmail.com; helo=mail-pl1-x635.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 , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , 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 Reviewed-by: Daniel P. Berrangé --- 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 Sat Sep 12 22:44: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: 305573 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 73E6AC43461 for ; Sat, 12 Sep 2020 22:52:52 +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 BD304214F1 for ; Sat, 12 Sep 2020 22:52:51 +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="EBqHA5R5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BD304214F1 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]:60068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHEO2-0008Fl-RH for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:52:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47426) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEHB-0003Xa-GJ; Sat, 12 Sep 2020 18:45:49 -0400 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]:53424) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEH9-0004QQ-RW; Sat, 12 Sep 2020 18:45:45 -0400 Received: by mail-pj1-x1041.google.com with SMTP id t7so3480996pjd.3; Sat, 12 Sep 2020 15:45: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=xhCi83owLgwjlb0w3wUGwCtyacoQCjPoxSEDHHZwCrw=; b=EBqHA5R5ay+aheJQNSM/6lH+8Pix/Uwbtt8U2ryvluJQOVw0gjA/bfGnrBWPFKnETH aw6ftyC2w2CAtb8hwpp5T8KFhd29g801pH8H5WaRFtN9I7vVwO2Nb7I3lC9Uu5mP8m7U gh7I5hPD7q62NwmcYx3FStrAdEoLquT8qEhRpbIqUlmQ3BzimmE9rSi8G4yjIYQa0Qv/ z7pOdZsWYAdbGcjgvu3dzPt6dwZsj0+uBANjG5Y2WLm4Yh9hFc3JGuf3odD4rLvIuYDV i716S2MktwRLhXZx8lOknGlbzuUYifAJI5XffuzSlLWHufw/H77WRqrblo+nBHCH3phS N83Q== 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=xhCi83owLgwjlb0w3wUGwCtyacoQCjPoxSEDHHZwCrw=; b=lHaZ137K0oPhnZtxfyYdttxV01oGdCJWzzxsJcIJ79qu64/AgHgcc+be1Abz4mlIey kCmrKLO7nk90y6I9DiTDL1KTdj8HAQ4O20DsasUrOHc1udSP7rkQr8NJd1RPjg/oNR8h /s0xJyRTVO67Urn15qLwp9ClxVkfahw1ylrB7mjGOlGbxxoxNaSEsIuhlEgfw+xcMYuG lvqPgep13HM2n3mCQGZVhUdIisSLEViW0paa0k1SrhgygSt1ivOAzwgm3SJKonakECPC thxJaDCHHoV3d3JOr4v5XSIgOlHEPU4YjqX+UQ7XEiwWCAox7/c0Q6rRT4XU3atqx6e9 Q6hw== X-Gm-Message-State: AOAM533x3e3ZBLNEb82nDBx/qPSZ6WfEuG9X31W3s9jRp5+xfcYMz8dM l5WR/mQcdPAgQ30YqyXkgXzb4MMCFqlDCQM5t3c= X-Google-Smtp-Source: ABdhPJzzqgErpGG2QGq2ufXlG/WtKeFrGazfKRDaI7HoPzfGif4kGa8xG8f56NjrS//SvzhAzhJyoA== X-Received: by 2002:a17:90a:6343:: with SMTP id v3mr7638841pjs.163.1599950741619; Sat, 12 Sep 2020 15:45:41 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.45.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:45:40 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 12/27] gcrypt: test_tls_psk_init should write binary file instead text file. Date: Sun, 13 Sep 2020 06:44:16 +0800 Message-Id: <20200912224431.1428-13-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1041; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1041.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On windows, if open file with "w", it's will automatically convert "\n" to "\r\n" when writing to file. Convert unlink to use g_remove. Signed-off-by: Yonggang Luo --- tests/crypto-tls-psk-helpers.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/crypto-tls-psk-helpers.c b/tests/crypto-tls-psk-helpers.c index a8395477c3..58888d5537 100644 --- a/tests/crypto-tls-psk-helpers.c +++ b/tests/crypto-tls-psk-helpers.c @@ -26,13 +26,15 @@ #include "crypto-tls-psk-helpers.h" #include "qemu/sockets.h" +#include + #ifdef QCRYPTO_HAVE_TLS_TEST_SUPPORT void test_tls_psk_init(const char *pskfile) { FILE *fp; - fp = fopen(pskfile, "w"); + fp = fopen(pskfile, "wb"); if (fp == NULL) { g_critical("Failed to create pskfile %s", pskfile); abort(); @@ -44,7 +46,7 @@ void test_tls_psk_init(const char *pskfile) void test_tls_psk_cleanup(const char *pskfile) { - unlink(pskfile); + g_remove(pskfile); } #endif /* QCRYPTO_HAVE_TLS_TEST_SUPPORT */ From patchwork Sat Sep 12 22:44:17 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: 273899 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 D2B0CC43461 for ; Sat, 12 Sep 2020 22:54: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 606AD214F1 for ; Sat, 12 Sep 2020 22:54: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="dZGTVWLs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 606AD214F1 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]:38208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHEPQ-0002V0-GL for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:54:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEHI-0003aj-To; Sat, 12 Sep 2020 18:45:53 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:37747) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEHF-0004Sc-U1; Sat, 12 Sep 2020 18:45:52 -0400 Received: by mail-pg1-x541.google.com with SMTP id z17so1005985pgc.4; Sat, 12 Sep 2020 15:45:47 -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=jN/FbRrOzKPxrZWP0GTvRNcOCaMjteo1NEBJt6Bz3hk=; b=dZGTVWLsaeGpxtT5SrU95VqvO2ugIBKLv+ffRQxVY/zdJlQMzEIeYkWluFFpCIAG5X xRTO6jNnCSvf4ddvjrshoYx6MmHhW3oRDKaFNMY0RQGfrOz0N9nZlRrj6fF59Ivh5ZqP IQGhEjePsLoLPmq+zLsRkLjf7D+HY2YeMFWEWVbrvTOqD/FxidPO83dkuv/lTLjmabUT XZ+JWJTD86M1bIK5OTn3YdPW5oup68nrBByP+s9BialL3/NyDcU3WoR6BbUp5gZnI6tt Li2r5sAjwNf5hFjrJtgo6/hdQJPECKQhpA5597RgfZoT9ziFFJs/4VPpBtIk+B7AEvC+ Df6g== 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=jN/FbRrOzKPxrZWP0GTvRNcOCaMjteo1NEBJt6Bz3hk=; b=WdrdlKrkziJxZb1Gg6S6h/trsXpZ49LAM4bjXILQOIkaEmyk5tLK5oYIHRmVAeYfnl sFB/+bWQlq7Zw3oDS+6Z61gskjwb8n0d1zcreaZRk5BMCCwElvZi/G+09sFOGb9jujBP 7ovEVo040LxO3Q5Rlc9M8RKPulc645H2qt62T+O6qAQ1R+MhmeNsdWOXlrthQLZ9i2Xi FEWr5Uc3CiKOqragTCwRSMJ+eoyryedHk0HozzYbpvjzMIk54PHtJiMPZ5GnhFSn068z pBrH6ecU61HQPqh9pfsnmwiZw+vL2lBiehnNpRC80k7ZEL2Ja+RLCpgKecVlKaZL1DkA oJow== X-Gm-Message-State: AOAM5311RQVA5vswImWlw2zFeHKIY7bjLKUQmWcBpwDePvzKsCCpwrCZ xSuhfQOT9OHyfGc1Hk0q+79l7RS2H+BMMiBNNgc= X-Google-Smtp-Source: ABdhPJw7J9FkHhSyuytXWzw819vIPx3f66i5KRTOVvYs4cnAB4jpSgRtui3qZKo6Ln4OEPV5KPbpCw== X-Received: by 2002:a05:6a00:1356:b029:13e:d13d:a084 with SMTP id k22-20020a056a001356b029013ed13da084mr7851017pfu.27.1599950745901; Sat, 12 Sep 2020 15:45:45 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.45.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:45:45 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 13/27] tests: Enable crypto tests under msys2/mingw Date: Sun, 13 Sep 2020 06:44:17 +0800 Message-Id: <20200912224431.1428-14-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-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 , Paolo Bonzini , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Fixes 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 in the header Add qemu_socket_pair for cross platform support, convert file system handling functions to glib Add qemu_link function instead posix only link function. Use send ad recv from qemu that convert Windows Socks error to errno properly. Signed-off-by: Yonggang Luo --- tests/crypto-tls-x509-helpers.c | 169 ++++++++++++++++++++++++++++++- tests/crypto-tls-x509-helpers.h | 9 +- tests/test-crypto-tlscredsx509.c | 47 +++++---- tests/test-crypto-tlssession.c | 68 +++++++------ tests/test-io-channel-tls.c | 51 ++++++---- 5 files changed, 266 insertions(+), 78 deletions(-) diff --git a/tests/crypto-tls-x509-helpers.c b/tests/crypto-tls-x509-helpers.c index 01b3daf358..c624d8799b 100644 --- a/tests/crypto-tls-x509-helpers.c +++ b/tests/crypto-tls-x509-helpers.c @@ -23,6 +23,8 @@ #include "crypto-tls-x509-helpers.h" #include "crypto/init.h" #include "qemu/sockets.h" +#include +#include #ifdef QCRYPTO_HAVE_TLS_TEST_SUPPORT @@ -133,7 +135,7 @@ void test_tls_init(const char *keyfile) void test_tls_cleanup(const char *keyfile) { asn1_delete_structure(&pkix_asn1); - unlink(keyfile); + g_remove(keyfile); } /* @@ -501,8 +503,171 @@ void test_tls_discard_cert(QCryptoTLSTestCertReq *req) req->crt = NULL; if (getenv("QEMU_TEST_DEBUG_CERTS") == NULL) { - unlink(req->filename); + g_remove(req->filename); } } +int qemu_link(const char *exist_path1, const char *new_path2) +{ +#ifdef _WIN32 + g_autofree gchar *current_dir = g_get_current_dir(); + g_autofree gchar *full_path = g_build_filename(current_dir, exist_path1, NULL); + return CreateSymbolicLinkA(new_path2, full_path, 0 | SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE) ? 0 : -1; +#else + return link(exist_path1, new_path2); +#endif +} + +#ifdef _WIN32 + +static int __stream_socketpair(struct addrinfo* addr_info, int sock[2]){ + SOCKET listener, client, server; + int opt = 1; + + listener = server = client = INVALID_SOCKET; + listener = socket(addr_info->ai_family, addr_info->ai_socktype, addr_info->ai_protocol); + if (INVALID_SOCKET == listener) + goto fail; + + setsockopt(listener, SOL_SOCKET, SO_REUSEADDR,(const char*)&opt, sizeof(opt)); + + if(SOCKET_ERROR == bind(listener, addr_info->ai_addr, addr_info->ai_addrlen)) + goto fail; + + if (SOCKET_ERROR == getsockname(listener, addr_info->ai_addr, (int*)&addr_info->ai_addrlen)) + goto fail; + + if(SOCKET_ERROR == listen(listener, 5)) + goto fail; + + client = socket(addr_info->ai_family, addr_info->ai_socktype, addr_info->ai_protocol); + + if (INVALID_SOCKET == client) + goto fail; + + if (SOCKET_ERROR == connect(client,addr_info->ai_addr,addr_info->ai_addrlen)) + goto fail; + + server = accept(listener, 0, 0); + + if (INVALID_SOCKET == server) + goto fail; + + closesocket(listener); + + sock[0] = client; + sock[1] = server; + + return 0; +fail: + if(INVALID_SOCKET!=listener) + closesocket(listener); + if (INVALID_SOCKET!=client) + closesocket(client); + return -1; +} + +static int __dgram_socketpair(struct addrinfo* addr_info, int sock[2]) +{ + SOCKET client, server; + struct addrinfo addr, *result = NULL; + const char* address; + int opt = 1; + + server = client = INVALID_SOCKET; + + server = socket(addr_info->ai_family, addr_info->ai_socktype, addr_info->ai_protocol); + if (INVALID_SOCKET == server) + goto fail; + + setsockopt(server, SOL_SOCKET,SO_REUSEADDR, (const char*)&opt, sizeof(opt)); + + if(SOCKET_ERROR == bind(server, addr_info->ai_addr, addr_info->ai_addrlen)) + goto fail; + + if (SOCKET_ERROR == getsockname(server, addr_info->ai_addr, (int*)&addr_info->ai_addrlen)) + goto fail; + + client = socket(addr_info->ai_family, addr_info->ai_socktype, addr_info->ai_protocol); + if (INVALID_SOCKET == client) + goto fail; + + memset(&addr,0,sizeof(addr)); + addr.ai_family = addr_info->ai_family; + addr.ai_socktype = addr_info->ai_socktype; + addr.ai_protocol = addr_info->ai_protocol; + + if (AF_INET6==addr.ai_family) + address = "0:0:0:0:0:0:0:1"; + else + address = "127.0.0.1"; + + if (getaddrinfo(address, "0", &addr, &result)) + goto fail; + + setsockopt(client,SOL_SOCKET,SO_REUSEADDR,(const char*)&opt, sizeof(opt)); + if(SOCKET_ERROR == bind(client, result->ai_addr, result->ai_addrlen)) + goto fail; + + if (SOCKET_ERROR == getsockname(client, result->ai_addr, (int*)&result->ai_addrlen)) + goto fail; + + if (SOCKET_ERROR == connect(server, result->ai_addr, result->ai_addrlen)) + goto fail; + + if (SOCKET_ERROR == connect(client, addr_info->ai_addr, addr_info->ai_addrlen)) + goto fail; + + freeaddrinfo(result); + sock[0] = client; + sock[1] = server; + return 0; + +fail: + if (INVALID_SOCKET!=client) + closesocket(client); + if (INVALID_SOCKET!=server) + closesocket(server); + if (result) + freeaddrinfo(result); + return -1; +} + +int qemu_socketpair(int family, int type, int protocol,int recv[2]){ + const char* address; + struct addrinfo addr_info,*p_addrinfo; + int result = -1; + + if (family == AF_UNIX) + { + family = AF_INET; + } + + memset(&addr_info, 0, sizeof(addr_info)); + addr_info.ai_family = family; + addr_info.ai_socktype = type; + addr_info.ai_protocol = protocol; + if (AF_INET6==family) + address = "0:0:0:0:0:0:0:1"; + else + address = "127.0.0.1"; + + if (0 == getaddrinfo(address, "0", &addr_info, &p_addrinfo)){ + if (SOCK_STREAM == type) + result = __stream_socketpair(p_addrinfo, recv); + else if(SOCK_DGRAM == type) + result = __dgram_socketpair(p_addrinfo, recv); + freeaddrinfo(p_addrinfo); + } + return result; +} + +#else + +int qemu_socketpair(int family, int type, int protocol,int recv[2]) { + return socketpair(family, type, protocol, recv); +} + +#endif + #endif /* QCRYPTO_HAVE_TLS_TEST_SUPPORT */ diff --git a/tests/crypto-tls-x509-helpers.h b/tests/crypto-tls-x509-helpers.h index 08efba4e19..75a902278c 100644 --- a/tests/crypto-tls-x509-helpers.h +++ b/tests/crypto-tls-x509-helpers.h @@ -24,8 +24,9 @@ #include #include -#if !(defined WIN32) && \ - defined(CONFIG_TASN1) +#include "qemu/osdep.h" + +#if defined(CONFIG_TASN1) # define QCRYPTO_HAVE_TLS_TEST_SUPPORT #endif @@ -127,6 +128,10 @@ void test_tls_cleanup(const char *keyfile); extern const ASN1_ARRAY_TYPE pkix_asn1_tab[]; +int qemu_link(const char *exist_path1, const char *new_path2); + +int qemu_socketpair(int family, int type, int protocol,int recv[2]); + #endif /* QCRYPTO_HAVE_TLS_TEST_SUPPORT */ #endif diff --git a/tests/test-crypto-tlscredsx509.c b/tests/test-crypto-tlscredsx509.c index f487349c32..620fbde1ca 100644 --- a/tests/test-crypto-tlscredsx509.c +++ b/tests/test-crypto-tlscredsx509.c @@ -25,6 +25,9 @@ #include "qapi/error.h" #include "qemu/module.h" +#include +#include + #ifdef QCRYPTO_HAVE_TLS_TEST_SUPPORT #define WORKDIR "tests/test-crypto-tlscredsx509-work/" @@ -77,34 +80,34 @@ static void test_tls_creds(const void *opaque) QCryptoTLSCreds *creds; #define CERT_DIR "tests/test-crypto-tlscredsx509-certs/" - mkdir(CERT_DIR, 0700); + g_mkdir_with_parents(CERT_DIR, 0700); - unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); + g_remove (CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); if (data->isServer) { - unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT); - unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY); + g_remove (CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT); + g_remove (CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY); } else { - unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT); - unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY); + g_remove (CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT); + g_remove (CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY); } - if (access(data->cacrt, R_OK) == 0) { - g_assert(link(data->cacrt, + if (g_access(data->cacrt, R_OK) == 0) { + g_assert(qemu_link(data->cacrt, CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT) == 0); } if (data->isServer) { - if (access(data->crt, R_OK) == 0) { - g_assert(link(data->crt, + if (g_access(data->crt, R_OK) == 0) { + g_assert(qemu_link(data->crt, CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT) == 0); } - g_assert(link(KEYFILE, + g_assert(qemu_link(KEYFILE, CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY) == 0); } else { - if (access(data->crt, R_OK) == 0) { - g_assert(link(data->crt, + if (g_access(data->crt, R_OK) == 0) { + g_assert(qemu_link(data->crt, CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT) == 0); } - g_assert(link(KEYFILE, + g_assert(qemu_link(KEYFILE, CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY) == 0); } @@ -121,15 +124,15 @@ static void test_tls_creds(const void *opaque) g_assert(creds != NULL); } - unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); + g_remove(CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); if (data->isServer) { - unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT); - unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY); + g_remove(CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT); + g_remove(CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY); } else { - unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT); - unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY); + g_remove(CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT); + g_remove(CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY); } - rmdir(CERT_DIR); + g_rmdir(CERT_DIR); if (creds) { object_unparent(OBJECT(creds)); } @@ -143,7 +146,7 @@ int main(int argc, char **argv) g_test_init(&argc, &argv, NULL); g_setenv("GNUTLS_FORCE_FIPS_MODE", "2", 1); - mkdir(WORKDIR, 0700); + g_mkdir_with_parents(WORKDIR, 0700); test_tls_init(KEYFILE); @@ -699,7 +702,7 @@ int main(int argc, char **argv) test_tls_discard_cert(&cacertlevel2areq); test_tls_discard_cert(&servercertlevel3areq); test_tls_discard_cert(&clientcertlevel2breq); - unlink(WORKDIR "cacertchain-ctx.pem"); + g_remove(WORKDIR "cacertchain-ctx.pem"); test_tls_cleanup(KEYFILE); rmdir(WORKDIR); diff --git a/tests/test-crypto-tlssession.c b/tests/test-crypto-tlssession.c index 8b2453fa79..f726219593 100644 --- a/tests/test-crypto-tlssession.c +++ b/tests/test-crypto-tlssession.c @@ -28,9 +28,13 @@ #include "qom/object_interfaces.h" #include "qapi/error.h" #include "qemu/module.h" +#include "qemu/main-loop.h" #include "qemu/sockets.h" #include "authz/list.h" +#include +#include + #ifdef QCRYPTO_HAVE_TLS_TEST_SUPPORT #define WORKDIR "tests/test-crypto-tlssession-work/" @@ -40,15 +44,16 @@ static ssize_t testWrite(const char *buf, size_t len, void *opaque) { int *fd = opaque; - - return write(*fd, buf, len); + int written = send(*fd, buf, len, 0); + return written; } static ssize_t testRead(char *buf, size_t len, void *opaque) { int *fd = opaque; - return read(*fd, buf, len); + int readed = recv(*fd, buf, len, 0); + return readed; } static QCryptoTLSCreds *test_tls_creds_psk_create( @@ -84,7 +89,7 @@ static void test_crypto_tls_session_psk(void) int ret; /* We'll use this for our fake client-server connection */ - ret = socketpair(AF_UNIX, SOCK_STREAM, 0, channel); + ret = qemu_socketpair(AF_UNIX, SOCK_STREAM, 0, channel); g_assert(ret == 0); /* @@ -238,7 +243,7 @@ static void test_crypto_tls_session_x509(const void *opaque) int ret; /* We'll use this for our fake client-server connection */ - ret = socketpair(AF_UNIX, SOCK_STREAM, 0, channel); + ret = qemu_socketpair(AF_UNIX, SOCK_STREAM, 0, channel); g_assert(ret == 0); /* @@ -251,29 +256,29 @@ static void test_crypto_tls_session_x509(const void *opaque) #define CLIENT_CERT_DIR "tests/test-crypto-tlssession-client/" #define SERVER_CERT_DIR "tests/test-crypto-tlssession-server/" - mkdir(CLIENT_CERT_DIR, 0700); - mkdir(SERVER_CERT_DIR, 0700); + g_mkdir_with_parents(CLIENT_CERT_DIR, 0700); + g_mkdir_with_parents(SERVER_CERT_DIR, 0700); - unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); - unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT); - unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY); + g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); + g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT); + g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY); - unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); - unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT); - unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY); + g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); + g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT); + g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY); - g_assert(link(data->servercacrt, + g_assert(qemu_link(data->servercacrt, SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT) == 0); - g_assert(link(data->servercrt, + g_assert(qemu_link(data->servercrt, SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT) == 0); - g_assert(link(KEYFILE, + g_assert(qemu_link(KEYFILE, SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY) == 0); - g_assert(link(data->clientcacrt, + g_assert(qemu_link(data->clientcacrt, CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT) == 0); - g_assert(link(data->clientcrt, + g_assert(qemu_link(data->clientcrt, CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT) == 0); - g_assert(link(KEYFILE, + g_assert(qemu_link(KEYFILE, CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY) == 0); clientCreds = test_tls_creds_x509_create( @@ -369,16 +374,16 @@ static void test_crypto_tls_session_x509(const void *opaque) g_assert(!data->expectClientFail); } - unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); - unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT); - unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY); + g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); + g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT); + g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY); - unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); - unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT); - unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY); + g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); + g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT); + g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY); - rmdir(CLIENT_CERT_DIR); - rmdir(SERVER_CERT_DIR); + g_rmdir(CLIENT_CERT_DIR); + g_rmdir(SERVER_CERT_DIR); object_unparent(OBJECT(serverCreds)); object_unparent(OBJECT(clientCreds)); @@ -397,10 +402,13 @@ int main(int argc, char **argv) int ret; module_call_init(MODULE_INIT_QOM); + qemu_init_main_loop(&error_abort); + socket_init(); + g_test_init(&argc, &argv, NULL); g_setenv("GNUTLS_FORCE_FIPS_MODE", "2", 1); - mkdir(WORKDIR, 0700); + g_mkdir_with_parents(WORKDIR, 0700); test_tls_init(KEYFILE); test_tls_psk_init(PSKFILE); @@ -640,11 +648,11 @@ int main(int argc, char **argv) test_tls_discard_cert(&cacertlevel2areq); test_tls_discard_cert(&servercertlevel3areq); test_tls_discard_cert(&clientcertlevel2breq); - unlink(WORKDIR "cacertchain-sess.pem"); + g_remove(WORKDIR "cacertchain-sess.pem"); test_tls_psk_cleanup(PSKFILE); test_tls_cleanup(KEYFILE); - rmdir(WORKDIR); + g_rmdir(WORKDIR); return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/tests/test-io-channel-tls.c b/tests/test-io-channel-tls.c index ad7554c534..e858716192 100644 --- a/tests/test-io-channel-tls.c +++ b/tests/test-io-channel-tls.c @@ -31,9 +31,13 @@ #include "crypto/tlscredsx509.h" #include "qapi/error.h" #include "qemu/module.h" +#include "qemu/main-loop.h" #include "authz/list.h" #include "qom/object_interfaces.h" +#include +#include + #ifdef QCRYPTO_HAVE_TLS_TEST_SUPPORT #define WORKDIR "tests/test-io-channel-tls-work/" @@ -123,33 +127,33 @@ static void test_io_channel_tls(const void *opaque) GMainContext *mainloop; /* We'll use this for our fake client-server connection */ - g_assert(socketpair(AF_UNIX, SOCK_STREAM, 0, channel) == 0); + g_assert(qemu_socketpair(AF_UNIX, SOCK_STREAM, 0, channel) == 0); #define CLIENT_CERT_DIR "tests/test-io-channel-tls-client/" #define SERVER_CERT_DIR "tests/test-io-channel-tls-server/" - mkdir(CLIENT_CERT_DIR, 0700); - mkdir(SERVER_CERT_DIR, 0700); + g_mkdir(CLIENT_CERT_DIR, 0700); + g_mkdir(SERVER_CERT_DIR, 0700); - unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); - unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT); - unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY); + g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); + g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT); + g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY); - unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); - unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT); - unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY); + g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); + g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT); + g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY); - g_assert(link(data->servercacrt, + g_assert(qemu_link(data->servercacrt, SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT) == 0); - g_assert(link(data->servercrt, + g_assert(qemu_link(data->servercrt, SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT) == 0); - g_assert(link(KEYFILE, + g_assert(qemu_link(KEYFILE, SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY) == 0); - g_assert(link(data->clientcacrt, + g_assert(qemu_link(data->clientcacrt, CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT) == 0); - g_assert(link(data->clientcrt, + g_assert(qemu_link(data->clientcrt, CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT) == 0); - g_assert(link(KEYFILE, + g_assert(qemu_link(KEYFILE, CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY) == 0); clientCreds = test_tls_creds_create( @@ -238,13 +242,13 @@ static void test_io_channel_tls(const void *opaque) QIO_CHANNEL(serverChanTLS)); qio_channel_test_validate(test); - unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); - unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT); - unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY); + g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); + g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT); + g_remove(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_KEY); - unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); - unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT); - unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY); + g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); + g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT); + g_remove(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_KEY); rmdir(CLIENT_CERT_DIR); rmdir(SERVER_CERT_DIR); @@ -272,10 +276,13 @@ int main(int argc, char **argv) g_assert(qcrypto_init(NULL) == 0); module_call_init(MODULE_INIT_QOM); + qemu_init_main_loop(&error_abort); + socket_init(); + g_test_init(&argc, &argv, NULL); g_setenv("GNUTLS_FORCE_FIPS_MODE", "2", 1); - mkdir(WORKDIR, 0700); + g_mkdir(WORKDIR, 0700); test_tls_init(KEYFILE); From patchwork Sat Sep 12 22:44:18 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: 273900 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 CC9ABC433E2 for ; Sat, 12 Sep 2020 22:53:38 +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 5B07D214F1 for ; Sat, 12 Sep 2020 22:53:38 +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="C2uSbmc3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B07D214F1 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]:35158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHEOn-0001C1-Ar for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:53:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEHK-0003bx-MC; Sat, 12 Sep 2020 18:45:54 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:43586) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEHI-0004Tb-FB; Sat, 12 Sep 2020 18:45:54 -0400 Received: by mail-pf1-x431.google.com with SMTP id f18so9678220pfa.10; Sat, 12 Sep 2020 15:45: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=UOybM336wZrHDVa8vHMHL6WwtS3s2ZpunZ+4tQm7evs=; b=C2uSbmc3f3mUS+MbiJE0gervjcd8bDGHie2dPkzIacK3vJkGHcgL4SUN+xgOQ8D8PK 6nM8FlovZ5xOzoSfTSnX5T3/90O7GwFlPTSzeORD868GYdzX2jOk3Cwgx5gI+g4DaREv qG0yFT1jLw/JwhkIv172zF4OzdFmnYOQw9m2SBiF87LblA/Wz4zYcfppnF8+i7kMKfCt V98h+MwUpApT3aZsjtcqDVxa20qAikEu7hJVkUk0pEGPin09tNo3IET2BsWuljov2Yfz 2p2EZufSVXb61VHEsprwLaC/dRTRSseD5+wK63eA3/bLSR0dKgzTXPiznbnhWyntwLf9 3Gtg== 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=UOybM336wZrHDVa8vHMHL6WwtS3s2ZpunZ+4tQm7evs=; b=bUbZAZH33O1RAIbj4C0P4LmlHwASBgoHiNJmLKXA17F+5ExmHhxnT+B66YEoVWpUZC wB4wz3P77Rhg0dlatuVhOhKwVd3XzokCELLKXaZJaZTxlUBVDAbwHv2faeAGCJZZlm1+ AzfSo3ntzcupubncfyYqjwmfogIraeSF0/AMpg0g2qZKcPRCg0qpzTFS9Yc8FZRwlki0 7woleDTp12uwmfXN6OYchz3A1pDI/r018jn5Sd9G7gR4bi+CTwuOHOYJedDRlJ6kTOXL GeraXMcYrLWBkKXtVN/m+IOP8DnNzdJlNF8ihGpbOvTgwCJwQKDGzY6DtDQ8JSczSzd9 PgAw== X-Gm-Message-State: AOAM533zPUlrLU1QlP128UPzN9wCzimNCv8TbhRp1Jd022jhlMXhvWgY I9O5ZDXZRyc12lhBkkrO1xmKKTDvRk2aDDPfQec= X-Google-Smtp-Source: ABdhPJwVaFSwp8g3pMh+aXpnHkqHDAgOTqClBoang1bIP063jwcGbKWX7OHrzYi++G1Gfcg6PhQClA== X-Received: by 2002:a63:4a0a:: with SMTP id x10mr1265030pga.21.1599950750212; Sat, 12 Sep 2020 15:45:50 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.45.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:45:49 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 14/27] meson: remove empty else and duplicated gio deps Date: Sun, 13 Sep 2020 06:44:18 +0800 Message-Id: <20200912224431.1428-15-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x431.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 , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , 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 Reviewed-by: Daniel P. Berrangé --- meson.build | 6 ------ 1 file changed, 6 deletions(-) diff --git a/meson.build b/meson.build index bd84a1e777..a725b66a83 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 Sat Sep 12 22:44:19 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: 273901 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 05C6EC43461 for ; Sat, 12 Sep 2020 22:52:21 +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 60EC0214F1 for ; Sat, 12 Sep 2020 22:52:20 +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="SnSNChIM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 60EC0214F1 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]:58136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHENX-0007SK-Fh for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:52:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEHR-0003f2-At; Sat, 12 Sep 2020 18:46:01 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:36087) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEHN-0004Tr-2Z; Sat, 12 Sep 2020 18:46:00 -0400 Received: by mail-pf1-x442.google.com with SMTP id d9so9692250pfd.3; Sat, 12 Sep 2020 15:45: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=cB+r+dkpxaxYLpmfHgr9Ib2dc/r134/ZQOU509IQ9fY=; b=SnSNChIMzAJ3Qda83+EybTQLUSwUWZEuD9B48pqRrljugAFnqSmjp4lYWbdratmqB/ QbIXaTed3PA7KiqE/pXF0gdFDhwyY5pnKOicRIMCFfDTO4FIsL+1ErF+9dafxaN/pizH 1yxmiK0AodAum2HhLFHb9pFMB/hMGIol+uBFvWBLGq5Tsvjqu2XZ7BkFAf6fllwvysxy Th3ow8Nj/Xe3cTZpv9zTaoaL7oGPrPXHuPMPAYbLKqkY5ju30VFJXIUCTIIFwfs69dFQ KakKXamJRCB0+/uPmKyQ2EM14xBCo4pi02AF6L43xVUoxLD8xaBJNhqV1E5OPBHR0a94 uIug== 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=cB+r+dkpxaxYLpmfHgr9Ib2dc/r134/ZQOU509IQ9fY=; b=Zol0RjKXkzjjZ7GbVOTm8U7cYf0qc0yV2VfF4NGmiL/0kLziTEX+7QhmjAB4wr+g5l gtH5B7OYI3XHEpfSbn8GqvEf9CYFyt9xFrvSAVq8BlF3vrbHVgQIlFnEg+yVLbzZguf3 2Gawt4zZ6AP9SRMhO6vWkzTQ68PcrFBAsqybFOJEshVw+LxwI5Ei7maE7M6qm737WW4H c0ubL7wCnmrSgn0aeVqEAPzmtS1jgGhCR5uY48ruJARuwQ2ghpLejQB6XrYSy9sHL3lN G+IqTkvrSwEY8d9buv170A4hrgMZSFaLBGFmKz2tofeQoW02gykLJ1Za3urc1egIVYm0 3TQw== X-Gm-Message-State: AOAM530ti0JLwTi40N9xnmIzZk0FRoGiFYKbnbV4RWEU1KCwH8wYDUuD 79+CvquhPEQbLDEqi/hB+VhvomwlGlOEDAJeL6E= X-Google-Smtp-Source: ABdhPJzhj5Z9iC+u0TXbRKNL3cNw7YGn97y6b+VROnwxOVA2nukLe6/lET0/wjgEr0pDb0P7MDu89g== X-Received: by 2002:a63:ff06:: with SMTP id k6mr6042657pgi.321.1599950754886; Sat, 12 Sep 2020 15:45:54 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.45.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:45:54 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 15/27] vmstate: Fixes test-vmstate.c on msys2/mingw Date: Sun, 13 Sep 2020 06:44:19 +0800 Message-Id: <20200912224431.1428-16-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::442; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Thomas Huth , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Wen Congyang , Paolo Bonzini , 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 Reviewed-by: Daniel P. Berrangé --- tests/test-vmstate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c index 1c763015d0..ac38bfcfe8 100644 --- a/tests/test-vmstate.c +++ b/tests/test-vmstate.c @@ -34,7 +34,6 @@ #include "qemu/module.h" #include "io/channel-file.h" -static char temp_file[] = "/tmp/vmst.test.XXXXXX"; static int temp_fd; @@ -1484,6 +1483,8 @@ static void test_tmp_struct(void) int main(int argc, char **argv) { + g_autofree char *temp_file = g_strdup_printf( + "%s/vmst.test.XXXXXX", g_get_tmp_dir()); temp_fd = mkstemp(temp_file); module_call_init(MODULE_INIT_QOM); From patchwork Sat Sep 12 22:44:20 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: 305572 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 8C4DFC433E2 for ; Sat, 12 Sep 2020 22:53:50 +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 30621214F1 for ; Sat, 12 Sep 2020 22:53:50 +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="AQsFK5Z5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 30621214F1 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]:36232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHEOz-0001fl-8v for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:53:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEHT-0003lN-GL; Sat, 12 Sep 2020 18:46:03 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:44892) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEHR-0004U2-Ia; Sat, 12 Sep 2020 18:46:03 -0400 Received: by mail-pg1-x543.google.com with SMTP id 7so8751382pgm.11; Sat, 12 Sep 2020 15:46: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=xS967nwniiPoKExhe31AY1Igl1jhGzMmH4nTv98GjJU=; b=AQsFK5Z5IcEbCnEEKRl3zg9ZUJQC7bRmBLA3fC3doD2gIbvIJBQUW8/DQ7hPMnu7Mj /EXCck1L13VqfDzvwcL5DepxGuWs1aNNgefzl39YJDxM1N9uXCLHlJGhvij3RMMT2wpt atUFap83bqqP8WZjG/2v96QWr7Izwma2cFHrPx2epmdRDCklGMU+YLz+zV36ATBcT2Lv gO6/9nPl4KPI1lHR4ritH6RPuBTMoEBgrvWn0WP/STxrv7Rm44ka9UmzuqNaxEjxHAQY 4GVqQl/0Q9APNDQ8O1AyzFedK3bHK8j2NQ4MztOHXuZCwJo7qzoij606TffNeW1pR55f K1IQ== 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=xS967nwniiPoKExhe31AY1Igl1jhGzMmH4nTv98GjJU=; b=DgWGf+8EanoY6E3mhI5xHp66lzi1UWlcwKYIATyjS+YuR16+GRjijgTFc+3O4dWiVZ GWBrROkscpI6x1rBkcuafLmwuGowpVGteqpbWY/D33lAuBHqYNLEOtfGQiooqiKFBR5G WqP/abqJeTTsazgTw5lTjTldOX437NhnyaTs3iMMzWH2zthvhQZp6wUhm/i7P6Sgo63G YQYAOkjFfcd5ngfXUAnkXYLDaf7rMSoCghx9EHM54wCj4ehFRVYlrkmYjSUHsOzGuhFw UpWIQxyh9EEkr0hHt8EyBT68ZrRb7nOf01/jTfAp+os/BRb8eqqemU+LtrWMXG6hFCHg 9W4g== X-Gm-Message-State: AOAM532tSq1V99hCtRRNdJDTHFhGBU1nEWwDLGLhYbzV/aS/Lwsxf8AE 6xjIxT9oLsq3ONgB4/8an9tJoXqey618K+qahBg= X-Google-Smtp-Source: ABdhPJzuX0Jfb7Bu6YcWn7b331fCviSxOOTmPiASbdQdnhMcgd83DWeNUDVAhuzNNjkd4PrGlMjy/w== X-Received: by 2002:a62:1743:: with SMTP id 64mr7757961pfx.133.1599950759360; Sat, 12 Sep 2020 15:45:59 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.45.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:45:58 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 16/27] cirrus: Building freebsd in a single short Date: Sun, 13 Sep 2020 06:44:20 +0800 Message-Id: <20200912224431.1428-17-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-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 , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This reverts commit 45f7b7b9f38f5c4d1529a37c93dedfc26a231bba ("cirrus.yml: Split FreeBSD job into two parts"). freebsd 1 hour limit not hit anymore I think we going to a wrong direction, I think there is some tests a stall the test runner, please look at https://cirrus-ci.com/task/5110577531977728 When its running properly, the consumed time are little, but when tests running too long, look at the cpu usage, the cpu usage are nearly zero. doesn't consuming time. And look at https://cirrus-ci.com/task/6119341601062912 If the tests running properly, the time consuming are little We should not hide the error by split them Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrangé Reviewed-by: Ed Maste --- .cirrus.yml | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 3dd9fcff7f..690c6882e8 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 Sat Sep 12 22:44:21 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: 305571 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 DEE72C433E2 for ; Sat, 12 Sep 2020 22:55:05 +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 647CB214F1 for ; Sat, 12 Sep 2020 22:55:05 +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="jHmvi8LE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 647CB214F1 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]:41288 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHEQC-0003mv-Dr for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:55:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEHX-0003wl-T2; Sat, 12 Sep 2020 18:46:07 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:35849) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEHW-0004UJ-7K; Sat, 12 Sep 2020 18:46:07 -0400 Received: by mail-pg1-x542.google.com with SMTP id f2so6748505pgd.3; Sat, 12 Sep 2020 15:46:05 -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=8LMHSaPzW0hzgrIuj2ua/jt2cvPDmkrSyzCQ3oAKLyw=; b=jHmvi8LEbYgMToHQ52XQT2TcfvNTW+1GLczEAD+R86zh93R5kUN49R2yDear5okwI+ 55ecrVuh2x6SF6oKgOgq4qsvyqvpeRj344Qx6/KOkEgR7NujJ6bHm6Uu79QS5CFHrnU/ 97N7zYCwFSBfZ2yapKvyNb01VJaLHNnXgcN93XctfbnilrInOTJN37ap70fYVtwJfdI7 hJXCMR33JKoMROc59KI4ZCReV8S16Xjv2WGfiJqRU2zn6o/ihHSFBAidGNbkm6TNM2DS vBsu9eA9UNnJcwjtg+h17PITSkHC7Yrsnk0xLOgHrI7kbCoBIINB6RjaofvUPMYW4D1q GAuw== 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=8LMHSaPzW0hzgrIuj2ua/jt2cvPDmkrSyzCQ3oAKLyw=; b=kG3bJc6As3enagKZsoFQfTm0Bxj9G8IMrXrcJAqjG1ejVSjnsbLn9qE+RMpwQ9JUjO F5CKiygZcv1wIIRFX83E4im/fVXIjNK6GRdJAFEUUeLxuFKVrOjd/EGERyhUFiJKbWTE eiBzMsLUR4aJpDvABMunpLzsHFa+mXMBibRw+mmvuJRRR4XCkp9k3tL6MfCi0ENvM/Ri MTHCMjdZ2IstUG1XwHFuHcZOl6/WwXvpOSfdhCTue8RgSheDnG87cDuGUyvJOTxkf4A4 yJs+dKDBUBmGqu/YT3KDPTK+tO3PO01ilzL715tnD+AoENPxB73Y7Zm+sjwSAwASnbif gExQ== X-Gm-Message-State: AOAM5335xe5hUIMr+NpE7iyme50bDSWKc/SUDTx887Ge8g4+U2vHOYNV LS922B5HCdC7t+6tqiBZCQPeTMp0NF4fqhAzzD4= X-Google-Smtp-Source: ABdhPJy2MXXmCzZkjfPBisZ4yaM9BHQrES4zrJNmqt2G6nXy/B+lQHHqDE/51FKyuZ7DIihM8ctEpw== X-Received: by 2002:a63:7d5a:: with SMTP id m26mr6034071pgn.373.1599950763824; Sat, 12 Sep 2020 15:46:03 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.45.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:46:03 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 17/27] tests: Convert g_free to g_autofree macro in test-logging.c Date: Sun, 13 Sep 2020 06:44:21 +0800 Message-Id: <20200912224431.1428-18-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::542; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x542.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 , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_?= =?utf-8?q?Mathieu-Daud=C3=A9?= , 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é Reviewed-by: Daniel P. Berrangé --- 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 Sat Sep 12 22:44:22 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: 273897 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 06F2EC43461 for ; Sat, 12 Sep 2020 22:56: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 829D621531 for ; Sat, 12 Sep 2020 22:56: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="ge4TkZtA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 829D621531 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]:48504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHERi-0006xF-M1 for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:56:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEHc-00044U-3A; Sat, 12 Sep 2020 18:46:12 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:42943) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEHa-0004Ud-6m; Sat, 12 Sep 2020 18:46:11 -0400 Received: by mail-pf1-x442.google.com with SMTP id d6so9678985pfn.9; Sat, 12 Sep 2020 15:46: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=ks2bOk3jYOHrXnI/Shz64S+t7ePZagOpQ3Ju/TypT6Y=; b=ge4TkZtAR+zIBsnkngBC+8ZPnxcHkgF3tpb21HevxpcyElI8T0+bcXfNHFBD790vdN vn5bBi/SwqmzvTuMn6aoee+eUyJ/wAiPYj68dNWDy4C+ol6cUQ5Sns+0hbgxm7vuis+H wzwS487vrvT9WB1A+0xU9xk65FeppXvFgjPlPwX3eQmo4xXs6U9hEH0MQA+AXlP0bhvQ Ciu7j1inLi+iNJu41KhFW9ZtBwkcsJZ53MnKta5NlqHmYI8UEwdF6K7Lk5c5dM7dPdKt ezRdZyZSQoxH176tR6xe2BDSFYPYE31kojjsq8IvPANvb/RhTqWtVMYSqLMfXss+5PSV YESg== 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=ks2bOk3jYOHrXnI/Shz64S+t7ePZagOpQ3Ju/TypT6Y=; b=P85Pwk156NvUpJ9XYCinLd5FtCPU8941kX2rVDxUcx16gEaz5WYQsXZJf0Zd5CmJkk 15oxddJxkkkSUQFn+00MHzX7NZPXjDHDtSJ6q1UoQvaRAX/4+oxgeAw8ukVKMTIMkUy4 /y6EeWK8uraYwYi3UrxSzwQ9wIXJaqAuQpfqo7SKG/fU4/3+4JkR+Q/bRpBdfL4xaMjN /7Zg8iIbcMotyaleNFziGCmsjtlqTScrgfZTa/A+dXOrUU2sr2fFZdF7G6UqbpIrzo3Q s54vah6xqMH7v5lv1ESBZVtvqE0TK9olMAJN4xcCnej1vG5SvlcC2H9r/vc3ztKxafTa Q2kQ== X-Gm-Message-State: AOAM533ZWg5N+PpRX5cQTBjfTxPTCC+xugOOrrasQm29q9ka4664KzYe ml/z8R4YmiYs1emqTP3sBo796SLSnwYFGQO5tjo= X-Google-Smtp-Source: ABdhPJxdeCUDjO6Slik77TTdsHiyBxXngb3Tt6JHgNCO83BjGZIHL277mJbn5yaWbbxAw3yEP368nw== X-Received: by 2002:aa7:9730:0:b029:13e:d13d:a091 with SMTP id k16-20020aa797300000b029013ed13da091mr7796971pfg.40.1599950768210; Sat, 12 Sep 2020 15:46:08 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.46.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:46:07 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 18/27] tests: Fixes test-io-channel-socket.c tests under msys2/mingw Date: Sun, 13 Sep 2020 06:44:22 +0800 Message-Id: <20200912224431.1428-19-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::442; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , 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 Reviewed-by: Daniel P. Berrangé --- 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 Sat Sep 12 22:44:23 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: 305575 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 AFC81C433E2 for ; Sat, 12 Sep 2020 22:50:24 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4215D214F1 for ; Sat, 12 Sep 2020 22:50:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WOahd/Ls" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4215D214F1 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]:50326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHELf-0004D8-4V for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:50:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEHg-0004ED-6s; Sat, 12 Sep 2020 18:46:16 -0400 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:46591) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEHe-0004Uw-GN; Sat, 12 Sep 2020 18:46:15 -0400 Received: by mail-pl1-x643.google.com with SMTP id d16so2643582pll.13; Sat, 12 Sep 2020 15:46: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=eTowCOmFGkug/aztHy6I04JZoGONhdCbvgRzQeqIV9w=; b=WOahd/LsIS1V37NqDXOQSi6ZEe8xfUdawSmAfG1lTSfXJSJEt1EnMq0C8vvd/3cI2l 8ItiyrdGKZOP+lfuC8JoGvjh4kgJuXjw03AOzlwTgxx40zPAZjH56ewyUiQb+I9i+/Lf WCnH+bs88QrjvI5lXPVbFYEVeQQb5a7QbsRHdHVMkfiP+T8McwrwNCwdjgqV1cW6WuJp BWxl5L7LfxiLkYCMldKM5yDmYXM4r0upzdKUewrM/fdp/FUhAMx7jBvUWrWgOuoE/8Wh Y09F3LvgmJNHWqBq8qj7MRQCXlxc8J8sZwZf5r1aGPKnPx0jzTMNQikIb0+gri2TDP+2 KUTg== 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=fSqDn7OcTaNios1JQ7LYzBGZf9rq204UxVJVj4yewf2puOIrnnC7mZXo+wTBTWH3Tm 3jxr4hKh7f6r19FpakQTgndQhagXs9mlCwz1XHn98Sp7lVcxlrokL28TsOL7ym6i9RFv gYR/kKkXWLYnoRGzaJsww7i65Fjkf/f7VLjYq0G/h5OmLvs0IEEH7RGwUpjCbQc780iu 5TyWXecfzYMlK4TzVkxDiRHAEZpVfNsJ+TtlO1Ra36Be0OH8Ji3s6C+Tu6bjYiQ9Ui51 wPh+5+I4vQlRonrgsnb5K8BaNsjA9zS7qVumYv0EWzV1SPBNrMe+1acc9qGasZQDgwn4 qD7Q== X-Gm-Message-State: AOAM531TjSjatzx3h0VVo6iA8xK7xzBVUS018TZ+sROLTyMjA5550z94 fQM/D0G1GxxT0JyAQjv12Dnb0FdK6PlqKZ9PiUo= X-Google-Smtp-Source: ABdhPJxKh+kSvkkJUwX2zSNjgzSNND4GdM1g9LF6evnDYSGmP1ccPE/3byYV/gsLt6Fu+78A79IEcQ== X-Received: by 2002:a17:902:9a8e:: with SMTP id w14mr7973020plp.6.1599950772381; Sat, 12 Sep 2020 15:46:12 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.46.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:46:11 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 19/27] tests: fixes aio-win32 about aio_remove_fd_handler, get it consistence with aio-posix.c Date: Sun, 13 Sep 2020 06:44:23 +0800 Message-Id: <20200912224431.1428-20-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::643; envelope-from=luoyonggang@gmail.com; helo=mail-pl1-x643.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 , Paolo Bonzini , 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 Sat Sep 12 22:44:24 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: 305568 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 36F91C43461 for ; Sat, 12 Sep 2020 22:58: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 B871A20731 for ; Sat, 12 Sep 2020 22:57: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="fY/tK3Cp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B871A20731 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]:55100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHET0-0001HM-MK for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:57:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEHk-0004P0-9D; Sat, 12 Sep 2020 18:46:20 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:37755) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEHi-0004WF-Mo; Sat, 12 Sep 2020 18:46:19 -0400 Received: by mail-pg1-x544.google.com with SMTP id z17so1006413pgc.4; Sat, 12 Sep 2020 15:46: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=raGFyZs6MR9nEefX4kmRsgZPLq8a4zwcDe8/ve9JX8Y=; b=fY/tK3Cpuvo/QA9ZWpgEo4m50ZEfcpRy42u8NOhm3BjXw0wUnkPJbZpdiliGNLBKog bXelf+DfBB2u0E4vSC9WV4Ayp3fOclws5ZPa6b7G/G/0LsGHo9SISjtWGZ5Vw8wzmMgs k+U2hhVxVSTI2nSIPAL4Rwx5ajWS6jgAGTc/zvc7PaxBpV0E1x3X28L8v7ue5eBESEU2 9jI6gzwaNEFZ27hAokXv7Hc+z5uLPtiOi/G8yvHlcO9wM++ouvLqKBcS6FPEbfvckRj9 S+T0t+rVVqwAHu+Qkrfm0OTiK70w6W7MVeh/NhCgiDDEKaqk0aCFII1h1uZQLU/Dfr3k WLiQ== 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=raGFyZs6MR9nEefX4kmRsgZPLq8a4zwcDe8/ve9JX8Y=; b=Jg9wPbRXvVerdAexWqyp3ztiUKxJqZTOW35TnAuzLW7arFtBT5eYUErXzUiPhIOGS/ HjnUel10VI1ODQGJyjNXVa8PHFZkPp8KIsh4tCAbd16m4mtZ/Z5T1CXU6vnF90d55Bgf cn5LFYIRyXW94xW+CYUCLJvVDRSewLHQTGfDPM2AUhSSG83oHh4X2cxHorXMQs0c/cNY O9zKslF6x4xT/n8Z4Coak56lJM0YkNGK5eIZokSEdUGOSF8WaIHzcXlz+P+jIjl5Rwn4 VKybDJRsOgp/EAAU5WRYa3DbOnBDCBUsX9/b1Fz6AwJYU0o9c2TLfxvCFuKsZFw52sDk /ywA== X-Gm-Message-State: AOAM532TwBJR2El2m/+v8Hm21jmZFlth6ru1kUC3Bw04m+x42p6CIoNK vMEtgeZAs+wACdQQRCLrXfLvIryqeiavgXELgKU= X-Google-Smtp-Source: ABdhPJx0kmt7ptJBB42CKsfSXjm94zRnMmI4KxxLwR1wNMJbdHsNkAy+gChBfnKya299a95Y3nPSOw== X-Received: by 2002:a63:d257:: with SMTP id t23mr6231472pgi.212.1599950776522; Sat, 12 Sep 2020 15:46:16 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.46.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:46:15 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 20/27] tests: Fixes test-io-channel-file by mask only owner file state mask bits Date: Sun, 13 Sep 2020 06:44:24 +0800 Message-Id: <20200912224431.1428-21-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-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 , Paolo Bonzini , 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 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/test-io-channel-file.c b/tests/test-io-channel-file.c index bac2b07562..1b0e8d7c1b 100644 --- a/tests/test-io-channel-file.c +++ b/tests/test-io-channel-file.c @@ -28,6 +28,12 @@ #define TEST_FILE "tests/test-io-channel-file.txt" #define TEST_MASK 0600 +#ifdef _WIN32 +#define TEST_MASK_EXPECT 0700 +#else +#define TEST_MASK_EXPECT 0777 +#endif + static void test_io_channel_file_helper(int flags) { QIOChannel *src, *dst; @@ -56,7 +62,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 & TEST_MASK_EXPECT); unlink(TEST_FILE); object_unref(OBJECT(src)); From patchwork Sat Sep 12 22:44:25 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: 273898 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 46FD3C433E2 for ; Sat, 12 Sep 2020 22:56:01 +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 C1EB221531 for ; Sat, 12 Sep 2020 22:56:00 +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="BJTx9X/E" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1EB221531 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]:44834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHER5-0005R7-Ov for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:55:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEHo-0004Y2-L0; Sat, 12 Sep 2020 18:46:26 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:33970) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEHm-0004WY-TS; Sat, 12 Sep 2020 18:46:24 -0400 Received: by mail-pg1-x541.google.com with SMTP id u13so8788835pgh.1; Sat, 12 Sep 2020 15:46:22 -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=BErOzaIvgNGZoOo8yO9vO+FZKR44ZCkaFrgaQmO82bU=; b=BJTx9X/EsEwNVXeS9wKeAF24ehMS/BR2EWzSS3AUHwK/V1wltUVUp7T381A1vwhHlL zJpPwh5ShMdvr8Au6nuw2/5vZRRKrQy2hOFzWS7xCgCS5E5oz9O5ZZ/QU5UqLa5ZWOU3 Ugf2TKz/9eYGmWx9+kXgPX43SSxdbgpDklEXGC/RlRIBwWyuchYxwQ4uFfq6jLeNW8ek eAaPYlGeJ/vFZ+gDQfj+RQeLKXc/HmBZotr2zn0ZMCuzRTnTPu0DfueiyNANUQ3iIrJI IZj3fvbUUbA/Y/9cnfeqFOlThOY+cYOwdspg9PyrRZWNSCWQDE1qCDCmiUl2BvwwzG0z 2blg== 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=BErOzaIvgNGZoOo8yO9vO+FZKR44ZCkaFrgaQmO82bU=; b=KlG79sWAsxz8UeovSVAD/3BkTjw/vRIVwNgmMzMIIKxbEeZ1BAZad4bRcJlZouAlkX kF2/xFMKWNu8ob8hTUvVH/ud7+nKkeovFpjpGwzmAtjfOw/9onbgEZbQF2KvtVZO6S8x dWv5alUYczJl2TWa9QY38rAmZHGydaaY6Lfs67zcix5pxld7w4xXYWQ9QXA3LcL/DEXS xJ5yhUsrFgfNpDTittv762Nod7KPuY+GDWUSMP2BckZcok3wQ0ZEhGrw4Otz3/3vp2Xs uXvk1+X7XSbf5rQpd75iIZay9cIHGVyC1FKYxiCWVmT7kjBIbUtIpXjekADJYkLEpiuM Z+zQ== X-Gm-Message-State: AOAM5304nctuQd0X/0tv/mZskjWG2zumB70I4G0skJkDkzky0ewWDi3b sD+GEEcsae92u5ixP9Nd+O3DWNu3W2+gHee5wis= X-Google-Smtp-Source: ABdhPJyMqDAXOfgFl2eXg+PeLEHEbkT9jivK1UN6yP8FOKgvSVIdAPF/I+wlUPsLVXmBQybV7XiffQ== X-Received: by 2002:a63:fc18:: with SMTP id j24mr5915096pgi.452.1599950780824; Sat, 12 Sep 2020 15:46:20 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.46.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:46:20 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 21/27] tests: fix test-util-sockets.c Date: Sun, 13 Sep 2020 06:44:25 +0800 Message-Id: <20200912224431.1428-22-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-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 , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , 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 Reviewed-by: Daniel P. Berrangé --- 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 Sat Sep 12 22:44:26 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: 305569 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 E6133C433E2 for ; Sat, 12 Sep 2020 22:57:15 +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 7663120731 for ; Sat, 12 Sep 2020 22:57:15 +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="q14fd5jN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7663120731 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]:51394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHESI-0008AL-E9 for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:57:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEHx-0004cB-6u; Sat, 12 Sep 2020 18:46:33 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:42974) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEHu-0004X4-CE; Sat, 12 Sep 2020 18:46:32 -0400 Received: by mail-pl1-x642.google.com with SMTP id y6so2657021plt.9; Sat, 12 Sep 2020 15:46:26 -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=ajxFadu+yHNyg0D+X68nZFkcXE3tK/jib0sFS+8nB4w=; b=q14fd5jNpTmbP1HexEFKnr9FQdMak13lglhkDvGEx9Y28nxXZTBjabbSYNetL+WhFy m6z0yatCmuZj1ENBIVXdig2KwcnkIi/ksv8iV49hVGOnEOcd4VE/y/OgPuICP6FD5W11 SSp8H99wpjbhKLfb7RPfYtJJX8P64Q1u8M3kY3VHNQ/TRj3VYGkqUwdQeCco9oNVXeLF iPsGy9laUl6/EvSbimvyvokbnLEFWnwlNnLiEqUr2aJ5N2aH0bTTyPYN5TD7yVbC67E0 LFBMyRzixyi5hWwQ/+rzEdAeTWFIpkRJR7/ZsQ/ahvLYRUi7L66bpmTpSHzclxhkvVCr zssA== 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=ajxFadu+yHNyg0D+X68nZFkcXE3tK/jib0sFS+8nB4w=; b=CqEHUqdueNDb+qL0xaBlYBnBLfaHxYoHakwnKSlVwOYA7pIN2hxYRYynA0GZvlDkHl DJ2hz6fh4AnI8QKcV8E7Y68AR0LNjUWLUUsnjPd9CVh3q1Yv8TD/NEn2kJ9PY+DIPgb/ ucS4R1dbwkpMXkGwzSB1g5Bkxyhfh52ABL59tCD15x6dWUE9IzQ6PTeMdYOJQzfrkFzC SdFlca9CjypclHR7DnmNQA2cpygCJLNzhzq8eJzw59maao9GIqxW1lLShgeqajR/3M6Q obxYe8s3dXdxIpiBH6lPAn/q+z2PCfaHEXCi5oRuNHqY2ERC/jR4H5tfHfQ0dn++Af3e toXA== X-Gm-Message-State: AOAM531qGh/xpQFL+9gKVoOPRgEfbAoO6u2grEY+9oRldEL8KnXXwP1A v2bUnbY9Le1xnCqG6vPFQL9jw5zKHzuwimi/bDc= X-Google-Smtp-Source: ABdhPJzhoPjhFQvxWRbVrVyd5W1BWweLvsAzUq9gEgTDyjdt5Tqz0jB5RXl2DuIzbd5lVFQSgeB1XA== X-Received: by 2002:a17:90b:796:: with SMTP id l22mr7888685pjz.199.1599950785128; Sat, 12 Sep 2020 15:46:25 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.46.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:46:24 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 22/27] tests: Fixes test-qdev-global-props.c Date: Sun, 13 Sep 2020 06:44:26 +0800 Message-Id: <20200912224431.1428-23-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::642; envelope-from=luoyonggang@gmail.com; helo=mail-pl1-x642.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 , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , 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 8a3c14d92c..be6bcfc46b 100644 --- a/tests/test-qdev-global-props.c +++ b/tests/test-qdev-global-props.c @@ -251,10 +251,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(""); } From patchwork Sat Sep 12 22:44:27 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: 273895 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 AB3EBC43461 for ; Sat, 12 Sep 2020 22:58:28 +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 215A020731 for ; Sat, 12 Sep 2020 22:58:28 +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="FF0L9bap" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 215A020731 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]:57922 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHETT-0002SN-9C for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:58:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEHy-0004d6-0l; Sat, 12 Sep 2020 18:46:37 -0400 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]:56107) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEHw-0004YE-1U; Sat, 12 Sep 2020 18:46:33 -0400 Received: by mail-pj1-x1042.google.com with SMTP id q4so3481210pjh.5; Sat, 12 Sep 2020 15:46: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=K7y5ZJD/cG5cMFm0+/8rHEDw15+8VS3xMSK8qF/3N8U=; b=FF0L9bapInKkX4o8YTYuvP0aqfzZut36gvlKDuOd7Gds/KPmEwHI3fNI7sSK9QaJry Gw7ok6NMesWxJYBtoNgjBbq9CJZRMfqpw04PH97psVY8AzwG+qhG3lu4hyPU0EDLFznG bfYXJaJ89Q2WMPrvbvkgbCrHFhdY5905zYUSi4pkfWTvGGIAn4uEigcex/RaUGw2hJA1 Zdv4ZtsZvSVW4zwhX13HhWCbh9fNVd4UjwrFdXFbdBL0r2+RAQ2pWRUbBj5+SvcMeXPz jIlas4S1HqRUx+Jh/X6IBCoJ0Z8fEyMSrE1KiEcQKvYAKSnvmYuv3HXhKt2x9BLIkhUK 2VgQ== 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=K7y5ZJD/cG5cMFm0+/8rHEDw15+8VS3xMSK8qF/3N8U=; b=MUpHdhfxPXXQUbZZZCGVqIRhx9sYsO1dljnwvuSrUvVZMV+7U13n57JOSF0u6/8uQ1 +0EPuVhAwHAJFrnntatU6/EbitBe6O3O6+mc3WgVKoR3PxngNAuXYIZ3KXYlD2GM+TMo UCe9m/bkWZGmo0GkNK6UFh5li2OK8p6mTD3EKbY/VMpFMfHYmszE/G8YI+XCXt+nJWGJ eKZ0lwnhBiqyNs0ke1mzi6Hrsw82JbkTqiAFXQ9+dhauZPcc1RJx8woqUvrgtN2KFk5A nd4f8z2qMJ9N1n4arKDkZD8iPPu+jtqFZmiyda83r5f/vrNdxkH1pULSJ5W3fuySfc12 ogLA== X-Gm-Message-State: AOAM532xe2Hktt7oMkQu6FfyxHwx0d59y001lacy2+gOO3jZ4CddM86z yj3warVPK95f3bxrr4Q3aXn00Wnw0mn6lpKj6pM= X-Google-Smtp-Source: ABdhPJxJKU4nziBn1PsXg6/2s04hzj7NC5VTCmM1LWJHX/0eqDW8eYZH/v8Q7WEvEiAupznHU/1/gA== X-Received: by 2002:a17:902:6941:b029:d0:cbe1:e76b with SMTP id k1-20020a1709026941b02900d0cbe1e76bmr8250199plt.18.1599950789255; Sat, 12 Sep 2020 15:46:29 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.46.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:46:28 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 23/27] rcu: fixes test-logging.c by call drain_call_rcu before rmdir_full Date: Sun, 13 Sep 2020 06:44:27 +0800 Message-Id: <20200912224431.1428-24-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-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 , Paolo Bonzini , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" drain_call_rcu is necessary on win32, because under win32, if you don't close the file before remove it, the remove would be fail. Signed-off-by: Yonggang Luo --- tests/test-logging.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test-logging.c b/tests/test-logging.c index 783fe09a27..8b1522cfed 100644 --- a/tests/test-logging.c +++ b/tests/test-logging.c @@ -210,6 +210,8 @@ int main(int argc, char **argv) tmp_path, test_logfile_lock); rc = g_test_run(); + qemu_log_close(); + drain_call_rcu(); rmdir_full(tmp_path); return rc; From patchwork Sat Sep 12 22:44:28 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: 305566 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 71660C433E2 for ; Sat, 12 Sep 2020 22:59: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 F0BB520731 for ; Sat, 12 Sep 2020 22:59: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="p38H6Dg9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F0BB520731 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]:36168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHEUi-000571-0u for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:59:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47658) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEI2-0004eb-Gb; Sat, 12 Sep 2020 18:46:38 -0400 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]:35742) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEHz-0004Yq-QM; Sat, 12 Sep 2020 18:46:38 -0400 Received: by mail-pj1-x1043.google.com with SMTP id jw11so3425549pjb.0; Sat, 12 Sep 2020 15:46:35 -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=/hY+yQHTuO6c65IcDhojIGm+XDaALdXHmil6ThkS0qk=; b=p38H6Dg9fU+nGFni31cwjKe6ksMoAPiwadCV6AXBXjMEhwbhs+bEMA2NN17NzATHsh mWUszOD0Dmp31N7J6s8bP7/QFptBBWjQraL3AIoeVATIOVAEsTikHLDvbEvYyi3ZIAIH Jd5rBM+cFjOKCf6OD9cdSqWTfv+52MEXDNbIHuqUqMuUFMjNAJlh+BbcklK22dgVxD1B CgeUXNlZSh3dFXnKXRfZVCnb3FTBSE+kEvFV3HKGbuHLVP3P1PUlzz7YtBdWBHR+Wt7O Lu6MqoS0DjSPjUnzbD6z7k+RqrYxQ1GwsaGY7gIRDkO6EyxOcTLlkfjFEpbbZ9EsSUSE TXeg== 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=/hY+yQHTuO6c65IcDhojIGm+XDaALdXHmil6ThkS0qk=; b=t3Qa7tv+UGgwI0zLte5ouMlusOao/Wyrfv8+p9T3AytfkWFTJ1jtwCxjxzzLA/CQah QaS1baUOdFcSYmUA9zPt9inA7pV2gOHzP1U/Y2Og394yhBGHMvP8q7nNPQiC6h9+bV/g YMjBHvhuJdJz4dqj5SMOnUazSFcHMrDN64Y/2qUkaUdVF+sk8lxTQr88iKAYYry0FtKp X0y1XbNPaGTwAkarTtyhizj0VI7Ov9P/5m2zvgVif4syMgR2gqZKmJhPh82s7+78cggT 4RbtBtccJy89fXD8/ny58O/DveDzfDq1Oy+SZaccVzos8h4ISSXHCEFU3xStNE/LTV3N sIGQ== X-Gm-Message-State: AOAM531msskSRvIcntZm5giRBXolT/Mk6P120NZAfu286B1XmplGoHcw tfpGgVWm/pJv1o5bNV63AZEhxXCyCuBPHUQOQKQ= X-Google-Smtp-Source: ABdhPJzNdORoLjVvIE7MJEkHhw4KlwW0PrSUYXJyGjqkqQfq6H8rAA0bUikDnC6cUb1jPfae1BTkJw== X-Received: by 2002:a17:902:9303:: with SMTP id bc3mr8104411plb.170.1599950793576; Sat, 12 Sep 2020 15:46:33 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.46.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:46:32 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 24/27] ci: Enable msys2 ci in cirrus Date: Sun, 13 Sep 2020 06:44:28 +0800 Message-Id: <20200912224431.1428-25-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-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 , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , 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 Reviewed-by: Daniel P. Berrangé --- .cirrus.yml | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 690c6882e8..1ff9f0a72f 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -44,3 +44,63 @@ macos_xcode_task: --enable-werror --cc=clang || { cat config.log; exit 1; } - gmake -j$(sysctl -n hw.ncpu) - gmake check + +windows_msys2_task: + windows_container: + image: cirrusci/windowsservercore:cmake + os_version: 2019 + cpu: 8 + memory: 8G + env: + MSYS: winsymlinks:nativestrict + MSYSTEM: MINGW64 + CHERE_INVOKING: 1 + printenv_script: + - C:\tools\msys64\usr\bin\bash.exe -lc 'printenv' + install_script: + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig" + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && pacman -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Sy --noconfirm" + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --needed --noconfirm -S bash pacman pacman-mirrors msys2-runtime" + - taskkill /F /IM gpg-agent.exe + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Su" + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -S --needed + base-devel + git + mingw-w64-x86_64-python + mingw-w64-x86_64-python-setuptools + mingw-w64-x86_64-toolchain + mingw-w64-x86_64-SDL2 + mingw-w64-x86_64-SDL2_image + mingw-w64-x86_64-gtk3 + mingw-w64-x86_64-glib2 + mingw-w64-x86_64-ninja + mingw-w64-x86_64-make + mingw-w64-x86_64-jemalloc + mingw-w64-x86_64-lzo2 + mingw-w64-x86_64-zstd + mingw-w64-x86_64-libjpeg-turbo + mingw-w64-x86_64-pixman + mingw-w64-x86_64-libgcrypt + mingw-w64-x86_64-capstone + mingw-w64-x86_64-libpng + mingw-w64-x86_64-libssh + mingw-w64-x86_64-libxml2 + mingw-w64-x86_64-snappy + mingw-w64-x86_64-libusb + mingw-w64-x86_64-usbredir + mingw-w64-x86_64-libtasn1 + mingw-w64-x86_64-libnfs + mingw-w64-x86_64-nettle + mingw-w64-x86_64-cyrus-sasl + mingw-w64-x86_64-curl + mingw-w64-x86_64-gnutls + mingw-w64-x86_64-zstd" + script: + - C:\tools\msys64\usr\bin\bash.exe -lc "mkdir build" + - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && ../configure --python=python3 --ninja=ninja" + - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make -j$NUMBER_OF_PROCESSORS" + test_script: + - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make V=1 check" + From patchwork Sat Sep 12 22:44:29 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: 273894 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 AF42BC43461 for ; Sat, 12 Sep 2020 22:59:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3F47320731 for ; Sat, 12 Sep 2020 22:59:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="E4uq7D28" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F47320731 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]:34438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHEUO-0004OI-Bw for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 18:59:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEI5-0004m7-Ho; Sat, 12 Sep 2020 18:46:41 -0400 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]:51524) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEI3-0004ZX-Oe; Sat, 12 Sep 2020 18:46:41 -0400 Received: by mail-pj1-x1042.google.com with SMTP id a9so3490473pjg.1; Sat, 12 Sep 2020 15: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=+2fNL50dgeI28TebAqSoSX6cTtGwDHyqvFUmnw67Jgc=; b=E4uq7D28dfTOX5/gvHL+hq791U10duAWVygqmFHbJXP1kyAJfU/A4JM6A7Yihs51AR YM3hNEckgZdINT9+aga1dZdQUiVdGBnJc3ZAdVhmmHhQCm2ihqIJp7kcQKXtX2R5I0Yl HfMVnkZvxTbPlKNU1Xkh4/JmU/I8tgJ2sJHs7TjZ8CcGB7giYAVCTl/+O9j7cEl4k4Im 6ZlsxNtGHW0gKNFcHIBSdqz0LmGTYf1NSddFC/QlzTGoC9p9wF15uVhOoHcpwgrGzAdZ ZYg+sG3yz9hRwgkULfCyiSQDHb5faRkBOJzfnLfcjyx1sFeXcMSAUwnHTjAwgHKW1dm8 SoNA== 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=+2fNL50dgeI28TebAqSoSX6cTtGwDHyqvFUmnw67Jgc=; b=WW6eAlSZ7q6/4p+GxMdhL6yMi2uhL3g6GX7Krv5fdNigLP0PRYdPOxNI7GEDfAFCT/ ubbjWGflvGGvVOSx4AzAIoO/Od9JWvB2jK9Qj8GJZCjllnHbzN0iKj1iANNRS2UnTeUT /HHFPvCHPOuO/pmnH6Ml3MqZf/ILhxrRTGhmctDAcm7K51HIw0tIvs+Zg+r7MnRkP/vU j9MIcoWmqYtwm2+2P1nGt07AHIhQlMVojC2ClmKeOWilP+VgDLeYRq/Uto2Pr5OLUjXs StVScD4zrTMoqifagqRGIniPJJRU/zf7If4bQymAM5wdLxxe2PAevlviEXsT3tZ8AB3M Q2Vw== X-Gm-Message-State: AOAM531y+rV45MEh8/PL797LiTKkB/QUKgXPEihwf3UsMKK7kBMuLXc7 M6GRygYQKmg7Kj9iGe26DkFbOGF6MR9tdzJDfL0= X-Google-Smtp-Source: ABdhPJx/H3P0sfr6YkPmfOlNTAviWmJZNXbpsI9XVn3MO0NpccJVaeSJCxzfaP8TCxZ91gc7uXTHvg== X-Received: by 2002:a17:90a:fb52:: with SMTP id iq18mr7753111pjb.207.1599950797727; Sat, 12 Sep 2020 15:46:37 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.46.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:46:37 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 25/27] meson: upgrade meson for execute custom ninjatool under msys2 properly Date: Sun, 13 Sep 2020 06:44:29 +0800 Message-Id: <20200912224431.1428-26-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-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 , Paolo Bonzini , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" * Bump versions to 0.55.2 for release * Tag Info: object 008d13038f95e7c7d8ad553f14e408da5b94c360 type commit tag 0.55.2 tagger Jussi Pakkanen 2020/9/11 1:24:47 Signed-off-by: Yonggang Luo --- meson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson b/meson index 68ed748f84..008d13038f 160000 --- a/meson +++ b/meson @@ -1 +1 @@ -Subproject commit 68ed748f84f14c2d4e62dcbd123816e5898eb04c +Subproject commit 008d13038f95e7c7d8ad553f14e408da5b94c360 From patchwork Sat Sep 12 22:44:30 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: 273892 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 49089C433E2 for ; Sat, 12 Sep 2020 23:01:50 +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 AFA5F20770 for ; Sat, 12 Sep 2020 23:01:49 +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="jZgF2apC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AFA5F20770 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]:45200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHEWi-0000TL-S5 for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 19:01:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47710) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEI9-0004wr-JH; Sat, 12 Sep 2020 18:46:45 -0400 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]:56085) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEI7-0004Zy-Tl; Sat, 12 Sep 2020 18:46:45 -0400 Received: by mail-pj1-x102c.google.com with SMTP id q4so3481328pjh.5; Sat, 12 Sep 2020 15: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=Kzrzivny+4aurKQYh64spFpy22dgRRF/NzeUryxCkkI=; b=jZgF2apCgO2xLk6HU/6pB9mRE25hR9rBRh4bweqL5LpGc7ntZW9t+MWGSd3gtcDihs 1e+hf+PeutI4P3CBIhWu3H8gnHkSBRDfUkVocXHfJgJEuJ5bmti4UICZGzeioGz5Oiv6 nukxj9eXloCHY3hgkRW+TUHFhE1SB6lRH5OEfkgobo3HQvNJIE3sm+ORyvlpL5Ekad/c nj74vFN82T9FQ2AJy7NSHEYnVeNs9edDtrwFATOAh8kzlRBu2bC8l/j+v95a1KqgYoCa EhMbdlbB5U+nNTp2L7hLQFp8WSxsuust7gBEmgzfU2NfsciYDlvgehFn7FaqKeM5/SIP vn2A== 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=Kzrzivny+4aurKQYh64spFpy22dgRRF/NzeUryxCkkI=; b=KLFM/D7dGDQsM0DhQYF3aU1OCOlOJ3X7nzSsmIIGPRTXFuMimUNGJZYt7KgMJcCU/l J2CNzQlnLVA9KsH6H9Tlf6cK8irI3AAgIXr5imm+cGu4VeISH4j/JLRrA6xBgPnMufQW kPuaEXSWyznEwKP1tfV9vFllEGwPKUYZsgOWrzbvT+qeSv4o8txe8UA/1ynoXumIaMGb iDeIWQxzz6UThAGQd3ZZ52aPUCjIYfnBrwz6ByaJvPy+Glwmn2K5drTFyTbh+ONW7Xha OXJYr/RrK6OiEEkkBv9n+LmdYciBTIHrVgrf3OpVrhJn8grBkw1uJwFuffjEAoZI+e+J SBUw== X-Gm-Message-State: AOAM5330R8s3iVKHxJaOXxLGJdZToN4I+/nymtA537qLdpRLNYcnbLcN CXP4k29yWlQZa32Q9Ok6eppw0cxNinljyemnjNw= X-Google-Smtp-Source: ABdhPJzSwaI1kyf8HYd8KjxbuD5d/nWHS6X13diPEgW/Zq/sZWPWD83nxOgPQRbt6BNdYdnaA5zNGQ== X-Received: by 2002:a17:902:8c89:: with SMTP id t9mr7869466plo.66.1599950801871; Sat, 12 Sep 2020 15:46:41 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.46.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:46:41 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 26/27] meson: remove --ninja option in configure. Date: Sun, 13 Sep 2020 06:44:30 +0800 Message-Id: <20200912224431.1428-27-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x102c.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 , Paolo Bonzini , 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 --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 1ff9f0a72f..87bd110d28 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -99,7 +99,7 @@ windows_msys2_task: mingw-w64-x86_64-zstd" script: - C:\tools\msys64\usr\bin\bash.exe -lc "mkdir build" - - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && ../configure --python=python3 --ninja=ninja" + - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && ../configure --python=python3" - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make -j$NUMBER_OF_PROCESSORS" test_script: - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make V=1 check" From patchwork Sat Sep 12 22:44:31 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: 305563 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 80E13C43461 for ; Sat, 12 Sep 2020 23:03: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 1D8E820770 for ; Sat, 12 Sep 2020 23:03:00 +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="YBL0UeQ2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1D8E820770 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]:51716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHEXr-00034P-9Z for qemu-devel@archiver.kernel.org; Sat, 12 Sep 2020 19:02:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHEIH-00057z-SS; Sat, 12 Sep 2020 18:46:53 -0400 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]:52406) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kHEIG-0004aF-3l; Sat, 12 Sep 2020 18:46:53 -0400 Received: by mail-pj1-x102f.google.com with SMTP id o16so3488521pjr.2; Sat, 12 Sep 2020 15:46:47 -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=xja2GOan26JGtbnJysiTAdF/PP8SFiEz9x6o8ysBpug=; b=YBL0UeQ2J5GeltLrATBdk4OIYSsJFeZwaZ46eAznrZibWr+QEbklXOLaM6HM8ynaBw Qmi9X89Pe0o6KUYbvWjJj/o83HFWmZU/a48+OVCWBgH8mChY9USsMvRgakhKpd1fCbqo t7/ygBHX32oZ6fjA5u7eUDy4fr4drEDMk7wIJCL+J38AWOhsC8ALzUME7av4AoidApC2 DA0i7Wpq0+nH/BbSB37C4+vzuShH27Y/rC/F9PJAYWTIlEoUqCu92uApoAnaw/L4EEPP /UFEKzCsXMzp3XZGnCOHZsqeWNMAPR4MCBQ531yAFs2z2H0tMnQu6tE6HWPr3GCHEryI qHRA== 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=xja2GOan26JGtbnJysiTAdF/PP8SFiEz9x6o8ysBpug=; b=WDb1jdThbI4NOqegKYDv2g7HUOv0W8sC1Vpw8Z/SIjKUx3xpJRSw/ZwCXR2sqwnk3q CrZMO5vk3J0Vglnj8s4w9s4Do8iVg1pX6pY+oIne+PwXFbnRJAxvRxwjdqywqRtYavA1 UWFPhU9lJ7eOeQS1AjKRqKwCY0xd6FYfBmEw3ZSmPCVOaPSLwPKLUw44vWIpncbuwAr3 8tMHHNpaJwO62fKXe3s411WZqbDDcYI70F5VeGvuuGqPpFdDWdOtS63MXOd0PPvUuOFE ADqSLpdCzX5fcItreSJ5VORqhwJpMtJr1DEYKxRQXyRVlOjaW4oMsOEg848xdaz+ZmYS a6vQ== X-Gm-Message-State: AOAM532dDz9Kov9B5EA5D4ICQiOVPCxHwxt8xZjnTYQ98pcz5sLpLjXw kSgdUCc0CCn1sKJijwYqXfSyw7zfYyTBKPMLBws= X-Google-Smtp-Source: ABdhPJyaSAVs8HBXiUomIy060JGqTzzAGhYvWSrLrFvZgqYKCgjFEDlVNRfg+CTEuWYrn7ac3QWsrQ== X-Received: by 2002:a17:902:7594:: with SMTP id j20mr4528185pll.43.1599950806025; Sat, 12 Sep 2020 15:46:46 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id t10sm4639266pgp.15.2020.09.12.15.46.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Sep 2020 15:46:45 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v8 27/27] Revert "configure: add --ninja option" Date: Sun, 13 Sep 2020 06:44:31 +0800 Message-Id: <20200912224431.1428-28-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200912224431.1428-1-luoyonggang@gmail.com> References: <20200912224431.1428-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x102f.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 , Paolo Bonzini , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This reverts commit 48328880fddf0145bdccc499160fb24dfabfbd41. The --ninja option doesn't need anymore because of upgrade meson to 0.55.2 At that version we can use ninjatool Signed-off-by: Yonggang Luo --- configure | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/configure b/configure index af86ba1db3..dc7cc0f411 100755 --- a/configure +++ b/configure @@ -535,7 +535,6 @@ rng_none="no" secret_keyring="" libdaxctl="" meson="" -ninja="" skip_meson=no gettext="" @@ -1003,8 +1002,6 @@ for opt do ;; --meson=*) meson="$optarg" ;; - --ninja=*) ninja="$optarg" - ;; --smbd=*) smbd="$optarg" ;; --extra-cflags=*) @@ -1777,7 +1774,6 @@ Advanced options (experts only): --python=PYTHON use specified python [$python] --sphinx-build=SPHINX use specified sphinx-build [$sphinx_build] --meson=MESON use specified meson [$meson] - --ninja=NINJA use specified ninja [$ninja] --smbd=SMBD use specified smbd [$smbd] --with-git=GIT use specified git [$git] --static enable static build [$static] @@ -2014,16 +2010,6 @@ case "$meson" in *) meson=$(command -v meson) ;; esac -# Probe for ninja (used for compdb) - -if test -z "$ninja"; then - for c in ninja ninja-build samu; do - if has $c; then - ninja=$(command -v "$c") - break - fi - done -fi # Check that the C compiler works. Doing this here before testing # the host CPU ensures that we had a valid CC to autodetect the @@ -7952,7 +7938,7 @@ fi mv $cross config-meson.cross rm -rf meson-private meson-info meson-logs -NINJA=${ninja:-$PWD/ninjatool} $meson setup \ +NINJA=$PWD/ninjatool $meson setup \ --prefix "${pre_prefix}$prefix" \ --libdir "${pre_prefix}$libdir" \ --libexecdir "${pre_prefix}$libexecdir" \