From patchwork Tue Sep 15 17:12:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777367 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7F09F59D for ; Tue, 15 Sep 2020 17:27:14 +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 40DA520936 for ; Tue, 15 Sep 2020 17:27:14 +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="cROZn4/o" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 40DA520936 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:39702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIEjZ-00084M-9B for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:27:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEWz-00006l-10; Tue, 15 Sep 2020 13:14:13 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:34796) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEVn-0002cd-P3; Tue, 15 Sep 2020 13:13:01 -0400 Received: by mail-pg1-x541.google.com with SMTP id u13so2348176pgh.1; Tue, 15 Sep 2020 10:12: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=hrJEqDkxFKpoRhRzMOgEeJejUGbXqPW0+cFjCJrQlA0=; b=cROZn4/oi49vjEhlnRxM95pNUPwuqepwFHuiC9EtiCx9y9E5gnsunnNNlntOYilikZ GxEnaUhpnSSOCMysR0vXXzbnA7WzWJcXM3yiC/spb6DbPUUXLI6ouVNHprVETGq/fIza tIaPAPPo5gHmYRTcvKjvAq1Ir4K6OSVpc06TI6BZpzMZWGtL021A6IzUauq0N+7+1zoJ Jh92NPW0+Eh7LkQpUeN01B5rTcFFdgooF6ItN6eb2Xm9Yq8iYrEViwrCMjmzO/RDngCU PBWUKx+zsw4dMT1OAp6oDWbKvM9vTrFHDDFGWPLkmYzEXqMfzGUqQUIJkXonPQN5qPh1 0J9g== 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=P1DGD+Zq3FVuLvUI6449xWxjuniqo0NlFcdu6w2BJIp109WaHJ+BLdoVe65WYMejI4 F3OR7QFBy9dzMIowBv+YS12zuoCMhjdszVY/1YSGVIN0o9ASO1SBoZdlkup3voH7w2e7 d/QhM8Rvk80n7LzuDWy65VkCgQF9yRmQ5G/T7Q2iToSD0oVu3sfSseZqXkW3Ll6byLyC cin5388ijFXSKU/29OJgDfopBIJKdh3NjZdsyCrAL3eJ3HEiLyXYCRLQ9w4mWDxRvi+W g9ob/7athrJ66PuQJug0vp2JOezbyrJfpk1beK/O4CUrj9evdB9waNXvaaJDmrUXjPSF 6A6A== X-Gm-Message-State: AOAM531cKC0GhzL+gjc04cRh6Lna57/1LE8MUPO2KJsm55RbLCHe2tZo 54m9oG8CsLX//PitfTFzmKmBiISE/KImQWHMwWM= X-Google-Smtp-Source: ABdhPJwG4/B6u5o1WAZOmTjlfcksfK1wxOjZm8RU+lgWL5H5I39XN+Z9LoI9ThPS/C8Cxj0LpGl10Q== X-Received: by 2002:a05:6a00:f:b029:13e:d13d:a089 with SMTP id h15-20020a056a00000fb029013ed13da089mr18280557pfk.32.1600189977644; Tue, 15 Sep 2020 10:12:57 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.12.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:12:56 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 01/26] rcu: Implement drain_call_rcu Date: Wed, 16 Sep 2020 01:12:09 +0800 Message-Id: <20200915171234.236-2-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-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 Hajnoczi , Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Gerd Hoffmann , Stefan Hajnoczi , Wen Congyang , Paolo Bonzini , Maxim Levitsky , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.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 Tue Sep 15 17:12:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777361 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EF7F792C for ; Tue, 15 Sep 2020 17:24: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 91D8021D24 for ; Tue, 15 Sep 2020 17:24:45 +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="G3dahdMr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91D8021D24 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:59798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIEhA-0004Ys-OV for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:24:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEWy-00005r-Ni; Tue, 15 Sep 2020 13:14:12 -0400 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]:54851) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEVs-0002ds-8X; Tue, 15 Sep 2020 13:13:05 -0400 Received: by mail-pj1-x1041.google.com with SMTP id mm21so120335pjb.4; Tue, 15 Sep 2020 10:13:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qBiHjFc2XldMuU70Rv/GASQm/Q1CmoJMQE32Qhbbw0w=; b=G3dahdMrf+0GzWlydxSeEkeCOaunQMvv43R4CaClGWWWnDAlRl1VvpjZPKpLUqpbOI 82D4vZW2XnFFsefrDag2irgO4YHio3ZkyDNw+xM59wMHJzQWdGjPzn38xEy5xRlbtvp/ 3ECaSDlZTLzbFugx45Ywp1cxlTpBHF0OplzEULQxAvddeyPRAdWEVGjRwgMUntZSp+4G ewcRf1m1YTe2oJmNXFbFmk1/8lvLWmGjbmBbPXt3sbykUGBt5WQO/lqlXRPzIRe7pHgO A+XGGpP+JF2W7gh1LuVZz5QzgIe5Sxp5Xwd0KU9XdeUb0iqN1qQ+qc08ug+FmyrxHCEp XE5g== 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=qBiHjFc2XldMuU70Rv/GASQm/Q1CmoJMQE32Qhbbw0w=; b=oDxWaEhhav5+CHp2/moOHiL0zFy7g4f0sEnE2v3CN4Fdj1F6KsQSZF0tvPO3qmP2sP YQ8nu8hGQtfzd2XnexyWddw2Jj/LW8j6UNHoDO+29ehkH+4BuqdqjfR/1j2uHXvhBEpW 0g6cOyt9aQ7s06/nNf1FgKXKpQ2fktGkECOKd8AzE2es0T7Ku/aLK84JzWLSJzZ3QnoI bnGtDTKGQls6QkvTC6QMdayxYoMq8WVrQrX+Vlc0775UjfWDTMx+V466P1weykwU4S5H 1TYiUTYUuQWd1E1FSBJUotFvIpbeHDTJJrxJkLP4LSUbkGyM+pYx184f1Aro6ZgMZwWT be7g== X-Gm-Message-State: AOAM532EBeatP69ilJ55vSORxvIVT1krYFXKV524ou3JRMIZg+FMn9kw Ql3+peF2I9+GwromQ9vakGbPk9SmB6NpfyPO8cM= X-Google-Smtp-Source: ABdhPJwKO+6/SHLvKXMBm1hrZTsQiyZNKN9/Rbnq8Htbw6eafdn8xiC1WzMiQlKDiGlBRwLCokMubA== X-Received: by 2002:a17:902:710d:b029:d1:e5e7:be20 with SMTP id a13-20020a170902710db02900d1e5e7be20mr2670438pll.83.1600189982051; Tue, 15 Sep 2020 10:13:02 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.12.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:13:01 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 02/26] ci: fixes msys2 build by upgrading capstone to 4.0.2 Date: Wed, 16 Sep 2020 01:12:10 +0800 Message-Id: <20200915171234.236-3-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1041; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1041.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The currently random version capstone have the following compiling issue: CC /c/work/xemu/qemu/build/slirp/src/arp_table.o make[1]: *** No rule to make target “/c/work/xemu/qemu/build/capstone/capstone.lib”。 Stop. Subproject commit 1d230532840a37ac032c6ab80128238fc930c6c1 are the tagged version 4.0.2 when upgrading to this version, the folder structure of include are changed to qemu\capstone\include │ platform.h │ ├─capstone │ arm.h │ arm64.h │ capstone.h │ evm.h │ m680x.h │ m68k.h │ mips.h │ platform.h │ ppc.h │ sparc.h │ systemz.h │ tms320c64x.h │ x86.h │ xcore.h │ └─windowsce intrin.h stdint.h in capstone. so we need add extra include path -I${source_path}/capstone/include/capstone for directly #include , and the exist include path should preserve, because in capstone code there something like #include "capstone/capstone.h" 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 ce27eafb0a..f59080703e 100755 --- a/configure +++ b/configure @@ -5157,7 +5157,7 @@ case "$capstone" in LIBCAPSTONE=libcapstone.a fi capstone_libs="-Lcapstone -lcapstone" - capstone_cflags="-I${source_path}/capstone/include" + capstone_cflags="-I${source_path}/capstone/include -I${source_path}/capstone/include/capstone" ;; system) From patchwork Tue Sep 15 17:12:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777365 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4F16492C for ; Tue, 15 Sep 2020 17:27:14 +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 00F03208E4 for ; Tue, 15 Sep 2020 17:27:13 +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="RTwqm+Cc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 00F03208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:39662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIEjZ-00083V-2A for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:27:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEWy-00006l-It; Tue, 15 Sep 2020 13:14:12 -0400 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]:37605) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEVw-0002eI-Hu; Tue, 15 Sep 2020 13:13:14 -0400 Received: by mail-pj1-x1043.google.com with SMTP id kk9so122300pjb.2; Tue, 15 Sep 2020 10:13:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7fnZxHJTw3qRgRORiSXEFhRbwParpG4yt1WADaHZ43Y=; b=RTwqm+Cc1GH7F30m1hWPRwglHlh3b+6htpAfeErQUz945GRRYTd+VTH6sA6j4tOs04 CiXcYNtVEoqszmoPdcUDjrp5oKZ3CqAld2PSeuiAWqK9AeB/Ag32OLY6Oxui2HeW3CTZ ByLFXK1N1O8C1eaUp+9QLPvpgci8tEP6/2K7mWqfLBbW/dSgPjgPgrG6u4lf5Xwy3nK9 MRWEssgncNX3F+DsROZqDHSIT8aqL0VtWwQJ21zFMRmoPga0MHhbM1d6PGo+VLL7C3e6 LcDTiQK/gf4IKtndpneyt9fe8blYZ4cSFrnxnSGUDtoj+zYRJA0UcP3HzMQWeqUlXOJl M8fg== 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=7fnZxHJTw3qRgRORiSXEFhRbwParpG4yt1WADaHZ43Y=; b=AhPt1tuqGkZLioGg/VMXUis1kzK3KUFrHJiy7P0RPR00you38djxTaJ6ArgmqrnlpL BNumwGgmXwkuauHelMCGAYN0MX2p/tyiQi+CuSSypKYiWqGtf3f0X+MeP/1bYjMKxsej oOlQtYeFnjV72EZVTCnNQRB0dL9dAxmpSRwrgfp1eOTf4fTAbX/7YZS+s8NemK90FA94 ZP2/xVRsYoe/7EBGajRqtJm6WeDeoFcsyt2cPrIbjpCvFKJOTWYQo7O7OGPz/b968MXK umJ2gtphxbwywjbrfxTzKwZ28IITfy8WfvHDkPaie1igLw6z+p3RkTeyQHYZ+bjs0lTK 1CpA== X-Gm-Message-State: AOAM533TGGfY8iwreQNGmaEVkr48Occdft0FvMxjfKXw683KlnyvKa9q D8W5nhQkwMju22hyPuezHwuWao2Suedac6BTDs0= X-Google-Smtp-Source: ABdhPJwLh/c+2Mp53QjsHWfLYidVjQIhmftRIT5BFVpeH7XNS5XftMB+6vr/rFAMSI7/aU5eoT6DxA== X-Received: by 2002:a17:90a:cf07:: with SMTP id h7mr342593pju.142.1600189986297; Tue, 15 Sep 2020 10:13:06 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.13.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:13:05 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 03/26] configure: Fixes ncursesw detection under msys2/mingw and enable curses Date: Wed, 16 Sep 2020 01:12:11 +0800 Message-Id: <20200915171234.236-4-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1043; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1043.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The mingw pkg-config are showing following absolute path and contains : as the separator, so we must 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 f59080703e..dc4b7a2e55 100755 --- a/configure +++ b/configure @@ -3654,35 +3654,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 Tue Sep 15 17:12:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777379 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BB33259D for ; Tue, 15 Sep 2020 17:30: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 6A834208E4 for ; Tue, 15 Sep 2020 17:30: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="BxeiweHj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6A834208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:51702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIEmF-0004vi-Gi for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:29:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEWy-0008Og-JE; Tue, 15 Sep 2020 13:14:12 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:44838) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEW0-0002es-Pm; Tue, 15 Sep 2020 13:13:15 -0400 Received: by mail-pl1-x641.google.com with SMTP id j7so1680593plk.11; Tue, 15 Sep 2020 10:13: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=lgYFFisioEl97r43OtBikET9wKvUFSMqnEjDRJxGeJs=; b=BxeiweHjFXJG7PCRpnrPeRIVD5w9iYp7RHdbKpXNij9mTUz9xtJ9yUXjJ1qIucYfuW qM2W72OGQciQ8vXJ4/eWffqTtlmX5uxae0HyRpXTFHykRXmmpAlKE2Ox/mkfwcej1jlf niw2KuP0+K59dAJO36Hg6AxlxgfR/AdHk+PaEq/UkvTlJoLHruGYr6kBxhNKCVvumEDW iCm6HPNxuhef7ysB43m0sI56RyIBQsQn090lRoNDGn9IYVq/l6nuPxSrniUA3tp4f/DH DT0VqRt8sK8kt9I1rig5riBsM/2I6iLhl3wVI2/IGWNgeeZjxpqiITxYiokYHQex4fGu ItQA== 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=lgYFFisioEl97r43OtBikET9wKvUFSMqnEjDRJxGeJs=; b=H4r9ClqZKe7ONf8PB2uPc7uX6XOjfJL+lCTHmpHQMJHkG4H58DYWR1f6Mg7P/Cq0dU wMH9fiT+y59XhVj0eT0mZCwe0f3VYxdkNLqmGsJxR/XnesoiCJhumP328aUX224j6s4t Tq3hzHi6zo43yhODo3UekpvoFAZhVwbjrIMWdBfaX3hORjZCXgaghZMVLsFSo/zteiPo FMe+2v2wZFOGrSNshb7IRGzzqqlxf99l9/MHbrqtmgp/BXVBbDWB6HuCEcX9A58fbUO5 PWVFnIvOIDxjYWg37PI8Yk7osEdz2gIqyGdsNRnvKQr2QWGoFT8Yl6H1s6oLGmn6efJa WhBA== X-Gm-Message-State: AOAM532P6bnG2JQZQxMW/+fZVcMYamtLmNnso0/nmyNbTcMDgTA+OMcW wssAsNN8aEnaiE1SvhwvaYvDywjzGwUkaezxeoo= X-Google-Smtp-Source: ABdhPJwY5CaOeQoQz0b4q3oISb8YRMx3/Dh/P6cw9M3m8VRqNObW/CDBa7De++5dzffeStRKWHiUfA== X-Received: by 2002:a17:90a:1548:: with SMTP id y8mr318148pja.113.1600189990670; Tue, 15 Sep 2020 10:13:10 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.13.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:13:09 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 04/26] win32: Simplify gmtime_r detection direct base on _POSIX_THREAD_SAFE_FUNCTIONS. Date: Wed, 16 Sep 2020 01:12:12 +0800 Message-Id: <20200915171234.236-5-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-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 , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.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 dc4b7a2e55..bac48b5b49 100755 --- a/configure +++ b/configure @@ -2496,37 +2496,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 @@ -7088,9 +7057,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 Tue Sep 15 17:12:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777363 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5E05892C for ; Tue, 15 Sep 2020 17:25:48 +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 238AB20678 for ; Tue, 15 Sep 2020 17:25:48 +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="LKHzr4Lc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 238AB20678 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:34662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIEiA-0005wG-Nc for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:25:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEWy-0008Og-1i; Tue, 15 Sep 2020 13:14:12 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:39891) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEW5-0002fM-Tp; Tue, 15 Sep 2020 13:13:19 -0400 Received: by mail-pg1-x542.google.com with SMTP id d13so2320559pgl.6; Tue, 15 Sep 2020 10:13: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=LKHzr4Lcn+uU0yCodbVQdb1MAMK3QlUfsXSU/mdvMxcPCCYoyUHUOKZWKi0W9XfRPw CXoUko5kphmNif8eL1e1meMctEWmtDMwF6DQSIQqGbB0eKF71yJuvosbnZa7odI3zrPk K0OFtlF1Leja1Z3Pj1nneSzJUo9a1OZEtCs5UXEWnMnDZ6qwmrN26+ZqU79aScR+KG/B mkRzjUhq5P+kayCKdv//mCcmwN8g3wMWEyERzcs7yzEUQTWWsSqrNhtExE7m1UTV4qDH DSmAOETUw1urCW94cDQVgqpU2+EKtky7iFywY9Rwy+V9zW8kGbSwNRLLEx+Nzh/67cmG GrzQ== 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=Md55+jsmyQ32tboiAx+DV4gj+29KFbu6kIXg4H8x80500LLN4Mg+Gt6THAzEYjdC+m QGZ/5AizNYAwwReVV3xB7+jVPvpzH+vJacJwnS4aNeECpSyD64WANZBW+1542UchTclg SJJ3xA59xjbk/eP7rhAuLh+C0Il2XNstub1erWRijcTp3zSWFhOFsKc9IbVg8Lqxuf/N rjRC1rJl/nSqFMEQvouArwQO/8Rz2s1xrq9PFU93denCSZADdeHn1X1j2SDxkAWkwLHL bqEm54O24fdAhiu2c7diA1axBMABERgT8UYTZ75SP5v5jM1hLprYVo6JCgBmyXE+epgH fRlQ== X-Gm-Message-State: AOAM533rwuiG8eJP11yI7roWpARPtSSwNz/TpXMGsLfQobUqSeMoiwuZ JV+Bu6WJk3hqMcHqeZ5Sh6/Z7j9sWMTSUiTfozQ= X-Google-Smtp-Source: ABdhPJzzqei6XycnCpqf7vVsJA3UGsbtwP3ZK1JTWdG/mPKqP2MEsIunO2weByoPNfudybmhektrFQ== X-Received: by 2002:a05:6a00:1506:b029:142:2501:3971 with SMTP id q6-20020a056a001506b029014225013971mr2805345pfu.54.1600189995460; Tue, 15 Sep 2020 10:13:15 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.13.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:13:14 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 05/26] curses: Fixes curses compiling errors. Date: Wed, 16 Sep 2020 01:12:13 +0800 Message-Id: <20200915171234.236-6-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-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 , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is the compiling error: ../ui/curses.c: In function 'curses_refresh': ../ui/curses.c:256:5: error: 'next_maybe_keycode' may be used uninitialized in this function [-Werror=maybe-uninitialized] 256 | curses2foo(_curses2keycode, _curseskey2keycode, chr, maybe_keycode) | ^~~~~~~~~~ ../ui/curses.c:302:32: note: 'next_maybe_keycode' was declared here 302 | enum maybe_keycode next_maybe_keycode; | ^~~~~~~~~~~~~~~~~~ ../ui/curses.c:256:5: error: 'maybe_keycode' may be used uninitialized in this function [-Werror=maybe-uninitialized] 256 | curses2foo(_curses2keycode, _curseskey2keycode, chr, maybe_keycode) | ^~~~~~~~~~ ../ui/curses.c:265:24: note: 'maybe_keycode' was declared here 265 | enum maybe_keycode maybe_keycode; | ^~~~~~~~~~~~~ cc1.exe: all warnings being treated as errors 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 Tue Sep 15 17:12:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777339 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 340FD92C for ; Tue, 15 Sep 2020 17:20: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 AF8D4205CB for ; Tue, 15 Sep 2020 17:20: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="Tb7qMlqV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AF8D4205CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:43590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIEdC-0006Df-KF for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:20:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEWx-0008Og-GN; Tue, 15 Sep 2020 13:14:11 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:33522) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEW9-0002fc-Og; Tue, 15 Sep 2020 13:13:22 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d19so1682287pld.0; Tue, 15 Sep 2020 10:13: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=eDe5d20FXHFU2NTKVE6+lFVB6CT1LN7XPKbQmGMToVk=; b=Tb7qMlqVqHb4XUHGocj9Ep9BzAa0M8BWZXV7n1/MzXlGHJLIO0oUY2hPzX82RvJUYd 8zXGAHSgiGbqG5pikZRSDSwgcWK+5uiB7oz8Huw+/XPoYkmZajq0j6hm/zdN6KC4Wi2v ORQZ/B+dbnKvPClBCdDYK+T5vFGuxKDK1FKd5VLXIXHFp5UdzEAliWSfxVmYrON0QMiW lzfk7VvYbRiD1VOCZBb1W9sPF777NiCZ5C2rWrlHk0EaP7rTHbMCXgpZbMPJb/GNBg+5 jpHiqQ8BYKqNzaoMowrtDfIq2/nieC8UPBf65A56rEwvX8bDsKhg1k2yFqUWXrM7m4g1 5IZw== 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=eDe5d20FXHFU2NTKVE6+lFVB6CT1LN7XPKbQmGMToVk=; b=NWi2ltBcnCnYny8VgBM5kXaUGEqIusTdK5Wj1L2iGCt9d+WZRmNTDatYl47f42+etc SlemMXXpOl+S4C0o62l+R7XddML0l3Z0+lOzUgf1U1KWSG/9yI5JsW3aPuxBMp5ZlUcT gnbgJ8Xx3Z6bH2++HGkvaCuNNYzmOoz9qBOP8uwN2ll+JLQb8R7WRf6dbkOLrAurtjb9 EXlqjUULpkMSiSGRfGGO+GFFGAtrYusjeiIeE5uQjiGRcKrSyPH6WNyhQsXhNImsCyTi 0n3yC7TYnAQOQTGKSeNqtjJkhqF+PffG+iIGetl1zP68vlQyA8bo8teKUmD7oP5okIxz 3UyQ== X-Gm-Message-State: AOAM533DUdu6nGor+GLtcHIUusnwGDTZmQ86uI+sNj2Zo1q7t329iCVL 7BIz8oHY3f1A2gUXj9LRbC+wYNcQQeIhejqoCv0= X-Google-Smtp-Source: ABdhPJyQoCeAVqgM24zZuWwYAhKnlz0+Gp8MjRJm1Wlh4T1KSXxM6wn4KbaKOPu3ThUWq1wm2r13aQ== X-Received: by 2002:a17:90b:4a4b:: with SMTP id lb11mr310966pjb.111.1600189999714; Tue, 15 Sep 2020 10:13:19 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.13.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:13:18 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 06/26] tests: disable /char/stdio/* tests in test-char.c on win32 Date: Wed, 16 Sep 2020 01:12:14 +0800 Message-Id: <20200915171234.236-7-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=luoyonggang@gmail.com; helo=mail-pl1-x62a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" These tests are blocking test-char to be finished. 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 | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/tests/test-char.c b/tests/test-char.c index d35cc839bc..09e4069306 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,16 @@ 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 +1541,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 Tue Sep 15 17:12:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777353 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F24CE59D for ; Tue, 15 Sep 2020 17:24:34 +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 BCD2821D24 for ; Tue, 15 Sep 2020 17:24:34 +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="Lxh+fpbt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BCD2821D24 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:59044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIEgz-0004Fh-Te for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:24:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEWx-0008Og-31; Tue, 15 Sep 2020 13:14:11 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:46015) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEWE-0002fv-81; Tue, 15 Sep 2020 13:13:27 -0400 Received: by mail-pl1-x642.google.com with SMTP id bh1so1681326plb.12; Tue, 15 Sep 2020 10:13: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=Lxh+fpbtzUw8lEDag8RBDAQu6NVws2MDKUtGtpZUoHfLcBAA4FWBKsts/h49PF2OQX eBbG6WNPz9lSEYC+9uTKfd/LM+YBO+ydG+hFyNK50g0UNjIWj2JP9wdE3obtHTBt1bSA DrY5t3xeXp+xHyr2CdbT6dLyBU9oOtJmeyUxK8F3LMdLDf1IIJr8u0p0hPDNRs4QU3d2 AlL70uoTIpF1VteR92LAg4UppG2A1RjzAoFoGuwUG6BElQm4hhY+jtx12xfxkdhPQXLI iEQnawpY2A4vMDBnUF2gXkbkLolTAo04DFNoei6rcayYz2uwOyVY0pqZa+Tj1PQ7477e ZmjQ== 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=Sig2H8WpeoVBVPn6bb8xMzjXfCG30Cp3hVoZ01lgUtsfmp2Cub0El3I/yY5gkl8aao sGy9ZYvxInPjHQXaO+BpXL2cq4aw06ZLVyYnLJrJiVg3qKFZupiEFKwJq+dScmNK6L6+ oKu5obX0XqjESexf2ZAduU6vL2N5T8ouIw6St9lFRSib6i8883UluWkvdIlAVRKwhxVP /Jf4CtZKwFMxV30vzztO1+PO++OWrTr+AinrvRUuHACdDcJ65vN7RgND62FUWXatqsdE nGA+zc6tLU17WYv+xSgXW2ozV/QWsHGPZx1a+475nq7loafp5ZemercAQjQLyFJ+lMHb 05OA== X-Gm-Message-State: AOAM531QZqieZWBGZ7VInq5/SXpDaxBWQxUBFwgJM8Pi73W+wgJtqiJ/ kkh+20KAOgDtiNiBE/XBa8vEEDGH1EpNsx7YL4I= X-Google-Smtp-Source: ABdhPJxmxx08k/UjHH1KvuuXszEK/OXbFy4Ew5im1vp39jBxnOB2rZokMAX5w5jKghXMCW1zcAPlTg== X-Received: by 2002:a17:90b:198:: with SMTP id t24mr322408pjs.107.1600190004192; Tue, 15 Sep 2020 10:13:24 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.13.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:13:23 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 07/26] tests: Fixes test-replication.c on msys2/mingw. Date: Wed, 16 Sep 2020 01:12:15 +0800 Message-Id: <20200915171234.236-8-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-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 , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" On Windows there is no path like /tmp/s_local_disk.XXXXXX 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 Tue Sep 15 17:12:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777345 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 977DB92C for ; Tue, 15 Sep 2020 17:23:04 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1B9442193E for ; Tue, 15 Sep 2020 17:23:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Vt4A0vJX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B9442193E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:52698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIEfX-0001bG-2M for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:23:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEWv-0008Og-Od; Tue, 15 Sep 2020 13:14:09 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:37687) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEWM-0002gA-NO; Tue, 15 Sep 2020 13:13:37 -0400 Received: by mail-pf1-x441.google.com with SMTP id w7so2336338pfi.4; Tue, 15 Sep 2020 10:13: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=18mOftWXQC3Rn89AKTi/Z7fcDnMtQzhw+fXUDjoqjy0=; b=Vt4A0vJXOs9wVgs/hfrA1qtZUGoXiPgwlNwb0t9KM7OSeBHOSU4JWLr66tcl4J0gQK oGKTXRJDCVpqWRoVV1MSNN0ZDep7AdmgdhmfbfeW2D0DhCKw+VpDtheTR0h6nvADrFQg mB/o6yz4wamf/Z7PJvS9Suoxp8O+nJJB3Fkh9tFXEDp3STgi0yW3hvUkWtRoEIyW/Hol UnoX2/3hZHXfHeD+Vp13nn8hDR7AcR6yV/96ZQBLDmV7Y9oQ1YxTIwcp+ZwBODC2pVdT 6ysQLJp+OENtd4/Qq4FQ1/YqQZpkfl4jZ0vbGK0OmUW3Mz5rPJLHHn4x6bKrff+g/NeK 8w5g== 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=GdblHjdnFHBo0oHUqO0db6lpLjffFGVcHySe/gcB6t8L3zAMCqYauMzwhM5bmmEwfd R/vx3RlNVd3J42Q/D9Y6Kby64YpRy1Yl03k3rTKT7idOX9Ex5dRz3UeyngjR4GiLHdlW pR4aAY4WLI30OdU19ZnOvdPal5yM2wRHvKAHHUD/GKzuhpFaEcp29ETHdeAjrx26Dv/7 S8bNscoTGH/hvLhhkdQCqWc2N3IGGFmJkD+Mk6LQEkf7HeWiMptiBZmlUfTE8bkof8GG M0om8A3Q6nzHpzXN9JatBfQmwOD7nk4zMKKekrU8UL7chjFtL0GWwpLz7VG3zpHYQJR8 QS0A== X-Gm-Message-State: AOAM532Q12RbRJL4UTbrK/jPh9LcpeQhNX/6Vdxy5lhPBb8RGjvwdWcx 6tf7RaO+Fy6edZDv4wdY3dY7LoDxacNPkRNgLS4= X-Google-Smtp-Source: ABdhPJyT6p9ZG4kmS7bjol52ErEy4+rp6+DPF2FpV9p3odCbZcxRGoSwmaumxGiCLDwXydtWUVzbCA== X-Received: by 2002:aa7:9f4e:0:b029:142:2501:39f1 with SMTP id h14-20020aa79f4e0000b0290142250139f1mr2816705pfr.64.1600190008769; Tue, 15 Sep 2020 10:13:28 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.13.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:13:27 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 08/26] tests: test-replication disable /replication/secondary/* on msys2/mingw. Date: Wed, 16 Sep 2020 01:12:16 +0800 Message-Id: <20200915171234.236-9-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-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 , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.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 Tue Sep 15 17:12:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777331 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2BE5259D for ; Tue, 15 Sep 2020 17:16: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 ABE7F20809 for ; Tue, 15 Sep 2020 17:16:30 +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="ts08TTDN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ABE7F20809 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:35354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIEZB-0002df-IO for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:16:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEWw-0008Og-4Q; Tue, 15 Sep 2020 13:14:10 -0400 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:38187) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEWN-0002gJ-79; Tue, 15 Sep 2020 13:13:37 -0400 Received: by mail-pl1-x644.google.com with SMTP id c3so1686125plz.5; Tue, 15 Sep 2020 10:13: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=08QvrHPKEN4GbCfMFC4QXPv5o40Q0NOGDJhtin5ahIA=; b=ts08TTDNhUmfwp4B/1inYE2FatlvbkqcvC5DiEuE7T2blowBhwn68GsH2tyjaoEwwI EC9YRDdtvCt7EpI1DUBwIN4okqZhtZm0t4kaR7UDu8Wa6m6x0ePb5AihFrf6DoRBxF4b RuqQ5eJnGtu9wCCC8bFha/YSGBNQ0CDnD+2S8t1SgPIizHGvAFc2l26/lUii96RvDIXS aKu8MnQ8OYJB3RHmd1IItsRhlVe/+9X5Dj/RX6tYUEehe3FmsHdaij/bwSVIh0MJBZZk GYUVxOL36Z2foy7eZgwQRM49ajJg3XKZhv+xUJGKifSU/DzoNxfvhv57zATf5al4Ycxm AS6Q== 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=08QvrHPKEN4GbCfMFC4QXPv5o40Q0NOGDJhtin5ahIA=; b=SdBEZMqFubS6HQWI9xjE57wOFfJtWY7vPSUoG4IA7ItTzsg0qJ3NGUezpDZw9SO6Px v7/C/gGjpRDE/KWP0yK61LhtbsPXzc7azk1jE2yQMdRT2p286UgocgsVPYW6ErSRxwBw sSiSPF9AydZRr7V2PWc14Pt1AhD7RsCs/Tt+b6vZAmfTvwClnhiMhlej0AA2GVXLs7dq lzHZVB4bquTCYXzvRYxuKdhRDvjzHwznFJJSo1gms39ox2VtojKPZWzG001tCTah8Lss NgT/B14nFKaDS1hRSEeG0aq3A6JqDeDvrnORepzXnvxZwQKS+EujdFzdADz2MM/Wh7HZ bSiA== X-Gm-Message-State: AOAM530IZ5ES24/5fVVJIwkUFPGADykP6fx1QVzcZjXIlk6PI6sCMB4T 3VtK/U8lyASxZQQVFE4tV0Bp4F4d2op3FsVI/7g= X-Google-Smtp-Source: ABdhPJyw9OTfF716itTQieo+AEhXCVEQF/0pFd9wT/wExvS9fFCMHYiHFRSEn8QVZMEsfjTK3tSqAQ== X-Received: by 2002:a17:90b:3105:: with SMTP id gc5mr312191pjb.225.1600190013205; Tue, 15 Sep 2020 10:13:33 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.13.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:13:32 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 09/26] osdep: file locking functions are not available on Win32 Date: Wed, 16 Sep 2020 01:12:17 +0800 Message-Id: <20200915171234.236-10-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::644; envelope-from=luoyonggang@gmail.com; helo=mail-pl1-x644.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 , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Do not declare the following locking functions on Win32: int qemu_lock_fd(int fd, int64_t start, int64_t len, bool exclusive); int qemu_unlock_fd(int fd, int64_t start, int64_t len); int qemu_lock_fd_test(int fd, int64_t start, int64_t len, bool exclusive); bool qemu_has_ofd_lock(void); Signed-off-by: Yonggang Luo 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 Tue Sep 15 17:12:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777341 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4750C59D for ; Tue, 15 Sep 2020 17:20:51 +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 0D70521655 for ; Tue, 15 Sep 2020 17:20: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="Jq1mkQJ2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D70521655 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:44654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIEdO-0006ex-2L for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:20:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEWv-0008Og-Df; Tue, 15 Sep 2020 13:14:09 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]:36413) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEWR-0002gn-Tf; Tue, 15 Sep 2020 13:13:41 -0400 Received: by mail-pf1-x434.google.com with SMTP id d9so2334469pfd.3; Tue, 15 Sep 2020 10:13: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=/tGNcDT+soty377wKryHTaQKgDiEnZiZY12oC2sg7jk=; b=Jq1mkQJ2oLMhp2/agRHxyXoYfMSJ+5X9wsHvMkKqB/FPDniLQbEwzb1MaqAPCXBGto oxqp9q9DdTfHYlmwse2STsfHylDjq0DNljfkRygpfdga7ffdbNUcoGm/uJhY7IhPoyxO H7CS8EGD9lPnhoaIkXCz2EWQ6zL0B+uTacBg8TFkHgJ8CTfy40Ng1Ae07D4Vs9UaAAaX SiJ63QQMQj7Yaecyc5UbVaQLhSB2OXvHcbjiaoZvd/8Ac+6bhVk9vBlyNMBfXlLbqQmp aQT2okwatv4D94OUgcJK8fmGHGHvlcYYwvTQQysjSYOqrdA1Sn1xd4kLE4RmFdqtkUUj Qyrw== 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=/tGNcDT+soty377wKryHTaQKgDiEnZiZY12oC2sg7jk=; b=BWm7Oz0TGO12UH+SE4LbY5x9RQiY3VIqgLRK3gYL9LGuhb2XG2BhvM2ScjwDd2M4b2 8XI4OzBvZVE2QGW4h4qc41zYYTjnfKSSEIV4u2Nh9TCTqQn+Yc7KoPWazLBiGsisNuxZ 0w3AUXY/taf8ScMocH2N54cK0OtdtnH2nySSUr9q0lCmc7nL2efNdtj+/18AlrrnoqsV MvUwAP5p1JPcGSu7i7TTxf+S+TUbd7zPDwtuZ/aT6uFM9SPy+erxRq9SAcW9amrRKPBD /VL09twyY+3cezxRkFmDMMs3LOYvCKUe9EFIP5U/fhC64e42l9aq8q3i5yrrHF7KnIEZ LKUg== X-Gm-Message-State: AOAM531swuFRDme8gvIc6ipmrgiIsHJfwLt1GPBkwj/543Lhuy8UCof+ olTDgNJTAzvwdPNnNAHIRHd9FovqF43EgXxOcbQ= X-Google-Smtp-Source: ABdhPJxVyVNPbviiIqqua7FhfGfCrzXlgGJVxXpcVhJSn6ZzxahgLTvN/kOC9huSBuvHZrx/eHuotQ== X-Received: by 2002:aa7:82ce:0:b029:142:2501:35cb with SMTP id f14-20020aa782ce0000b0290142250135cbmr2821403pfn.43.1600190017789; Tue, 15 Sep 2020 10:13:37 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.13.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:13:37 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 10/26] meson: Use -b to ignore CR vs. CR-LF issues on Windows Date: Wed, 16 Sep 2020 01:12:18 +0800 Message-Id: <20200915171234.236-11-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x434.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 , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Ideally we would use the '--strip-trailing-cr' option, but not being POSIX is a portability problem (i.e. BSDs and Solaris based OSes). Instead use the '-b' option which, although doing slightly more, produce the expected result on Windows." Signed-off-by: Yonggang Luo 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 Tue Sep 15 17:12:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777343 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C4B6B92C for ; Tue, 15 Sep 2020 17:22:11 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 620C52193E for ; Tue, 15 Sep 2020 17:22:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RPkKBwve" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 620C52193E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:50324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIEeg-0000cG-1V for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:22:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEWr-0008Og-8R; Tue, 15 Sep 2020 13:14:09 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:33077) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEWZ-0002h9-38; Tue, 15 Sep 2020 13:13:48 -0400 Received: by mail-pl1-x641.google.com with SMTP id d19so1682789pld.0; Tue, 15 Sep 2020 10:13: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=lgTEIoGQTMBZd1KdzUKViOu+UKgD2OOzWkZKgsEYCHM=; b=RPkKBwve+pqiSsH9ak06sYW2tgWckUqL/pefncMjn2P2aXLB9tQYBULN+cUtHA/qJJ jXLh2tx8Uwroc+ddkuhT23ypU8vR21JqXkZ50ZDszDKvU8zXam3RLXn+B5G4Pv9YQjUr euaCW30R5UObaME3/TAVkJcqXFNh718Zap72PEzGerKYNGDPGxTO4kfpjYSXH05HjTgN dzCJOe5f/12sb5EMXIo/v0uxytXOlLs5NV/aqJHyoH2SviI1DiEuQnbmbax1wNS9/XeP PV2S8TcEom24O0jgSm+03Q5d0OErozbWLMp3sqj3nM/y+st0mIYRnnuNhv9aDIgJZ5Dk ILsQ== 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=lgTEIoGQTMBZd1KdzUKViOu+UKgD2OOzWkZKgsEYCHM=; b=dcRpnoSzfEBTvDT+THvAW7lfnSkNC7x9cey1yBVVAZTCCcruyWRouynx1eBwh1uR2P E1Dki0cDFtzifrcm5Kinetj2SURtQI2fjdIh4p9gSyNkkx512KRu+4yBOJ463HR2hT5h 3fejkwjQAzuEm47fViWLmnxy4bH7cKaO9u/Q/HMsEJvSRuOeaXt9VckeuzPSGl0Vib6W m9poaYqWU9AXZVRaKntsz30Vcc6l5lBhiFY5UpVVHzKlc1CKgDix62SdqRTah9z+8pQq hBojV6j4gU8THFZ4+JOY+LHeGiQ6meouilxocwbJ7APr9LYfwACM30PSjmUQ4LLBitNu KBag== X-Gm-Message-State: AOAM530moYBR1G/DXKZgzr9Jm/e1FWFjmKuQ5gl93yXgxjUgKwq4HpYf 7L/uXmfRj8O/MCSv9owVB1SOqx+PtAVr6xOXPBE= X-Google-Smtp-Source: ABdhPJyOGBqh+wkNDSnf/uoel5ravMK4J6Hi9Vp5rGMl4c+zV/6NiqxgHhjTBiap5io+Mpt27hAxlw== X-Received: by 2002:a17:90a:d702:: with SMTP id y2mr344895pju.216.1600190022029; Tue, 15 Sep 2020 10:13:42 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.13.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:13:41 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 11/26] gcrypt: test_tls_psk_init should write binary file instead text file. Date: Wed, 16 Sep 2020 01:12:19 +0800 Message-Id: <20200915171234.236-12-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-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 , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.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. Signed-off-by: Yonggang Luo --- tests/crypto-tls-psk-helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/crypto-tls-psk-helpers.c b/tests/crypto-tls-psk-helpers.c index a8395477c3..11ae26368c 100644 --- a/tests/crypto-tls-psk-helpers.c +++ b/tests/crypto-tls-psk-helpers.c @@ -32,7 +32,7 @@ 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(); From patchwork Tue Sep 15 17:12:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777333 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7133B92C for ; Tue, 15 Sep 2020 17:16:32 +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 EF72720809 for ; Tue, 15 Sep 2020 17:16: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="F7OksgTp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF72720809 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:35502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIEZC-0002hC-UQ for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:16:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEWq-0008Og-UP; Tue, 15 Sep 2020 13:14:04 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:41979) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEWb-0002hJ-79; Tue, 15 Sep 2020 13:13:51 -0400 Received: by mail-pl1-x642.google.com with SMTP id m15so1680304pls.8; Tue, 15 Sep 2020 10:13:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1gV36UyFTTlxX7DXEu6PxeSpMxMsQkvp2T6CJZpr6M4=; b=F7OksgTpm4xikeAB6pUn0PKhkCG1HYdBdaPXKdxbUb99SsWP4jE7yUnm4N67Nfolxu JbnM7OtH/HNST9v+c+mU5emhsHYPY2idp6MImPtiAScrrS1oSxrRhyNlVEHkVUzvJUBz COFbfRD7pW7v9KL+9+YpsKkk++OINsCn2e4ogCGafz4WuO7GZP9gp2CQ3egJqGBEyouj txGslQk36y6WyU4mhKUfRosYnWXLfyyO355KkJdZx61a07BA/MQqnspLuxe3+1+sgE0t hDI7+pZzRZZ1KE7IfQOvnRTNPYuJYh052TOGRGNIG9NpGiOpx88PV4zRk2ZSPEWAkDTZ Q/5A== 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=1gV36UyFTTlxX7DXEu6PxeSpMxMsQkvp2T6CJZpr6M4=; b=bA6CGkWTEXYmwjPrMSnQS680i+vgIKkgGnQXl96m2PJnSHLIJeRWtLprKvc9ohiHZo qH6tfLhM3EGd0rDqVF2NThAfMCkif9VRNZrk+wG6g+zbRT5A08LNTt91eDhvubnr8wPK KNvEXfJBHFjugVc9QKKNyuCFPlHMVq0/198q9uk2re0XuFnxGWpVUlpknxPVwSKY7/24 ZJPh7Idcy4tQUu9TLSB49gdapQg82anbQvvIveeZV+nRfEo0L4/oiJTPOza7RhZVH4t/ 2BqxT+AvhMp9soGnBQy+FC5I67IFPkUUOwAkKz3dTA9Wpvs8WeAd4TsGSdABWkBjyQFZ yPqQ== X-Gm-Message-State: AOAM5312WVUubuVOVte2HZV6dDyKhUMQqEVuvIslNenqjyvhBgoi75kf 9DNrYrINJ0AfZAzy1gou4tgfulJzFGpJ8S5z5S4= X-Google-Smtp-Source: ABdhPJwV6SF6ayVlN/bS2iA+A1VgY8x4f0Zl2KkFnmb7Te9lvBJ+8x9LG6RqMfZlP5CYAS7F+xSgyw== X-Received: by 2002:a17:90a:cf07:: with SMTP id h7mr344735pju.142.1600190026608; Tue, 15 Sep 2020 10:13:46 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.13.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:13:45 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 12/26] tests: Enable crypto tests under msys2/mingw Date: Wed, 16 Sep 2020 01:12:20 +0800 Message-Id: <20200915171234.236-13-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-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 , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Fixes following tests on msys2/mingw 'test-crypto-tlscredsx509' test-crypto-tlssession' 'test-io-channel-tls' 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. Use g_remove instead unlink Use g_mkdir instead mkdir Signed-off-by: Yonggang Luo --- include/qemu/osdep.h | 1 + include/sysemu/os-win32.h | 5 +++ tests/crypto-tls-psk-helpers.c | 4 +- tests/crypto-tls-x509-helpers.c | 6 ++- tests/crypto-tls-x509-helpers.h | 5 ++- tests/test-crypto-tlscredsx509.c | 47 +++++++++++--------- tests/test-crypto-tlssession.c | 64 +++++++++++++++------------ tests/test-io-channel-tls.c | 49 +++++++++++--------- util/osdep.c | 16 +++++++ util/oslib-win32.c | 76 ++++++++++++++++++++++++++++++++ 10 files changed, 197 insertions(+), 76 deletions(-) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index e80fddd1e8..dd4c63e4b6 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -499,6 +499,7 @@ int qemu_mprotect_none(void *addr, size_t size); int qemu_open(const char *name, int flags, ...); int qemu_close(int fd); +int qemu_link(const char *exist_path1, const char *new_path2); int qemu_unlink(const char *name); #ifndef _WIN32 int qemu_dup(int fd); diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h index 3ac8a53bac..8863833f67 100644 --- a/include/sysemu/os-win32.h +++ b/include/sysemu/os-win32.h @@ -194,4 +194,9 @@ ssize_t qemu_recv_wrap(int sockfd, void *buf, size_t len, int flags); ssize_t qemu_recvfrom_wrap(int sockfd, void *buf, size_t len, int flags, struct sockaddr *addr, socklen_t *addrlen); +#undef socketpair +#define socketpair qemu_socketpair +int qemu_socketpair(int family, int type, int protocol, int channel[2]); + + #endif diff --git a/tests/crypto-tls-psk-helpers.c b/tests/crypto-tls-psk-helpers.c index 11ae26368c..6f82bfceb2 100644 --- a/tests/crypto-tls-psk-helpers.c +++ b/tests/crypto-tls-psk-helpers.c @@ -26,6 +26,8 @@ #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) @@ -44,7 +46,7 @@ void test_tls_psk_init(const char *pskfile) void test_tls_psk_cleanup(const char *pskfile) { - unlink(pskfile); + qemu_unlink(pskfile); } #endif /* QCRYPTO_HAVE_TLS_TEST_SUPPORT */ diff --git a/tests/crypto-tls-x509-helpers.c b/tests/crypto-tls-x509-helpers.c index 01b3daf358..051f045657 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); + qemu_unlink(keyfile); } /* @@ -501,7 +503,7 @@ void test_tls_discard_cert(QCryptoTLSTestCertReq *req) req->crt = NULL; if (getenv("QEMU_TEST_DEBUG_CERTS") == NULL) { - unlink(req->filename); + qemu_unlink(req->filename); } } diff --git a/tests/crypto-tls-x509-helpers.h b/tests/crypto-tls-x509-helpers.h index 08efba4e19..0856934a70 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 diff --git a/tests/test-crypto-tlscredsx509.c b/tests/test-crypto-tlscredsx509.c index f487349c32..62d5d2defd 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); + qemu_unlink(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); + qemu_unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT); + qemu_unlink(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); + qemu_unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT); + qemu_unlink(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); + qemu_unlink(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); + qemu_unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT); + qemu_unlink(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); + qemu_unlink(CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT); + qemu_unlink(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"); + qemu_unlink(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..0fcd0789f1 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( @@ -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); + qemu_unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); + qemu_unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT); + qemu_unlink(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); + qemu_unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); + qemu_unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT); + qemu_unlink(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); + qemu_unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); + qemu_unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT); + qemu_unlink(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); + qemu_unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); + qemu_unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT); + qemu_unlink(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"); + qemu_unlink(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..851dbb26e3 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/" @@ -127,29 +131,29 @@ static void test_io_channel_tls(const void *opaque) #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); + qemu_unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); + qemu_unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT); + qemu_unlink(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); + qemu_unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); + qemu_unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT); + qemu_unlink(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); + qemu_unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); + qemu_unlink(SERVER_CERT_DIR QCRYPTO_TLS_CREDS_X509_SERVER_CERT); + qemu_unlink(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); + qemu_unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CA_CERT); + qemu_unlink(CLIENT_CERT_DIR QCRYPTO_TLS_CREDS_X509_CLIENT_CERT); + qemu_unlink(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); diff --git a/util/osdep.c b/util/osdep.c index 4829c07ff6..3d6f827cd6 100644 --- a/util/osdep.c +++ b/util/osdep.c @@ -370,6 +370,22 @@ int qemu_close(int fd) return close(fd); } +/* + * Create a symbolic link file from new_path2 to exist_path1 + */ +int qemu_link(const char *exist_path1, const char *new_path2) +{ +#if defined(_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 +} + /* * Delete a file from the filesystem, unless the filename is /dev/fdset/... * diff --git a/util/oslib-win32.c b/util/oslib-win32.c index f2fa9a3549..5fedd1194a 100644 --- a/util/oslib-win32.c +++ b/util/oslib-win32.c @@ -839,3 +839,79 @@ size_t qemu_get_host_physmem(void) } return 0; } + +int qemu_socketpair(int family, int type, int protocol, int channel[2]) +{ + struct addrinfo addr_data; + struct addrinfo *addr = NULL; + int sock_listener = -1; + int sock_client = -1; + int sock_server = -1; + + memset(&addr_data, 0, sizeof(addr_data)); + addr_data.ai_family = AF_INET; + addr_data.ai_socktype = type; + addr_data.ai_protocol = protocol; + if (getaddrinfo("127.0.0.1", "0", &addr_data, &addr) < 0) { + goto error; + } + + if (NULL == addr) { + goto error; + } + + sock_listener = socket(addr->ai_family, + addr->ai_socktype, addr->ai_protocol); + if (sock_listener < 0) { + goto error; + } + + if (bind(sock_listener, addr->ai_addr, addr->ai_addrlen) < 0) { + goto error; + } + if (getsockname(sock_listener, + addr->ai_addr, (int *)&(addr->ai_addrlen)) < 0) { + goto error; + } + if (listen(sock_listener, 1) < 0) { + goto error; + } + + sock_client = socket(addr->ai_family, + addr->ai_socktype, addr->ai_protocol); + + if (sock_client < 0) { + goto error; + } + + if (connect(sock_client, addr->ai_addr, addr->ai_addrlen) < 0) { + goto error; + } + + sock_server = accept(sock_listener, 0, 0); + + if (sock_server < 0) { + goto error; + } + + closesocket(sock_listener); + + channel[0] = sock_client; + channel[1] = sock_server; + return 0; + +error: + if (-1 != sock_server) { + closesocket(sock_server); + } + if (-1 != sock_client) { + closesocket(sock_client); + } + if (-1 != sock_listener) { + closesocket(sock_listener); + } + if (NULL != addr) { + freeaddrinfo(addr); + } + return -1; +} From patchwork Tue Sep 15 17:12:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777327 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B1F1659D for ; Tue, 15 Sep 2020 17:15:43 +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 4F880206DB for ; Tue, 15 Sep 2020 17:15: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="I9EE2F0F" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F880206DB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:34022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIEYQ-00024n-5b for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:15:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEWq-0008Og-Jd; Tue, 15 Sep 2020 13:14:04 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:46099) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEWe-0002he-Vl; Tue, 15 Sep 2020 13:13:57 -0400 Received: by mail-pf1-x42c.google.com with SMTP id b124so2287957pfg.13; Tue, 15 Sep 2020 10:13:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rY6yNgCy25oDmt+nU7EZEt8FaOeANESnxbsMxWp5WF0=; b=I9EE2F0F8I9O7/i3HuRMJx+r20C8zSqL3qiMbhqP6oSav96x4Z89VvUvTR5M2f9eu2 m1Vjad7WWDkjLFhs+4XF/3ZzrckQnQBYNUBto8zbp6ESMLDGraTWx6f3IiOBbPsbpkWI +d/6Zw2gaZ1V/Tb5dIxMzFfp9GyKukEhWLklHKh4twQgO/HHtUdlEd8dhs2xiAhT+BHp 2fGXLpGDuTz2vdmXPqdXyxPL/qQ3DrCGhlWiAexvr7DqrXBY29axUD7ujFujcldp/qTj AFI6eAf3AdM4pymyi6L1RxjmrlIRmvK3C/W1ocXFy2feSx58kr/NsrVCD9oN5uXWMFgC BRtQ== 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=rY6yNgCy25oDmt+nU7EZEt8FaOeANESnxbsMxWp5WF0=; b=tUsLc7Oejge8Z4UTOOdmgF83mPVXwd57tmhl5vVJB0BI7tCBPi7bHQFNd6BZj2G4b6 5KJShbHbBavTnE+6YNTyicwyk32p3KEl1VQLz2FWEk4KoXsffOGArt89N9P5ay2RIJ/W /ZO5Ihk5Eu//NCbTlmbli452Vka+ecpEusxUtDlKAvZaBXM1chD2sAb8U4iidqvsoqzu 926nXYXXPPaDYsmT5R0N7cfTn/aE6+3OVP3Mux64rdAKHmXSAG+lqqdL9c26TBeqKkDr mZFSPLm/g2s29rkrHxI6mdxttDvaEaYLp+bCNYpUtZhkik+l6ErSPTPstqKz0ZcdffW7 JwDw== X-Gm-Message-State: AOAM5310Y9lZjOCSOZEn19BT3O6hbDqC8ACtUeU0aLZCFcUJKqrKEv/8 RUsImmiR6MSm0m1PXn+ewt4hZ+H4BMhiv0edYps= X-Google-Smtp-Source: ABdhPJzEtNRduQmGwI4ajbu/PGg6XRFf39ze0bYHCtD2ZDXy++mzgxZMu7FZ2fxaGbdSTBKZVGNfQg== X-Received: by 2002:a63:500e:: with SMTP id e14mr15326207pgb.36.1600190031007; Tue, 15 Sep 2020 10:13:51 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.13.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:13:50 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 13/26] meson: remove empty else and duplicated gio deps Date: Wed, 16 Sep 2020 01:12:21 +0800 Message-Id: <20200915171234.236-14-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x42c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrangé --- meson.build | 6 ------ 1 file changed, 6 deletions(-) diff --git a/meson.build b/meson.build index 690723b470..23cb1b8742 100644 --- a/meson.build +++ b/meson.build @@ -317,7 +317,6 @@ opengl = not_found if 'CONFIG_OPENGL' in config_host opengl = declare_dependency(compile_args: config_host['OPENGL_CFLAGS'].split(), link_args: config_host['OPENGL_LIBS'].split()) -else endif gtk = not_found if 'CONFIG_GTK' in config_host @@ -344,11 +343,6 @@ if 'CONFIG_ICONV' in config_host iconv = declare_dependency(compile_args: config_host['ICONV_CFLAGS'].split(), link_args: config_host['ICONV_LIBS'].split()) endif -gio = not_found -if 'CONFIG_GIO' in config_host - gio = declare_dependency(compile_args: config_host['GIO_CFLAGS'].split(), - link_args: config_host['GIO_LIBS'].split()) -endif vnc = not_found png = not_found jpeg = not_found From patchwork Tue Sep 15 17:12:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777337 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 50EF459D for ; Tue, 15 Sep 2020 17:20: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 C5D352193E for ; Tue, 15 Sep 2020 17:20: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="Z06O4jcs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5D352193E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:42212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIEcZ-0005Xt-63 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:19:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44268) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEWq-0008Og-9r; Tue, 15 Sep 2020 13:14:04 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:44474) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEWk-0002hu-5o; Tue, 15 Sep 2020 13:13:59 -0400 Received: by mail-pf1-x442.google.com with SMTP id o20so2298162pfp.11; Tue, 15 Sep 2020 10:13:57 -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=Z06O4jcs7TnjWam6CQiD+oDN+H3jK8W6P9MnTQ/On7fM/A+0qSvnApVR1Chpggtpdf 3DsjvPOBG0HVDMTZ4oTSh/hZqEdpX4BS/B6Z/76rnjkvDroXxfOAJi721f60hcI2Fch8 1bM6KY5BTBylQCiFjBIrzkcbDzYPu+eF2VX7iaXyQXRShF3daq+KtuKaFGvP6f7v63jl UoIJ6yVr/wpb09ndXnQtiTpIbHisCewzFc2R0Q1fMD9mR4V65K9JD7ChiZ+WJSDal7u9 CEw/9+4s3mqk3A+jlS8Aw4IXb7uIoBgWRqRVlZUW60Tt0xYSFmrb1d368GKi21IuWcui K6dQ== 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=TEBuhQCBv0ryCHWijzbaodqryektbRGmeDW+7hsScBcgp9I/ghBKZVdWL+RZAEBlUr cVem2DCTcHZZfnUo1K7wq3HGkBIfsnCNzl0EHXC8X9YDnNsE6vkHHdX/7yYAbWwQRR97 nCTAHpgmPv+RFn6dCu8Mzq4JrG76iA4czgjUO6CZqODffC5Zl7Hl/q9WQvgmW1Tb46WD rU8MKAS4vWDASxHYM3wfkw/aUxGU0XuaW3Jeq6tCralXLDZNQCe6/q1rMRqz/elt54zn auv3/p4yiHZ4ZR4BSddhL8TaLFXlfL03Ftme5cZZ5N98VgcXFchPIrzzuGonb2VU+5tJ YmHg== X-Gm-Message-State: AOAM531ekM6OPFKrA3h6+QUHY4XOQIXA7eOqF3KbA6Rs7bQhTKhA+UBH HdwlukcgEs+DFaDNXfieWHWbxSIdaDbOcLLVVtY= X-Google-Smtp-Source: ABdhPJy0tAx8M5sj0/vlD968nR/+m+ZXUUX7TAFatmRqO0sf6cAVdgj+oPyUnDcTxB2BiWIKc6aivQ== X-Received: by 2002:a63:3441:: with SMTP id b62mr15272736pga.191.1600190035704; Tue, 15 Sep 2020 10:13:55 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.13.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:13:54 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 14/26] vmstate: Fixes test-vmstate.c on msys2/mingw Date: Wed, 16 Sep 2020 01:12:22 +0800 Message-Id: <20200915171234.236-15-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-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 , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Wen Congyang , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The vmstate are valid on win32, just need generate tmp path properly Signed-off-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth 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 Tue Sep 15 17:12:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777369 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F09E559D for ; Tue, 15 Sep 2020 17:27:55 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B4EAC208E4 for ; Tue, 15 Sep 2020 17:27:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iVTNEhXM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4EAC208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:42832 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIEkE-0000ww-S3 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:27:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEWy-00006l-4y; Tue, 15 Sep 2020 13:14:12 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:45701) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEWv-0002jn-DR; Tue, 15 Sep 2020 13:14:11 -0400 Received: by mail-pf1-x444.google.com with SMTP id k15so2295824pfc.12; Tue, 15 Sep 2020 10:14:06 -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=xbLEoF58D0tbgLJVVq5i1Stm39rTFIriYnuaDpYR+rE=; b=iVTNEhXMG+bRZESTBYZsOV+SeL1rGr6PS5e1uglyXscZlQbzAoEwZNzyo1HfcGukXH 6g71QcC2ypIGPFJv9jFE69wKpCHhCufo/LPH1JsplLStUQZ96HjkZKQixmulUPa0Qvvy Nz2AllzRK4ZC+bLTs3k89XhPf0oiB6K8lqbFEPz9CsAjV/nrxLy13mzw1hkqVziUmt+V rqWDENh7/w8vWvgwX4ByDQeEcUJoT07epQeZxMVsXA5zlHGWQ6i/FOyL5hP1BHtR6uMm voz5JcfDj2FHsj70+8uiVRe8wcde9SOnLx7A2RJL4cQo5UHIbaTNbmZ9yIB0EbL4NGHs LVTA== 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=xbLEoF58D0tbgLJVVq5i1Stm39rTFIriYnuaDpYR+rE=; b=g4kJtZYuO6HzkqeeUGNEh7HDUa+rsSlut/6zM2IlEjLbtwmTXz2NgoP5xSLZgWm2/H N5uS+uD15uAEIWHV9uZqORcFkci2t1hCE9/67QwjDDNWh99EmRFJR6io70cvnFiXrhb2 agNKzOd1PXhBgFElTUhRr9NnkQSAwwQnytmSpiN8GgQH2tuY+NYJq1UfTcyDsiue1q1V miPlBGFanwElJKdNl6dwP8jTh08kwwLPLym5Gq6bZmLXEzVAUVW56a90AiK/w+C9+Y6j 8j1Ed+FCaI12Oqd2/S0SJWvGzdJed1+V8/okdouPur6+4sBJsHL0C4Nt4zmoa7+55EV7 Vp3A== X-Gm-Message-State: AOAM530Oa/9Q+zO2IlV+8Lj7a7iS4+rb2a7F8E17yXteaw7BDgvgNpx3 Uz+PvZZSX8seAIFIe9ChfJWq+1dAjSmS7yThnUo= X-Google-Smtp-Source: ABdhPJzibWTPBroSY9dCwgfmTmEbO7hmur3M9u69JcqpQFdXr2JTXJ04mkZV0aFdrau8zw9YcsgXdA== X-Received: by 2002:a63:3046:: with SMTP id w67mr15184957pgw.45.1600190044765; Tue, 15 Sep 2020 10:14:04 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.14.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:14:04 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 16/26] tests: Convert g_free to g_autofree macro in test-logging.c Date: Wed, 16 Sep 2020 01:12:24 +0800 Message-Id: <20200915171234.236-17-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-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 , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test-logging.c b/tests/test-logging.c index 8a1161de1d..cec18b31b4 100644 --- a/tests/test-logging.c +++ b/tests/test-logging.c @@ -196,7 +196,8 @@ 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 +213,5 @@ int main(int argc, char **argv) rc = g_test_run(); rmdir_full(tmp_path); - g_free(tmp_path); return rc; } From patchwork Tue Sep 15 17:12:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777359 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C3A4559D for ; Tue, 15 Sep 2020 17:24:41 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8404B21D24 for ; Tue, 15 Sep 2020 17:24:41 +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="XeAlc+PN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8404B21D24 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:59334 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIEh6-0004NC-Lc for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:24:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEWz-0000BW-PO; Tue, 15 Sep 2020 13:14:13 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:39801) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEWx-0002kP-Ud; Tue, 15 Sep 2020 13:14:13 -0400 Received: by mail-pl1-x642.google.com with SMTP id x18so1684450pll.6; Tue, 15 Sep 2020 10:14:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ks2bOk3jYOHrXnI/Shz64S+t7ePZagOpQ3Ju/TypT6Y=; b=XeAlc+PNskaW0TsZ6wLSwzkO++M5no96XeJ+BEymzqQbQyRrQjLye3CKjeThyHurM3 jMSjq7/wSn0j04Fs8ltK/W93arJt3LEx4FXG5xGgEHklDp/fy3OrYG8npnZ+uJAsVEBn Bapo8/95FR2Cz2HYlunAVqVwOpGBlOtEWKYr7N/qYenzaRIg8OPzU6KRZLIhyLt7AWZd LCq1G16s3xPT2rKngq7rk/OiToDkTPCMzQrqND9Glx/xwwh18oKVUhobsFl83MAye/h9 N/sEsIH8ONflK4/1FPKWa/O9TKJzLov8JoUQdd1pI3jxQG9OPgPomBBA7GiRd2bw3Ibe FEFA== 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=i4E+g+tTEFmYRckQsJxJ+S3CmMbwVgs5sjgXPHUV/WQ0ANjDB+dN6LPV4ZlC1K+gil /scOOIOvQk9YD3/AYXKP3BFCRGlo/43p8Jiiqo80w+lMPzt6QobraCKu6jxJ15CvLsjk SO9LM75rvSGFKsxfpsjI5S6uj0r2HmNZv60TMzyCCH01ZYiyB4HuT61eVWlayN0lb8nA 6Pg9qYtCL1Fv/bZm3qNB/mScUTJtEBngCwQMKCxYu+3FMOF+SjZFsPiG5LZ+f/L//46B mVQ7sZfIPCS7DCN0Hnsw1MXiZRk1V9Ec1B3XZmmzelyQGXqveuVDQrQxVg5q/MOyYcSF dUdw== X-Gm-Message-State: AOAM531Pb3MGiVckCLVf4PVK4RowFjtKaCmuOA/VPSqSx+1a8tKZtR4a uL2/XyH+X7BztPsVkPpt7i7elgohoXun9eja+es= X-Google-Smtp-Source: ABdhPJyQUTmkgKkJ0fvFp+YpueSlTJkES3GO1mJnS623YpWVGo+0LQjZT389u14+Cyo248jBEGgUsQ== X-Received: by 2002:a17:90b:198:: with SMTP id t24mr324950pjs.107.1600190049739; Tue, 15 Sep 2020 10:14:09 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.14.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:14:08 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 17/26] tests: Fixes test-io-channel-socket.c tests under msys2/mingw Date: Wed, 16 Sep 2020 01:12:25 +0800 Message-Id: <20200915171234.236-18-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-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 , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.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 Tue Sep 15 17:12:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777373 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2DACD59D for ; Tue, 15 Sep 2020 17:29:29 +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 D67B620936 for ; Tue, 15 Sep 2020 17:29: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="DllhcBBe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D67B620936 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:48182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIElj-0003LR-JL for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:29:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44392) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEX5-0000MH-8Y; Tue, 15 Sep 2020 13:14:19 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:33798) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEX2-0002ml-8R; Tue, 15 Sep 2020 13:14:18 -0400 Received: by mail-pg1-x543.google.com with SMTP id u13so2350067pgh.1; Tue, 15 Sep 2020 10:14:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=D1eG66LWD77lH+Q6AzbFEnvntWYqDrWcfIHAjIFyRnM=; b=DllhcBBeBp4NeXwQNYzsq1O0KcLC/SMjkGdsydBopPl/p/YIcsG0VYkzXKNy+uocQM 5XRGVaGy4QW1yp83tCRD0lcpaARM9RlT6dHs1rPkFox+byWXAKGfqg9liFmiKMyyGl/l 9+TijINxNYMAVUp/dV2znQ9Lu0AWqqf7yXaoTrtPzFQRHiFHYXLO5CdUg6BWX8DWipVG tmWajfPmUFhxapOzlOz54N9eTAuBJ4GDPmmciL7iSzgf+K2T2qlG5ZoOTBBosRCaiWBH bDeJKqffqPlrnMpM75NgOj/Ke6FrVlEwxtM7D8StT9pwZKukRrt//YLScMgenaQJ9MhG 6s2w== 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=D1eG66LWD77lH+Q6AzbFEnvntWYqDrWcfIHAjIFyRnM=; b=cs458MVAa/tGY+NYAE6WplkLpCQCte1gWq5W3bZ9vmuFYFvbU00BouMttl63XCjOO/ SfQbhUsbMndwkAPoCCEk1vohrb93GvOG8kiM7Eefs8HhjC6El+hDOOM1VKtfnS2HoaQK 3t8OuDgXICnyC5CC5ssRZEFmQdztbcrWX275ODoUhaKHQ+sv89lwkw8aX20VfCgUbJuk zXjbR5qKTLebB/N8Qt3eMubM+YsMiPGj6HondwEQCFOWRBbOkYLu+sF4gyS1TxM9nb7V AR6QmF/AHCQe45oxs95vqb/rGL2V255oJUt3SjqI3xJc0QBSACiOdsI7ohwFEwrOKwtn xdag== X-Gm-Message-State: AOAM530wdBoG+lUW57THJNrIhfgzE7tLbEcEnQSs77rZq6Wgv7Tu4v+S aH8l3+BFBeuO//IRcHOUMWhBRHIsUZuFYmqxREo= X-Google-Smtp-Source: ABdhPJxhzDmLlQq9PkzylezSJDeSCoV3VrYUaN+OhZ6hy6B+WVO1U9bEk4k1IeGuONQoJ/lA3eRKKw== X-Received: by 2002:a63:dd0f:: with SMTP id t15mr15751507pgg.123.1600190053946; Tue, 15 Sep 2020 10:14:13 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.14.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:14:13 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 18/26] tests: fixes aio-win32 about aio_remove_fd_handler, get it consistence with aio-posix.c Date: Wed, 16 Sep 2020 01:12:26 +0800 Message-Id: <20200915171234.236-19-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::543; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x543.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.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 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/util/aio-win32.c b/util/aio-win32.c index 953c56ab48..49bd90e62e 100644 --- a/util/aio-win32.c +++ b/util/aio-win32.c @@ -37,6 +37,16 @@ struct AioHandler { static void aio_remove_fd_handler(AioContext *ctx, AioHandler *node) { + /* + * If the GSource is in the process of being destroyed then + * g_source_remove_poll() causes an assertion failure. Skip + * removal in that case, because glib cleans up its state during + * destruction anyway. + */ + if (!g_source_is_destroyed(&ctx->source)) { + g_source_remove_poll(&ctx->source, &node->pfd); + } + /* If aio_poll is in progress, just mark the node as deleted */ if (qemu_lockcnt_count(&ctx->list_lock)) { node->deleted = 1; @@ -139,8 +149,6 @@ void aio_set_event_notifier(AioContext *ctx, /* Are we deleting the fd handler? */ if (!io_notify) { if (node) { - g_source_remove_poll(&ctx->source, &node->pfd); - aio_remove_fd_handler(ctx, node); } } else { From patchwork Tue Sep 15 17:12:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777403 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6DB2659D for ; Tue, 15 Sep 2020 17:32: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 17138208E4 for ; Tue, 15 Sep 2020 17:32: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="X4ec9xfh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 17138208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:56322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIEoC-0006yt-1g for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:32:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEXC-0000Oo-8s; Tue, 15 Sep 2020 13:14:26 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:38861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEXA-0002oC-4D; Tue, 15 Sep 2020 13:14:25 -0400 Received: by mail-pf1-x444.google.com with SMTP id l126so2325041pfd.5; Tue, 15 Sep 2020 10:14:20 -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=N0CxQxe/b50XIpbJDMgmSIuHeuMl2xPGe6WVLBKj7/I=; b=X4ec9xfhTYwWWoycPymRsJzDlroDiGypg7SybTNgG29AA74FBsgOIezu+JSi/pAuiO rSldTB7JF3GIHAgjuiDTKXe+aoI9+PKZUdEJRrYo63cEJ9aiDM357sekmLgKOu/qny9E NUvHPWEIpE62Dr/lEfIvbOZdjTOIr7twNGtzbefWYALwaci7xGoeyvl8hePPysyFOGMl QY8SgWbtmqWuMoUSSp3ESffrl9LaT+2rwMSCbUm8fNbcrBfCe8W8vo6Zv0e8bOsBH2Ly H2OUtx3lBST1HMeLC8WsPlVSr6zz0o4OYI5NiXzp/V4sitKorFoMiS9qTnavMKLfnYxm zrMA== 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=N0CxQxe/b50XIpbJDMgmSIuHeuMl2xPGe6WVLBKj7/I=; b=P/c29KNs5SnADZ7Vlv9mie8gDT61TZWJ9DRNqmtFzNHtGJMPM9Hf9dj01Ac4f9ffNG /uiLJ0UqLJjxbojR/ZDJ4SWAuZ9CuLBmcdhHYIStn7561AxxLob5D7HLC3TsCJ+n23HH 2OEz4EPYNkaQB9Q5c+mA095eaPl/SmYbMAKGqy6A1XLlyWGCrw3MOxSkzlgKhMFWRaU/ RXuAooyFgQHMBqlWL/igddI9oXJRcTVM8fDzPMI9Qj3jRXbzWyo/XS7PXQV+ww/NMzBm b7imKq2tXIw8C4/AqIUwcza0Jhk/LydwzcmI/GyYLd3P3JuOoHnGvelKLo6ZC5Ad1ArN LOHA== X-Gm-Message-State: AOAM532O6sbIUNYM4MejFk8jkz18JtC1mcfKJLy0BBdOfpd0KJRN24sh TidEgkGmK3unTxpwYyNLyjY/dphTd2H3kHoof5I= X-Google-Smtp-Source: ABdhPJzmlKPO8jxXrIYh2v55JgQG5vTp+HFKWwQaNhkAoDOQv4NiOUTEFguYEuqxQG+82S1K2/ui+Q== X-Received: by 2002:a63:5119:: with SMTP id f25mr15220778pgb.351.1600190058472; Tue, 15 Sep 2020 10:14:18 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.14.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:14:17 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 19/26] tests: Fixes test-io-channel-file by mask only owner file state mask bits Date: Wed, 16 Sep 2020 01:12:27 +0800 Message-Id: <20200915171234.236-20-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-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 , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.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 Reviewed-by: Daniel P. Berrangé --- tests/test-io-channel-file.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/test-io-channel-file.c b/tests/test-io-channel-file.c index bac2b07562..0aa0477541 100644 --- a/tests/test-io-channel-file.c +++ b/tests/test-io-channel-file.c @@ -28,6 +28,16 @@ #define TEST_FILE "tests/test-io-channel-file.txt" #define TEST_MASK 0600 +/* + * On Windows the stat() function in the C library checks only + * the FAT-style READONLY attribute and does not look at the ACL at all. + */ +#ifdef _WIN32 +#define TEST_MASK_EXPECT 0700 +#else +#define TEST_MASK_EXPECT 0777 +#endif + static void test_io_channel_file_helper(int flags) { QIOChannel *src, *dst; @@ -56,7 +66,7 @@ static void test_io_channel_file_helper(int flags) umask(mask); ret = stat(TEST_FILE, &st); g_assert_cmpint(ret, >, -1); - g_assert_cmpuint(TEST_MASK & ~mask, ==, st.st_mode & 0777); + g_assert_cmpuint(TEST_MASK & ~mask, ==, st.st_mode & TEST_MASK_EXPECT); unlink(TEST_FILE); object_unref(OBJECT(src)); From patchwork Tue Sep 15 17:12:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777375 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D34E392C for ; Tue, 15 Sep 2020 17:29:53 +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 7DEE2208E4 for ; Tue, 15 Sep 2020 17:29: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="e/x3Lzod" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7DEE2208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:50872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIEm8-0004a1-I7 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:29:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44426) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEXD-0000Rx-Rf; Tue, 15 Sep 2020 13:14:27 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:36261) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEXA-0002oI-Vb; Tue, 15 Sep 2020 13:14:27 -0400 Received: by mail-pg1-x541.google.com with SMTP id f2so2340287pgd.3; Tue, 15 Sep 2020 10:14:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BErOzaIvgNGZoOo8yO9vO+FZKR44ZCkaFrgaQmO82bU=; b=e/x3Lzod00HgETlq35+17SwdTop0OKWrkC7+70odDZFnLSDrKBU1BQ5NvQwG5O/olX LwN5BYbHKeqjf6yMLTK7Km8lk2oxuw9mOiLkdc+w5/dxe4Ty5NBL1o8BAFTZg3AEzSpQ yi81HQyXCeyNnl+fKRRbgB5yBYaLL4LBjZcoUeZ2NYfrix8HCj44MWOiqjBGaFE8ckP7 wR8YAbGX1ltQSrLvTrUURTIDBfBECCEeGhSruFCzkcYgka2Lv0jBxwjVuIfF4US99kta ao+rGxXLmUqLScbKoiK5MG/x3SpluTiQ+fUMIDWciZM6agBL9eOBlJj+oP84OOXsgsDE G1IA== 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=lj60icJYi81cDjHSYGLw5DNpwPz5lvNfhn0FdSFkflr5X6Iy0Nen1Irrdqc7UILJLu emOcmbLqfGdAasDKJBqF4uLms6sCLNT8wUCopmVKc8Bza6XvR0yrdNNsdeJWg7x8rdaC KhQgWHgbmfk4dKSB8Y8HxXN5P3wfFcHnTF9PFtOU67t4kECYJqPAYW3wEh24l5zcdcOY gBh2Dl0YlGjxNCnGYjrZ8SIhjg8oi9ldrMo7q3YZp5GRLxRzxxLU2D3wkV0aD2euHgbR yUQcREQ05dHFaf4KI3/fw/ufVKgm/fuh/PKRjWwtfjYedzUXC2L9eau7ixGjSsj4xkMi HGTQ== X-Gm-Message-State: AOAM530SJ2ooaf8J8ZIZ9+k+0ky/ZPdUx0w0nJdRgQrdh0PvlCuLAEEA fxAFHX2qfgNvfFCOJNightwyJ5yvb1YmwKFZNTc= X-Google-Smtp-Source: ABdhPJzX265HoBwP/EHU6L4JZsBaiChcDbTJsOx1ZvaBkV9uHXykdxmzsYsNvchw+V/NZr83OBCNQw== X-Received: by 2002:a63:e057:: with SMTP id n23mr14534585pgj.87.1600190062880; Tue, 15 Sep 2020 10:14:22 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.14.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:14:22 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 20/26] tests: fix test-util-sockets.c Date: Wed, 16 Sep 2020 01:12:28 +0800 Message-Id: <20200915171234.236-21-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-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 , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.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 Tue Sep 15 17:12:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777409 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7845E59D for ; Tue, 15 Sep 2020 17:33:43 +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 23EFC208E4 for ; Tue, 15 Sep 2020 17:33:42 +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="nLrw10xa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 23EFC208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:34068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIEpp-00011S-Rz for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:33:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEXL-0000V1-LM; Tue, 15 Sep 2020 13:14:35 -0400 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]:38982) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEXG-0002ox-25; Tue, 15 Sep 2020 13:14:35 -0400 Received: by mail-pj1-x1043.google.com with SMTP id v14so118041pjd.4; Tue, 15 Sep 2020 10:14:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ISfeCpjoQz41XYkDVzSwja5AQEtv40E6VBUlsI12dS8=; b=nLrw10xaWy9aDQN10gIc5soSu5ktnEn4bsfPQ4qCecFA3RpXGhS0TOJOwzMtmf3+HS UOgB7ukxVCSqyXtSLjbK0lSVWcRodequVDq5rVG+nRHMQv+D02sAsMYA1aZNTYgXk2TG KLTs67FpWQo595nktD8xmjqGOM4l4u1YzAqEthWmqopoxF41U5aSTdujIitEoF8sIhbG XH8JgD+z5+i90FDwA2uidoVJbdIsoN8CH3KrOY07wksLMt3nTduLrGUztjuJ7q/q4Joi jFf6GKwqgCHABuT8B9L2pHiyAfmvYM6ZvtUkkd45Sydfo0ZpvbbSkowHMeYYHtgiAeGx Nt+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ISfeCpjoQz41XYkDVzSwja5AQEtv40E6VBUlsI12dS8=; b=Zb1Cn1ddv+10OF8xh8exFL08OUj9p3qor9TuHdBcS3sya0fRKmjGHXK8TrdgKw0XAF P8ko3JVwzbNvUcQ234ZLYRgm5liRoJlDOJFUZmSdWhLAUklqwrvenGbKrnSR16OSQmj6 2FdbXwE2qjl77XTKoZFJgRVSibhFfNmhA2sSghNLbUjEWI1M/I/FzS6j5qLaWSAFH/gg 2Naum2TSEUMP+JEjTe9XRywPS6W4LuyULeLHQzCHecQM/GlDMQj9sQFbW2c70w/gmfhk T6kVIdRVEQ/0meH6RgXrJ4Uh5tdUJp2Z3WlqChGOzlHerjbFrQPWJ+eBNhXEMO6trmZz 9vAw== X-Gm-Message-State: AOAM531r66yTXpWbLjjQFbxTqGnGpKMcd/hTJgZTy735mfDV6JuibXcX 67ZgXns99mH/XH6xgXw41s+6iHeRkepP/6GIJ0A= X-Google-Smtp-Source: ABdhPJxh9aFKnxyu9itFoD/F+X7J59o+rlYXjZ4OpcSekFovPAnrR9x5REgZRor0TrmHpKWDBp0usA== X-Received: by 2002:a17:902:fe84:b029:d1:e598:3ff6 with SMTP id x4-20020a170902fe84b02900d1e5983ff6mr2768151plm.48.1600190067267; Tue, 15 Sep 2020 10:14:27 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.14.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:14:26 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 21/26] tests: Fixes test-qdev-global-props.c Date: Wed, 16 Sep 2020 01:12:29 +0800 Message-Id: <20200915171234.236-22-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-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 , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.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 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test-qdev-global-props.c b/tests/test-qdev-global-props.c index 8a3c14d92c..c8862cac5f 100644 --- a/tests/test-qdev-global-props.c +++ b/tests/test-qdev-global-props.c @@ -251,10 +251,13 @@ static void test_dynamic_globalprop(void) g_test_trap_assert_passed(); g_test_trap_assert_stderr_unmatched("*prop1*"); g_test_trap_assert_stderr_unmatched("*prop2*"); - g_test_trap_assert_stderr("*warning: global dynamic-prop-type-bad.prop3 has invalid class name\n*"); + g_test_trap_assert_stderr( + "*warning: global dynamic-prop-type-bad.prop3 has invalid class name*"); g_test_trap_assert_stderr_unmatched("*prop4*"); - g_test_trap_assert_stderr("*warning: global nohotplug-type.prop5=105 not used\n*"); - g_test_trap_assert_stderr("*warning: global nondevice-type.prop6 has invalid class name\n*"); + g_test_trap_assert_stderr( + "*warning: global nohotplug-type.prop5=105 not used*"); + g_test_trap_assert_stderr( + "*warning: global nondevice-type.prop6 has invalid class name*"); g_test_trap_assert_stdout(""); } From patchwork Tue Sep 15 17:12:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777415 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E8A45139F for ; Tue, 15 Sep 2020 17:35:56 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8212220665 for ; Tue, 15 Sep 2020 17:35:56 +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="trTDeXCR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8212220665 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:43182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIErz-0004kg-A7 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:35:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEXO-0000f1-Ml; Tue, 15 Sep 2020 13:14:38 -0400 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]:37620) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEXL-0002pS-MD; Tue, 15 Sep 2020 13:14:38 -0400 Received: by mail-pj1-x1044.google.com with SMTP id kk9so124289pjb.2; Tue, 15 Sep 2020 10:14:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EBhZ0tPMEzEbVc2ih32FHbQeoM4d+XPCBYcJq9Mkgzw=; b=trTDeXCRqAK71fBTmFO/K9BLMGThkKDvB1Z2UZgixDgb27SwnUNzqfD6qpe11kP2+R zF1tUOoLCIqAft0nMRrSZAOdhFEYdl1rBtrTNzTh26n+dcz4ONV2ygqDrfu5dc93/Z47 bIZq2HpNgvh+K6iSqS4PYscvrnmjG8w6zbuFO4oMhP1cCHGiflTgMFYw8CmCO3vyPMZf 8WGKnGaGUpPszNrcSUuQTEm4EwwRWQ5oXcDGYHb/UiIgM/U8D9Gcm4RV5ymlCQMZ0E8s 9plJBl0RmHu5sGMOXDMnWkLhh/lwhWwNLIli8kCCFl4P8eeEBNaiFH22quhGSe6GlNGR 8bpw== 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=EBhZ0tPMEzEbVc2ih32FHbQeoM4d+XPCBYcJq9Mkgzw=; b=AeHLz4xZEDHFNfQQfWgMVDB6MFTdDq1koE7O6r3K+ZBobObIUwpBa7sVzDypYEzEJQ vVBUNvQYAGsWfyywxnUTSEda+y3J/s1JIhdjzpNazM80qRL/BGeitmR75+ei0vGizdyl +MZwKE2p9goB+xvCvxie7cvZnGm5IYSIk0smRp/ZNTszszxzpHCHNn4ztjDBBaQMXvcU pxWENwZc7By3sQmNfUKWKhw+RLE6FsDUejE0oqzPvU8FHqe8D7sWLmqa9XH+doAsEIt5 E6qLxGDVk5Auqo1WmKSi37z7qiqoMFgF0UHEldgnHoOy/AjM0mrQ/5aDWuXcmROQ2tbX +GVQ== X-Gm-Message-State: AOAM532w0PDrm+zPM/gemXNoTU4fiZTmDQQXgSDTyqfO5NFlEBNIBnPF bTQN2CJCkXYWNpNKvvZARj9QuFUCMZhk74Fbyec= X-Google-Smtp-Source: ABdhPJwBg2Q6Q34oj/JelEKd6Cm+W7qeXLJKXsGTdMxWEtu+fzD71g2mUoeR94RtymDpUhQnrM1GXg== X-Received: by 2002:a17:90b:3105:: with SMTP id gc5mr315565pjb.225.1600190071522; Tue, 15 Sep 2020 10:14:31 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.14.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:14:30 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 22/26] rcu: fixes test-logging.c by call drain_call_rcu before rmdir_full Date: Wed, 16 Sep 2020 01:12:30 +0800 Message-Id: <20200915171234.236-23-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1044; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1044.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.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 cec18b31b4..a7e36dbfe8 100644 --- a/tests/test-logging.c +++ b/tests/test-logging.c @@ -211,6 +211,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 Tue Sep 15 17:12:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777453 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 356C692C for ; Tue, 15 Sep 2020 17:46:18 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B676C20936 for ; Tue, 15 Sep 2020 17:46: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="U1v73fky" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B676C20936 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:47326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIF20-0001CH-K6 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:46:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEXP-0000i5-Ip; Tue, 15 Sep 2020 13:14:39 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:46401) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEXN-0002pq-Vs; Tue, 15 Sep 2020 13:14:39 -0400 Received: by mail-pf1-x444.google.com with SMTP id b124so2289197pfg.13; Tue, 15 Sep 2020 10:14:37 -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=U1v73fkydNQnHcMcbp3JTeTZOjhtisqCvxkSJCSyxxK5JRkpBavtwsXuxDS+wViYsI KDgDVMTdlPe/CKP82/QurVWtCetpuhs81V3kIptAmioF66RwzWiGuXFRd5/gDR+oCZEs jllWPl5quHm42JyxWGUqphLfZ480SnGiGBMfGFCcji4DEmpSsE29LtsIKKFh27btsD2s 4/mq/6Lx2fbsDXjhDsDs7EWEdusQh4BaXnQYqsymhLGo7fw6GIxLems/UtpIPeR2bsn4 Rd3bs0JlFllPBRas8PVXS8STfkzDqV3YOrzEzcMODTLHEBTv6wJPoMUT4iyWB5c9NhKD C2CQ== 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=gU6NO1rbHMogy4I3/YjgC8rr5ds7Y2UP5uNTEqqB/VsNqp3oHTN0N55qjIzTDi2UKm oDMftNDim5hjlJR81yIBVSTOWKz18cVuu8BBA8SEyUAB0qsd+dnqInRt+71PFoHPvA7t x4UuxS65ZeMPZ/a+QiBIKguXbV1ShW2/yXQLSg+TWZ8pc7OBRKBX+SPiy73tLxQmxxHJ M56Nc22CsrD5XS3vEHPNVJviqMPzTOpVTBi48cbeXfK/l3UkMt2ToOuoXVFMIp6nwhgu sobzn8cfJ4NiUwCJMI/OFWdgzwJjDWxIihZ1a17R9HgXJJAmQR818T3q9539jYeiuGHE sjJA== X-Gm-Message-State: AOAM530vZ6FfzXXen2uPtEO98SkPFKLh6X6oN7zLuPOeG821JOhSVYJQ XfLFe/Zuim4OR/6xCutvRpdPdRIHDH9a7MgXnlk= X-Google-Smtp-Source: ABdhPJx6CrxI2ejTyVJxO9kSWHtWoBx8L/1qCVZ306sN5g2xbSmH66vo1s9Bsy/VX1bgejQmLKJnRg== X-Received: by 2002:a05:6a00:1703:b029:142:2f13:f1c5 with SMTP id h3-20020a056a001703b02901422f13f1c5mr978323pfc.29.1600190075790; Tue, 15 Sep 2020 10:14:35 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.14.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:14:34 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 23/26] meson: upgrade meson for execute custom ninjatool under msys2 properly Date: Wed, 16 Sep 2020 01:12:31 +0800 Message-Id: <20200915171234.236-24-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::444; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.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 Tue Sep 15 17:12:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777405 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 58C2C59D for ; Tue, 15 Sep 2020 17:32:55 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EB8C9208E4 for ; Tue, 15 Sep 2020 17:32:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KcAYjjhI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EB8C9208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:59658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIEp3-0008Ni-Sj for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:32:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEXW-00011a-BT; Tue, 15 Sep 2020 13:14:46 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:46031) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEXS-0002qP-ES; Tue, 15 Sep 2020 13:14:46 -0400 Received: by mail-pl1-x641.google.com with SMTP id bh1so1683074plb.12; Tue, 15 Sep 2020 10:14:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MjaV6Qfqa3fMJy/CTHAt8oPfW2z8Zpip23pYr1VEBfU=; b=KcAYjjhIX119vK+7GccUi3s092U+W19If/MrM4MYRvxzJY/ZG9778KuD9JoqcW2H/7 RZlbinw8WTaVuzhi2xdvjYtYeBiiAKaHcwbz6RxvpC9FKBO+UL9NnPuqN97QHGsJJwQl TJ70tXQoORNzrF39/jRTfFHgxUA5ypLGmyoCvcxRJoTv6cqsRPeiwrPDt36qZHDqZc7Z ajf+T05xp2nnAawqH3wksr6YhntdVqlooO9eQj+5AHwAtz250L/6MmmTbCS2e71N2ozw xL3QNAFfuffVW0qYqDl416UXhNGzSufa1R36AaeKUpiwP2aKs+pbxG40WnvIkzXUs9EG hdSQ== 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=MjaV6Qfqa3fMJy/CTHAt8oPfW2z8Zpip23pYr1VEBfU=; b=A1amI7TgR/sW0OwWfu9rEZh5Sxqrdlai/I4yvjJ4hn95iNnVG4hKijpas/RmriGiZE PJ2OjDJypd/SPHsuSreq4H5/FKCO+3GCvCJpnzOPwCkPb10f2vypsNOKKgj7WceAAoKb jOC1I3r78S3uHYyq19mYkyjerJJ/Z7O4qFwFUndurcDfagJZq5MQXgyGh5rdyFn3ZYkn RLcE4viwj4SE/EZgVuT1XaL7h2DM+qFzmteIlEmN1OsFQjpvmfJA7cDZ+dqfSUqOXddi 2wud58II2kAGgHrKq41Y4VuUOFtTcHJKH7T/T4uN/YWg2VmQqxgfePVQzctJvoP8/hfa eJag== X-Gm-Message-State: AOAM531xFLDqdHrVW4re9ob8q5n9utwnzD1+xPKiXCtriW4WZBULNZFX /yJfpQHk2BMLVvURk82MhkZ7M+6wLpEsmKSSEqY= X-Google-Smtp-Source: ABdhPJxCYq6keEX7zgAWFATZjcCp2/qz1BDYcugr5QlHc8nG7/0gfoCcvXKxF6xVV+qimA51SMbeEQ== X-Received: by 2002:a17:902:b20c:b029:d1:e5e7:be0c with SMTP id t12-20020a170902b20cb02900d1e5e7be0cmr2600073plr.63.1600190080208; Tue, 15 Sep 2020 10:14:40 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.14.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:14:39 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 24/26] ci: Enable msys2 ci in cirrus Date: Wed, 16 Sep 2020 01:12:32 +0800 Message-Id: <20200915171234.236-25-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-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 , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 The https://wiki.qemu.org/Hosts/W32#Native_builds_with_MSYS2 need to be updated. There is no need of --cross-prefix, open mingw64.exe instead of msys2.exe then we don't need the --cross-prefix, besides we using environment variable settings: MSYS: winsymlinks:nativestrict MSYSTEM: MINGW64 CHERE_INVOKING: 1 to opening mingw64 native shell. Now all enabled msys2/tests are passed Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrangé --- .cirrus.yml | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 25fb4add9b..90ed891865 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -44,3 +44,64 @@ macos_xcode_task: --enable-werror --cc=clang || { cat config.log; exit 1; } - gmake -j$(sysctl -n hw.ncpu) - gmake check + +windows_msys2_task: + windows_container: + image: cirrusci/windowsservercore:cmake + os_version: 2019 + cpu: 8 + memory: 8G + env: + MSYS: winsymlinks:nativestrict + MSYSTEM: MINGW64 + CHERE_INVOKING: 1 + printenv_script: + - C:\tools\msys64\usr\bin\bash.exe -lc 'printenv' + install_script: + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && + curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && + curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig" + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && + pacman -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Sy" + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -S --needed + bash pacman pacman-mirrors msys2-runtime" + - taskkill /F /IM gpg-agent.exe + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Su" + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -S --needed + base-devel + git + mingw-w64-x86_64-python + mingw-w64-x86_64-python-setuptools + mingw-w64-x86_64-toolchain + mingw-w64-x86_64-SDL2 + mingw-w64-x86_64-SDL2_image + mingw-w64-x86_64-gtk3 + mingw-w64-x86_64-glib2 + mingw-w64-x86_64-ninja + mingw-w64-x86_64-make + mingw-w64-x86_64-lzo2 + mingw-w64-x86_64-zstd + mingw-w64-x86_64-libjpeg-turbo + mingw-w64-x86_64-pixman + mingw-w64-x86_64-libgcrypt + mingw-w64-x86_64-libpng + mingw-w64-x86_64-libssh + mingw-w64-x86_64-libxml2 + mingw-w64-x86_64-snappy + mingw-w64-x86_64-libusb + mingw-w64-x86_64-usbredir + mingw-w64-x86_64-libtasn1 + mingw-w64-x86_64-nettle + mingw-w64-x86_64-cyrus-sasl + mingw-w64-x86_64-curl + mingw-w64-x86_64-gnutls + mingw-w64-x86_64-zstd" + script: + - C:\tools\msys64\usr\bin\bash.exe -lc "mkdir build" + - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && ../configure --python=python3" + - 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 Tue Sep 15 17:12:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777463 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E35731580 for ; Tue, 15 Sep 2020 17:49:02 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7FFFE208E4 for ; Tue, 15 Sep 2020 17:49:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eRVhQQwh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7FFFE208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:55520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIF4f-0004au-GN for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:49:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEXY-00017G-F0; Tue, 15 Sep 2020 13:14:48 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:44858) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEXW-0002td-Ip; Tue, 15 Sep 2020 13:14:48 -0400 Received: by mail-pl1-x642.google.com with SMTP id j7so1682800plk.11; Tue, 15 Sep 2020 10:14:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dFkUOLlFx0+n4zr1W9ZYPDjW45Yntj7Jp00ukUoFt0o=; b=eRVhQQwhY9qczdOrhsUvM7mWagzlhYAvh9rqg2W6flKj6oQRnvKB/bq5pXXb4uNjuN QOKdHwnAgA4quQQltMYsg27kR7NZh8ZILWUQ5AkVgL3gvYAd2Cp+H+ao5qzn4gbWp671 N5H4cYvpaw8tIz5PqqtG5jy9fLptFjOJk5/v+lDaThoVIBhyqq/mR+tTg1bifDXvxjae KI9M0lRTYcIe8WlRFfHOaM3GPZRXvX/pk1KiGfoku6HlLbY9NUW0QoChu4ENLthTaLMJ XZ64YmXf+ti9+saAtu7aSSMsirtfD0tG2Y3OhZ8XOMtQkZJi0bqW26Xet4u2UCSDouyh dajw== 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=dFkUOLlFx0+n4zr1W9ZYPDjW45Yntj7Jp00ukUoFt0o=; b=XVSst3TsIRwxWjPzCNgZkDQW5FiFItG12MsQLLvI64ZtMiOvgJMr/73pWqXkwCC24m fLUn9YSKgNioP+EwNX3zd4920HCCBlR7+NPM4aUYwgOPb4E0KomfaAxLnlE13Nm7Iut7 1ezXifNKHIa4XwqYl41qhlBCgqapUAs9lLeOebItlv7BwNXPTlZSIx2NWvB2GBqyZ1yO APLJyHPuKmJaXXM5xQsI+Z4NlmxbsIIGJ7lvEVOH1nuoH7KGXsCFR8larUdnYXskE3MU ZpR/byec/m8RMGDxetRZ15wyWnbOVWvIcmF+0bXa9uezTYZVx8XDplXWIalNT//dKk2g 3oiQ== X-Gm-Message-State: AOAM5323tLfewdpZZO86fmsrhLr5pgL3vyYoEUJb4h8BXuWjJXJbGb6q E8dr0lXyDLg/ILOsYFmJ6wrt2EMVw2U/zJOxBr8= X-Google-Smtp-Source: ABdhPJwVEPL39Abq7k5+PZIok/rw47WlKZohc3VkscJHLRIve2r0VL3UPiZ+rpdwaBuCpD8znbr+Hg== X-Received: by 2002:a17:90a:d702:: with SMTP id y2mr348467pju.216.1600190084423; Tue, 15 Sep 2020 10:14:44 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.14.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:14:43 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 25/26] block: Fixes nfs compiling error on msys2/mingw Date: Wed, 16 Sep 2020 01:12:33 +0800 Message-Id: <20200915171234.236-26-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-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 , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" These compiling errors are fixed: ../block/nfs.c:27:10: fatal error: poll.h: No such file or directory 27 | #include | ^~~~~~~~ compilation terminated. ../block/nfs.c:63:5: error: unknown type name 'blkcnt_t' 63 | blkcnt_t st_blocks; | ^~~~~~~~ ../block/nfs.c: In function 'nfs_client_open': ../block/nfs.c:550:27: error: 'struct _stat64' has no member named 'st_blocks' 550 | client->st_blocks = st.st_blocks; | ^ ../block/nfs.c: In function 'nfs_get_allocated_file_size': ../block/nfs.c:751:41: error: 'struct _stat64' has no member named 'st_blocks' 751 | return (task.ret < 0 ? task.ret : st.st_blocks * 512); | ^ ../block/nfs.c: In function 'nfs_reopen_prepare': ../block/nfs.c:805:31: error: 'struct _stat64' has no member named 'st_blocks' 805 | client->st_blocks = st.st_blocks; | ^ ../block/nfs.c: In function 'nfs_get_allocated_file_size': ../block/nfs.c:752:1: error: control reaches end of non-void function [-Werror=return-type] 752 | } | ^ On msys2/mingw, there is no st_blocks in struct _stat64 yet, we disable the usage of it on msys2/mingw, and create a typedef long long blkcnt_t; for further implementation Signed-off-by: Yonggang Luo --- block/nfs.c | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/block/nfs.c b/block/nfs.c index 61a249a9fc..5f83dbe407 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,13 @@ #define QEMU_NFS_MAX_PAGECACHE_SIZE (8388608 / NFS_BLKSIZE) #define QEMU_NFS_MAX_DEBUG_LEVEL 2 +#if defined(_WIN32) +#define nfs_stat __stat64 +typedef long long blkcnt_t; +#else +#define nfs_stat stat +#endif + typedef struct NFSClient { struct nfs_context *context; struct nfsfh *fh; @@ -70,7 +79,7 @@ typedef struct NFSRPC { int ret; int complete; QEMUIOVector *iov; - struct stat *st; + struct nfs_stat *st; Coroutine *co; NFSClient *client; } NFSRPC; @@ -415,11 +424,21 @@ static void nfs_file_close(BlockDriverState *bs) nfs_client_close(client); } +static blkcnt_t nfs_get_st_blocks(const struct nfs_stat *st) +{ +#if defined(_WIN32) + /* TODO: Not be possible implement on win32 yet */ + return 0; +#else + return st->st_blocks; +#endif +} + 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 +564,7 @@ static int64_t nfs_client_open(NFSClient *client, BlockdevOptionsNfs *opts, } ret = DIV_ROUND_UP(st.st_size, BDRV_SECTOR_SIZE); - client->st_blocks = st.st_blocks; + client->st_blocks = nfs_get_st_blocks(&st); client->has_zero_init = S_ISREG(st.st_mode); *strp = '/'; goto out; @@ -706,6 +725,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 +749,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)) { @@ -746,8 +766,9 @@ static int64_t nfs_get_allocated_file_size(BlockDriverState *bs) nfs_set_events(client); BDRV_POLL_WHILE(bs, !task.complete); - return (task.ret < 0 ? task.ret : st.st_blocks * 512); + return (task.ret < 0 ? task.ret : nfs_get_st_blocks(&st) * 512); } +#endif static int coroutine_fn nfs_file_co_truncate(BlockDriverState *bs, int64_t offset, bool exact, @@ -778,7 +799,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 +821,7 @@ static int nfs_reopen_prepare(BDRVReopenState *state, nfs_get_error(client->context)); return ret; } - client->st_blocks = st.st_blocks; + client->st_blocks = nfs_get_st_blocks(&st); } return 0; @@ -869,7 +890,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 Tue Sep 15 17:12:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11777427 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0018C14F6 for ; Tue, 15 Sep 2020 17:38: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 7EC8820678 for ; Tue, 15 Sep 2020 17:38: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="BnUenlhA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7EC8820678 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:53526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIEu4-0000TB-Cz for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 13:38:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIEXe-0001DT-82; Tue, 15 Sep 2020 13:14:54 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:40521) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIEXa-0002v4-O3; Tue, 15 Sep 2020 13:14:53 -0400 Received: by mail-pl1-x641.google.com with SMTP id bd2so1686104plb.7; Tue, 15 Sep 2020 10:14:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=P2cCxFgoYyp2z7D84YXVHfqMZS0c6Jo38CVly2RpvQA=; b=BnUenlhAsXSEYCp9b0xScR2s3qiMAXmj19mTnDoPFBlIOtfGg6eEkuLuagozpepOPC +cdW/fbDPOV0+Tbe5smFZJVMPOezovs4Vx6soDE9DAV3Vr6O0oLH3Ik/REvVQKge8ftz rKismj8eRsoAMi1NG2LvktF9XXjeMDtq0Cd5K80BHR3pD2YYsJgoTdQsJ2iHmjRvIfPM CB2Neqta9u1GJzbNsHuR85caKczxpuu/i9agAbp/9lSRUJ+jSKkNcX6I9EQ2dM/XXi33 OV/3Mw9lLgk9ZbiHqh4fs+ZNMGs4UmefD2QczEw8hXbUzVEH31JAhrKz4XqC5+5A9qRl I6VQ== 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=P2cCxFgoYyp2z7D84YXVHfqMZS0c6Jo38CVly2RpvQA=; b=SfDuPCuu438X07BFHUhh7qlM2mpOEGRzQ0I5eV2G4XkSbphf3G99Awaw308jfg6oRZ q73j92uQ+hR0syxTOoWxaY9U3ewQMqfgzSWqVCm3NLdz9o/H0Z2cIGiSuxXXSZNS0vu9 D+77ZPKLrmtZYaIGbDNOZIC4FYS1F34/WFh9BZm49qfEVzu671OAOY6fkIOLTp6EUIV2 qyxivr832SRZQGagm+z+nrycOW/HAAn4tIV5SK6CdWu5GrcPWJXw3hUHr7tOvXG+QY1e l+SNHFpJbf2c5dx1btGuJuYlvQcPoGf4JIPHIZPhOHUeOiKkqZ1JmI7AzHNfMAjAcFO5 PlZQ== X-Gm-Message-State: AOAM532/A5qSpQKFUZZPUYR24Q613KxW3AN6+lM6RUJETgbCrwggQzTW LUiY32Re0E64xEDLIoC9TFMfnvNQJtn7tXX3Q3E= X-Google-Smtp-Source: ABdhPJybOdpovnJggf5X+NGTcPc/J7QzOKL6RnT5ZeP//QiU4tHCC3tKo+CIp75NQoZhCCk42m6luw== X-Received: by 2002:a17:902:208:b029:d1:9bc8:155d with SMTP id 8-20020a1709020208b02900d19bc8155dmr20366669plc.35.1600190088848; Tue, 15 Sep 2020 10:14:48 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j14sm124046pjz.21.2020.09.15.10.14.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 10:14:48 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v10 26/26] block: enable libnfs on msys2/mingw in cirrus.yml Date: Wed, 16 Sep 2020 01:12:34 +0800 Message-Id: <20200915171234.236-27-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200915171234.236-1-luoyonggang@gmail.com> References: <20200915171234.236-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 , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Richard Henderson , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Li-Wen Hsu , Peter Lieven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" At the begging libnfs are not enabled because of compiling error, now it's fixed so enable it Signed-off-by: Yonggang Luo --- .cirrus.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.cirrus.yml b/.cirrus.yml index 90ed891865..ca4d7db64f 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -93,6 +93,7 @@ windows_msys2_task: 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