From patchwork Tue Sep 8 18:49:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11763929 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 DE8531599 for ; Tue, 8 Sep 2020 18:52: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 8C9E32067C for ; Tue, 8 Sep 2020 18:52: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="mg55n84S" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C9E32067C 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]:33084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFijU-0007jP-NB for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 14:52:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFigf-0002A0-Fh; Tue, 08 Sep 2020 14:49:50 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:40690) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFigX-0002bQ-QV; Tue, 08 Sep 2020 14:49:48 -0400 Received: by mail-pg1-x533.google.com with SMTP id j34so187403pgi.7; Tue, 08 Sep 2020 11:49:40 -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=bscWSrwzBlA91ho91MKRFqbKOrFCfnhQG9RPGa7f72A=; b=mg55n84SAuKUqEgxRs2ybo3Z0b/hUrx2HgRvwfnkc+FgJNWORXiATFd9mj4CAQM2jQ ymSiU0RJslLG7fr/I8p4A+mkcCdS76yhGnK3xb9UvPJ+0JEt2YaBlUrUMzFMKaQllJ53 jqC9oADnMiV55r8hals21d3IzEncGDcJUqTuBFSfJwF+Wc00nrK93FBzjVsW8lM3LfRp Z+/f5ifl8HeoqIb1nTXbwnlrhDWKJ1Y6cLPb17B4h2sgeAe7kOAI36l2goh6DuWy4bfb EA75zJfS5x+P6+FXE8l57oio0aFaclDj/hDoKcLs09paCEyTXdw2G/XFxSlqgCR0SjAe dLHQ== 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=bscWSrwzBlA91ho91MKRFqbKOrFCfnhQG9RPGa7f72A=; b=VB2d9jRBNSJZeUShthSNP+nwtPhBpFtJL80VYuITehk2kCE8stU7z2gWndLLaHl4X2 jrM6yBO8RAmuPlqjYv+uqQxpwdTyK9KIiIKBgwDKniqQ0bMxg80ZhL1dQhDVRvZIqPxN etuQlOa5eLfwr8YP24KskVnbYUoM4add0vViLKEjBx32yFXGAxN81AmtHCCvgfObKNSL YZdO6voI8DfR8LPP3GPBPnOOcLI6EGCIfD8bjQtBm//ZtmkoWABkajFrkZCL1+mgy8ru mdQZ+kJSakxL0qBwPP47fcIAmEvr1P80auGJ3CVA45d/oHnJ0a6OYyLP+7r8bHVSbdAZ W3JQ== X-Gm-Message-State: AOAM530KAgnWeoHrUdlplgOUjOMMxbT0+OTcid9cOm/LB54DH2H8QT4k rw9wkL5eaK+3f8o4QGNDpvVEZm++fVckoQju X-Google-Smtp-Source: ABdhPJyv80W/UrcQFzActTe/j+LlUlvyEe3yPjDQE3x6n9pb1hVoaSXlFbAVGIExzfKxroOmIQqSMQ== X-Received: by 2002:a17:902:b60d:: with SMTP id b13mr85064pls.48.1599590978817; Tue, 08 Sep 2020 11:49:38 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 8sm43553pjx.14.2020.09.08.11.49.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:49:38 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PULL 01/16] block: Fixes nfs on msys2/mingw Date: Wed, 9 Sep 2020 02:49:03 +0800 Message-Id: <20200908184918.1085-2-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908184918.1085-1-luoyonggang@gmail.com> References: <20200908184918.1085-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::533; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x533.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Yonggang Luo --- block/nfs.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/block/nfs.c b/block/nfs.c index 61a249a9fc..34b2cd5708 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -24,7 +24,9 @@ #include "qemu/osdep.h" +#if !defined(_WIN32) #include +#endif #include "qemu/config-file.h" #include "qemu/error-report.h" #include "qapi/error.h" @@ -51,6 +53,12 @@ #define QEMU_NFS_MAX_PAGECACHE_SIZE (8388608 / NFS_BLKSIZE) #define QEMU_NFS_MAX_DEBUG_LEVEL 2 +#if defined (_WIN32) +#define nfs_stat __stat64 +#else +#define nfs_stat stat +#endif + typedef struct NFSClient { struct nfs_context *context; struct nfsfh *fh; @@ -58,7 +66,7 @@ typedef struct NFSClient { bool has_zero_init; AioContext *aio_context; QemuMutex mutex; - blkcnt_t st_blocks; + int64_t st_size; bool cache_used; NFSServer *server; char *path; @@ -70,7 +78,7 @@ typedef struct NFSRPC { int ret; int complete; QEMUIOVector *iov; - struct stat *st; + struct nfs_stat *st; Coroutine *co; NFSClient *client; } NFSRPC; @@ -419,7 +427,7 @@ static int64_t nfs_client_open(NFSClient *client, BlockdevOptionsNfs *opts, int flags, int open_flags, Error **errp) { int64_t ret = -EINVAL; - struct stat st; + struct nfs_stat st; char *file = NULL, *strp = NULL; qemu_mutex_init(&client->mutex); @@ -545,7 +553,7 @@ static int64_t nfs_client_open(NFSClient *client, BlockdevOptionsNfs *opts, } ret = DIV_ROUND_UP(st.st_size, BDRV_SECTOR_SIZE); - client->st_blocks = st.st_blocks; + client->st_size = st.st_size; client->has_zero_init = S_ISREG(st.st_mode); *strp = '/'; goto out; @@ -729,11 +737,11 @@ static int64_t nfs_get_allocated_file_size(BlockDriverState *bs) { NFSClient *client = bs->opaque; NFSRPC task = {0}; - struct stat st; + struct nfs_stat st; if (bdrv_is_read_only(bs) && !(bs->open_flags & BDRV_O_NOCACHE)) { - return client->st_blocks * 512; + return client->st_size; } task.bs = bs; @@ -746,7 +754,7 @@ static int64_t nfs_get_allocated_file_size(BlockDriverState *bs) nfs_set_events(client); BDRV_POLL_WHILE(bs, !task.complete); - return (task.ret < 0 ? task.ret : st.st_blocks * 512); + return (task.ret < 0 ? task.ret : st.st_size); } static int coroutine_fn @@ -778,7 +786,7 @@ static int nfs_reopen_prepare(BDRVReopenState *state, BlockReopenQueue *queue, Error **errp) { NFSClient *client = state->bs->opaque; - struct stat st; + struct nfs_stat st; int ret = 0; if (state->flags & BDRV_O_RDWR && bdrv_is_read_only(state->bs)) { @@ -800,7 +808,7 @@ static int nfs_reopen_prepare(BDRVReopenState *state, nfs_get_error(client->context)); return ret; } - client->st_blocks = st.st_blocks; + client->st_size = st.st_size; } return 0; From patchwork Tue Sep 8 18:49:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11763935 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 8BF0A618 for ; Tue, 8 Sep 2020 18:53: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 55C0D2087C for ; Tue, 8 Sep 2020 18:53: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="B7A9hO54" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 55C0D2087C 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]:39494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFikd-0001s9-Fr for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 14:53:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFigo-0002CL-G7; Tue, 08 Sep 2020 14:49:58 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:35285) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFigf-0002c7-Gv; Tue, 08 Sep 2020 14:49:53 -0400 Received: by mail-pf1-x432.google.com with SMTP id o68so39955pfg.2; Tue, 08 Sep 2020 11:49:44 -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=nB7uQ/s9fu4x2Up4TVd+1iuCIae9I+X+vwqkrJxP6ag=; b=B7A9hO54DtWhVFF9yNlZJ/h1g9kt9KN92br5SvqAXO8cgkCAAUjescOFXWSq5Bp7ET u7P7o3cgA17F6MffubtZCf+RIP4UNyaykdYi/9x1flZHnq6iKri1p58+wdWc3rKmgfal fxbE3t1ikHCU5jrzxA951nkApgBHxYjxuUrGEmKettBeBEZ9/BlDAyUXhlIpEklRBzBB sd8/5m2WDkEBOZBVo3mhy0Fu310pokFunClTo7Ka14CvlTjEWH/Rkrz38UMgf1VXt025 4ve19RCfUGH7xPGoM7TH4xOebJBN7PC95i40MrHNFXPbA+N0h2UAG9LNlHOPkjc6Riqb k3yQ== 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=nB7uQ/s9fu4x2Up4TVd+1iuCIae9I+X+vwqkrJxP6ag=; b=PB4reVk1PKxrA9xwNSltH3PR26FhSXovXT2+QrpQAsL5N82kgUkGT641fH4JXEa2us DoMbEWQ39+jZdJqV8gDeVtgJ4x4dbf0tLQnBC4s550F4YV8GPzDfLzEj9F+zyqvSgEZM sQeSd5Pj+LbaNxnJX8gjF0jp+lSEbKhvzhzRB2Ia1zU18Ek6HhtQNInMAStbBi1wVfdF HA96qHMrNSgsiib584nMEvjm4mEtLdTB7/lp+jfP9Z24XDVGT+cvciuwIG+cdw5YuVAN pDRPd0hBlR7EcirMyxxu8MEpBZjbRdjZRGXsBTAzXoyEtyA2y7aJQpHV2gB8ETNOfeWH nzMg== X-Gm-Message-State: AOAM532a2Cz6Ihyc9nziocPoeCr+pHYERKTh+uErAy2KpS3MOVsK5VaM 887LrtWEzioaVjuRSBz+rqAP6Si4dc19Nj5P X-Google-Smtp-Source: ABdhPJxiZOiROnf68MtWLwsKseLbJ6ijF2SN+UEvMx2z+HufJx+W3MqWZr676CvTc/msMA0LrKrNzQ== X-Received: by 2002:a65:408b:: with SMTP id t11mr90788pgp.199.1599590982763; Tue, 08 Sep 2020 11:49:42 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 8sm43553pjx.14.2020.09.08.11.49.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:49:42 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PULL 02/16] ci: fixes msys2 build by upgrading capstone to 4.0.2 Date: Wed, 9 Sep 2020 02:49:04 +0800 Message-Id: <20200908184918.1085-3-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908184918.1085-1-luoyonggang@gmail.com> References: <20200908184918.1085-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x432.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Yonggang Luo --- capstone | 2 +- configure | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/capstone b/capstone index 22ead3e0bf..1d23053284 160000 --- a/capstone +++ b/capstone @@ -1 +1 @@ -Subproject commit 22ead3e0bfdb87516656453336160e0a37b066bf +Subproject commit 1d230532840a37ac032c6ab80128238fc930c6c1 diff --git a/configure b/configure index 4231d56bcc..f4f8bc3756 100755 --- a/configure +++ b/configure @@ -5156,7 +5156,7 @@ case "$capstone" in LIBCAPSTONE=libcapstone.a fi capstone_libs="-Lcapstone -lcapstone" - capstone_cflags="-I${source_path}/capstone/include" + capstone_cflags="-I${source_path}/capstone/include -I${source_path}/capstone/include/capstone" ;; system) From patchwork Tue Sep 8 18:49:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11763941 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 628C01599 for ; Tue, 8 Sep 2020 18:55:17 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 27DA22067C for ; Tue, 8 Sep 2020 18:55: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="jAGhNa00" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 27DA22067C 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]:45876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFilw-0004UL-9L for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 14:55:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFigo-0002D1-Te; Tue, 08 Sep 2020 14:49:59 -0400 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]:55943) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFigh-0002cI-8V; Tue, 08 Sep 2020 14:49:58 -0400 Received: by mail-pj1-x1044.google.com with SMTP id q4so56343pjh.5; Tue, 08 Sep 2020 11:49: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=1syMV4Dz6Kig8XelyzSOjTVgSuUKyXVdrwicWYlc08A=; b=jAGhNa00I4jHmpkwKxGBS2ebe2guI9njb3Y5OElkUAEzEFA8cDxCLNihT3UXq/XVPN cwwckt08Gxh/KZ8HplyElDm2GonphKI142lmbxnF4lGipaJn6z17coP5X8RsUy6APkxn kFOKbIur73iBnFbaQ8+Q2L0Duz6DQLk9dFPMoXc4B34d6kr6R5aJACVmpUufZJcEyi1U eIiGCy/RZ2EcGKe4ZoQ8PWBQ6WHc03ebejm7Kr03dgU20U1IsxC2/9VZPzp0z4nlG9/j ipvTdYE5zFWlL+bmFPsSEvlz9sd48UQTg/bQITU0jT/5iDUY1+2ODY3mx1Z6622gZw2E vzoA== 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=1syMV4Dz6Kig8XelyzSOjTVgSuUKyXVdrwicWYlc08A=; b=Q0cHKuyhCF7kH8WZS81rhbfKDxiWymhbY35SkrFrs82dKk0CF2ziwnvDvd/xfhQkjC QNkyuFgcwnYSg1Kgbw/vl3KhwRjHpOmt8ouIehWkXb5M8geKvIc9lg08XCxOLxW4UMD/ Crjdt7NrCMjEzaAg0SVJyUS7oqYRiXlj2Ypu6cfIvj3tupst6jfK2hCOeSJp7pYXCSQh UIgJVoYptlSgpnSeHSIe0e9AKHcUJMs+PkebQqp4vrBrOOBnAz6CtXnPJZvdCLpaNMVs L7idYRHM6pelXfP+ae9/WGgEfG8vTQTiLX0sEVzAZfz2K3dZu7Qg/hUKZMjRxmA7CLJ5 toVg== X-Gm-Message-State: AOAM533Q8l0STqMChJTVC6s7cS77GZeU5gtaKfzUEJqHEwby7uTnyw6s C80Y2Vkxle5s9r/5gqmFDQL7iMneL6LtiP9m X-Google-Smtp-Source: ABdhPJwSrikRhUQX0yoD0lNXrnkIyZKH8YWCTBZBdF1h4qFghLN6qZK4Hu6W2nKBM5MLlR+Y/hgthA== X-Received: by 2002:a17:90a:e80f:: with SMTP id i15mr215683pjy.62.1599590986731; Tue, 08 Sep 2020 11:49:46 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 8sm43553pjx.14.2020.09.08.11.49.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:49:45 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PULL 03/16] configure: Fixes ncursesw detection under msys2/mingw and enable curses Date: Wed, 9 Sep 2020 02:49:05 +0800 Message-Id: <20200908184918.1085-4-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908184918.1085-1-luoyonggang@gmail.com> References: <20200908184918.1085-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1044; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1044.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The mingw pkg-config are showing following absolute path and contains : as the separator, so we must handling : properly. -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L -IC:/CI-Tools/msys64/mingw64/include/ncursesw:-I/usr/include/ncursesw: -DNCURSES_WIDECHAR -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L -IC -pipe -lncursesw -lgnurx -ltre -lintl -liconv -DNCURSES_WIDECHAR -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L -IC -lncursesw -DNCURSES_WIDECHAR -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L -IC -lcursesw -DNCURSES_WIDECHAR /CI-Tools/msys64/mingw64/include/ncursesw -pipe -lncursesw -lgnurx -ltre -lintl -liconv -DNCURSES_WIDECHAR /CI-Tools/msys64/mingw64/include/ncursesw -lncursesw -DNCURSES_WIDECHAR /CI-Tools/msys64/mingw64/include/ncursesw -lcursesw -DNCURSES_WIDECHAR -I/usr/include/ncursesw -pipe -lncursesw -lgnurx -ltre -lintl -liconv -DNCURSES_WIDECHAR -I/usr/include/ncursesw -lncursesw -DNCURSES_WIDECHAR -I/usr/include/ncursesw -lcursesw MINGW doesn't have langinfo.h, only exist in glic and musl 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. Signed-off-by: Yonggang Luo --- configure | 9 +++------ ui/curses.c | 10 +++++----- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/configure b/configure index f4f8bc3756..2e6d54e15b 100755 --- a/configure +++ b/configure @@ -3653,8 +3653,8 @@ if test "$iconv" = "no" ; then fi if test "$curses" != "no" ; then if test "$mingw32" = "yes" ; then - curses_inc_list="$($pkg_config --cflags ncurses 2>/dev/null):" - curses_lib_list="$($pkg_config --libs ncurses 2>/dev/null):-lpdcurses" + curses_inc_list="$($pkg_config --cflags ncursesw 2>/dev/null):-I/${MSYSTEM,,}/include/ncursesw:" + curses_lib_list="$($pkg_config --libs ncursesw 2>/dev/null):-lncursesw" else curses_inc_list="$($pkg_config --cflags ncursesw 2>/dev/null):-I/usr/include/ncursesw:" curses_lib_list="$($pkg_config --libs ncursesw 2>/dev/null):-lncursesw:-lcursesw" @@ -3664,17 +3664,14 @@ if test "$curses" != "no" ; then #include #include #include -#include int main(void) { - const char *codeset; wchar_t wch = L'w'; setlocale(LC_ALL, ""); resize_term(0, 0); addwstr(L"wide chars\n"); addnwstr(&wch, 1); add_wch(WACS_DEGREE); - codeset = nl_langinfo(CODESET); - return codeset != 0; + return 0; } EOF IFS=: diff --git a/ui/curses.c b/ui/curses.c index a59b23a9cf..12bc682cf9 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -30,7 +30,6 @@ #endif #include #include -#include #include #include "qapi/error.h" @@ -526,6 +525,7 @@ static void font_setup(void) iconv_t nativecharset_to_ucs2; iconv_t font_conv; int i; + g_autofree gchar *local_codeset = g_get_codeset(); /* * Control characters are normally non-printable, but VGA does have @@ -566,14 +566,14 @@ static void font_setup(void) 0x25bc }; - ucs2_to_nativecharset = iconv_open(nl_langinfo(CODESET), "UCS-2"); + ucs2_to_nativecharset = iconv_open(local_codeset, "UCS-2"); if (ucs2_to_nativecharset == (iconv_t) -1) { fprintf(stderr, "Could not convert font glyphs from UCS-2: '%s'\n", strerror(errno)); exit(1); } - nativecharset_to_ucs2 = iconv_open("UCS-2", nl_langinfo(CODESET)); + nativecharset_to_ucs2 = iconv_open("UCS-2", local_codeset); if (nativecharset_to_ucs2 == (iconv_t) -1) { iconv_close(ucs2_to_nativecharset); fprintf(stderr, "Could not convert font glyphs to UCS-2: '%s'\n", @@ -581,7 +581,7 @@ static void font_setup(void) exit(1); } - font_conv = iconv_open(nl_langinfo(CODESET), font_charset); + font_conv = iconv_open(local_codeset, font_charset); if (font_conv == (iconv_t) -1) { iconv_close(ucs2_to_nativecharset); iconv_close(nativecharset_to_ucs2); @@ -602,7 +602,7 @@ static void font_setup(void) /* DEL */ convert_ucs(0x7F, 0x2302, ucs2_to_nativecharset); - if (strcmp(nl_langinfo(CODESET), "UTF-8")) { + if (strcmp(local_codeset, "UTF-8")) { /* Non-Unicode capable, use termcap equivalents for those available */ for (i = 0; i <= 0xFF; i++) { wchar_t wch[CCHARW_MAX]; From patchwork Tue Sep 8 18:49:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11763947 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 34D801599 for ; Tue, 8 Sep 2020 18:56:20 +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 C9F112068D for ; Tue, 8 Sep 2020 18:56:19 +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="KbFXJYuR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C9F112068D 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]:50544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFimw-0006QC-V3 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 14:56:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFigp-0002Ea-UA; Tue, 08 Sep 2020 14:49:59 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]:52597) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFign-0002co-AL; Tue, 08 Sep 2020 14:49:59 -0400 Received: by mail-pj1-x1035.google.com with SMTP id o16so65069pjr.2; Tue, 08 Sep 2020 11:49: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=qfatTX2Pahw3MLtTsQ90jsfuDFxj9dg6nxrJN7ZCMQY=; b=KbFXJYuRAA+f837G0frJWvS34bk8UZyzhdhhDtWp8ut0A7LFOQBtxvYdcptmwcOU+y mNL7VfQTC/ZC4WmZgEmvLSI3rxG7pgNt0JFYgdsqMIDuFfIZd3Q9kRD4S4m3ebtaKcKw DbZqSCOfn4ccm4xi9qDdE41UmWU6N88j85dp4QU6CnEtGZKDHOoi/xso9sebT5hnN/tW FNppbtrfHMY0Ww94N2Vpnaoe0UNP6M0hPmG4qfO0Zrl4v/ZX5MNpICcVQRtt/VoQCQhD ZUic5seHdPK/CSRDBd+3dVotA8JnEpEISEMmbpStEDbvch1Jc9NhxgOGY55g3x8iHKuQ 8jPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qfatTX2Pahw3MLtTsQ90jsfuDFxj9dg6nxrJN7ZCMQY=; b=nSjrxDj0dK/HznkQ4Ld/GtBlvgS6m9mSDY/BtO4ni3vjJvremlp/10HF6R5W7dBKR7 Rq17oSXP40aKRqMFcORHbm9+ooTw+pSPA+He6W8M13X9w2SP0qxL2sZdWYAMazH/AZqz W2B6BNlwFbY+f+/CHKeYwJiXezDPxBdKfdk1cXAoveIX3iv+bC8VDD1CMsnDnfdvIbBi tCTz5vR1P+drbeEv907d9B/vLPRssvw3gmD+cNT16oW4ywXKAanOaw9NOJsr4vyzHQqj iFH34551LToFSyb7C1pBIjaRG9uX3yF2lnHfsqP3IeKkDLGk1rFjnfD5N0Gn4ykaKkRV i30A== X-Gm-Message-State: AOAM532bE3FbITdlTIGwJuSnos7jeGHPPyHXLrlOw3shcpjJ19WPATt2 11WF950PeJV27QcO22DSoi6yGZu/1htdHuXU X-Google-Smtp-Source: ABdhPJxiW/8jqyKMg5vO61TjgtpewNwX6JMbTBLNRPL7LD+h0OhvM3mS14a4+Rb7ItafJJfWazmVAQ== X-Received: by 2002:a17:90a:4803:: with SMTP id a3mr209486pjh.192.1599590990701; Tue, 08 Sep 2020 11:49:50 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 8sm43553pjx.14.2020.09.08.11.49.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:49:49 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PULL 04/16] curses: Fixes curses compiling errors. Date: Wed, 9 Sep 2020 02:49:06 +0800 Message-Id: <20200908184918.1085-5-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908184918.1085-1-luoyonggang@gmail.com> References: <20200908184918.1085-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1035.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is the compiling error: ../ui/curses.c: In function 'curses_refresh': ../ui/curses.c:256:5: error: 'next_maybe_keycode' may be used uninitialized in this function [-Werror=maybe-uninitialized] 256 | curses2foo(_curses2keycode, _curseskey2keycode, chr, maybe_keycode) | ^~~~~~~~~~ ../ui/curses.c:302:32: note: 'next_maybe_keycode' was declared here 302 | enum maybe_keycode next_maybe_keycode; | ^~~~~~~~~~~~~~~~~~ ../ui/curses.c:256:5: error: 'maybe_keycode' may be used uninitialized in this function [-Werror=maybe-uninitialized] 256 | curses2foo(_curses2keycode, _curseskey2keycode, chr, maybe_keycode) | ^~~~~~~~~~ ../ui/curses.c:265:24: note: 'maybe_keycode' was declared here 265 | enum maybe_keycode maybe_keycode; | ^~~~~~~~~~~~~ cc1.exe: all warnings being treated as errors Signed-off-by: Yonggang Luo --- ui/curses.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/curses.c b/ui/curses.c index 12bc682cf9..e4f9588c3e 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -262,7 +262,7 @@ static int curses2foo(const int _curses2foo[], const int _curseskey2foo[], static void curses_refresh(DisplayChangeListener *dcl) { int chr, keysym, keycode, keycode_alt; - enum maybe_keycode maybe_keycode; + enum maybe_keycode maybe_keycode = CURSES_KEYCODE; curses_winch_check(); @@ -299,7 +299,7 @@ static void curses_refresh(DisplayChangeListener *dcl) /* alt or esc key */ if (keycode == 1) { - enum maybe_keycode next_maybe_keycode; + enum maybe_keycode next_maybe_keycode = CURSES_KEYCODE; int nextchr = console_getch(&next_maybe_keycode); if (nextchr != -1) { From patchwork Tue Sep 8 18:49:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11763955 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 8B336618 for ; Tue, 8 Sep 2020 18:57:44 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3E2DF2068D for ; Tue, 8 Sep 2020 18:57:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EnSvImZ9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3E2DF2068D 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]:58696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFioJ-0001Kp-EP for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 14:57:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFigq-0002Gi-St; Tue, 08 Sep 2020 14:50:00 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:39471) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFigp-0002dD-8j; Tue, 08 Sep 2020 14:50:00 -0400 Received: by mail-pj1-x102a.google.com with SMTP id s2so60412pjr.4; Tue, 08 Sep 2020 11:49:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FykcAGlQ92KK8Qz4pGd0AfXWzqAA8073pCgMiQdYiFk=; b=EnSvImZ9ysIOoTeUW56fjqLNh69zqxHYNmBL5xDWPtpCezyxZ1Ly2nea85yjCKA4eL iaOyqeugTudpRXhIUgLcovXUToZlskhYSdCqnptdrEQtO9Y22rIcJvu0aNIlQ694PSPH eGVPwibkhPa8mimNCDHCEL6SB2NfG/E0FbE3h3zMHzcwsWy39jhOB+B6U5jep8UKU3AH HRWvgHHITTAZ4mpF0g0PDeXclc8cC5n4YH6zR2v6WPyflj4/0AS4xPrvYzZpxfj+AYP6 fOT0njiEJ7OkS9iBnNjJfBdbfU3tv/IkhHI7B0gFLGlW64RQsMZxn2+m7Zen29P1eJcw 0XAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FykcAGlQ92KK8Qz4pGd0AfXWzqAA8073pCgMiQdYiFk=; b=kXdDJxDoNIiEt0/2kHwZxbgHiUVDjNRa67i3yLCGmxlRz9pTJn+fsMo/wnAQ2QRO99 mUeHASlWIcDK53pOlZoX/6R0wl4QpEYHf4pJSOWpixoUaXBSeLxU2iqFv6JOaEup8eW6 zef0hCbaNSj9xgrEMotH4zb9oVsgooTyzPt2eZn4eYws1VFQTv6vUmf+fLoyDk7yh32o 4QZ9Vr1MQ2PumPhWeUjr9mM2KR/aRNgacHMF2CTjuBxHMx/N+krQblhGhhg3mMQNbbRI 4rXXzrDEUoc2ka3MhsvnlWpxcfEOnzzPI94/SsFHd/3WVhRLjpZ30iCGfn4qdUAScBzA xSKQ== X-Gm-Message-State: AOAM532A126MvUXkeB1wHOeGsXIdlqbRXxNRVegdjweqpG+NIkGBioKp NjE20/KmmS+NhwYRSJnAxOafvyj28sHsUK+j X-Google-Smtp-Source: ABdhPJyN9mtI1X6PPEQMIj+rHr55fCzNb5mtEv/p1xzJg/WeOkzCWfJPBCv6ZoJaqR1vBRJkH782aw== X-Received: by 2002:a17:90a:414d:: with SMTP id m13mr181147pjg.163.1599590994692; Tue, 08 Sep 2020 11:49:54 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 8sm43553pjx.14.2020.09.08.11.49.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:49:53 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PULL 05/16] tests: disable /char/stdio/* tests in test-char.c on win32 Date: Wed, 9 Sep 2020 02:49:07 +0800 Message-Id: <20200908184918.1085-6-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908184918.1085-1-luoyonggang@gmail.com> References: <20200908184918.1085-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x102a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" These tests are blocking test-char to be finished. Signed-off-by: Yonggang Luo --- tests/test-char.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test-char.c b/tests/test-char.c index d35cc839bc..80e5bac61a 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -103,6 +103,7 @@ static void char_console_test(void) g_test_trap_assert_stdout("CONSOLE"); } #endif +#ifndef _WIN32 static void char_stdio_test_subprocess(void) { Chardev *chr; @@ -126,6 +127,7 @@ static void char_stdio_test(void) g_test_trap_assert_passed(); g_test_trap_assert_stdout("buf"); } +#endif static void char_ringbuf_test(void) { @@ -1471,8 +1473,10 @@ int main(int argc, char **argv) g_test_add_func("/char/console/subprocess", char_console_test_subprocess); g_test_add_func("/char/console", char_console_test); #endif +#ifndef _WIN32 g_test_add_func("/char/stdio/subprocess", char_stdio_test_subprocess); g_test_add_func("/char/stdio", char_stdio_test); +#endif #ifndef _WIN32 g_test_add_func("/char/pipe", char_pipe_test); #endif From patchwork Tue Sep 8 18:49:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11763917 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 19397618 for ; Tue, 8 Sep 2020 18:50:54 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 843F52067C for ; Tue, 8 Sep 2020 18:50: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="vaWOmXUO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 843F52067C 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]:52112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFihg-00042c-2U for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 14:50:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFigt-0002OE-Ra; Tue, 08 Sep 2020 14:50:03 -0400 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]:38672) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFigq-0002em-OT; Tue, 08 Sep 2020 14:50:03 -0400 Received: by mail-pj1-x1044.google.com with SMTP id u3so64292pjr.3; Tue, 08 Sep 2020 11:50:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ax2yAUytKuTKhH+tVXqGE0gj/9bVazXwd00LBZJO+WI=; b=vaWOmXUO+VbXtc5SVrv7u/lulvpRPCqKlmCEzMYGhQqOwLnnwsuqpoIbWOnUSt92hU mw3YlJQBGiRC2BjR2zDiL436AR2m+I4kL+h7mFx01wAbej+TPqYqypd6+FyCvK+xTxF4 +pJuFTrQphJcKrxneOhlxUcaxF0XUXEMiZ0BfV2sMrq90OdjLozl3ZIEi63Zw7TgLcji xinrXruthorCeZtRewvHU2bynNkxIJ9g000atUGeePG2WFnGs7Go5UxhpZ/AVsURGCqq ZYtBnqaGVcCVtDsz1lEbol47N/tHzIWz0FfWBqSokjZIw/pBxqRKIhQ3AU3yU6MV5NiQ i/MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ax2yAUytKuTKhH+tVXqGE0gj/9bVazXwd00LBZJO+WI=; b=UqXLUbCYDcXXFyhSoa5UZBLo0/btVgVWesXhNVaPznJAXf4PXQRdkfmsFaNVudvOqL Kc/dOMG1WCLG5DQtOvgRQVc0meCEsoDKgMXegijpKF9ltKHU9BRV8I2BbkywDeK9XANJ SNUdEeEG4jmsCZotLXZOq00qF+AJuQky40zyH+DXvdLUFNaaYHpT8/f9rIpGeqPl7x4b pZ/JGl8RRmBW8I12mZRYdxEaqWyecM7WI7iO2vXQbe1Nu/pDnDFDusWmPF8zcN+HqLmE o5n7+REgTf5nSlOPKFTru/0UL6lw0XoQ/zTElbOmRKknQhi5dkB3F5UkrwIWaJgCueed jisg== X-Gm-Message-State: AOAM531gjRVP7jwS7n6wFMQYh4uMqBQM8QPwCfVjlWQxF6GELoCojAkY 63dmt0Ue6vXLRElRb3f268IN+g8xPn3k5UZP X-Google-Smtp-Source: ABdhPJzgp+Yx9Q1KkTnn/x+BvTBwGqqUQ1xT5SDjSKcPf3tCxBy430iIC5MjpZ/8+uxCQedeTtD+TQ== X-Received: by 2002:a17:90a:a60c:: with SMTP id c12mr193774pjq.1.1599590998639; Tue, 08 Sep 2020 11:49:58 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 8sm43553pjx.14.2020.09.08.11.49.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:49:57 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PULL 06/16] ci: Enable msys2 ci in cirrus Date: Wed, 9 Sep 2020 02:49:08 +0800 Message-Id: <20200908184918.1085-7-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908184918.1085-1-luoyonggang@gmail.com> References: <20200908184918.1085-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1044; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1044.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 The https://wiki.qemu.org/Hosts/W32#Native_builds_with_MSYS2 need to be updated. There is no need of --cross-prefix, open mingw64.exe instead of msys2.exe then we don't need the --cross-prefix, besides we using environment variable settings: MSYS: winsymlinks:nativestrict MSYSTEM: MINGW64 CHERE_INVOKING: 1 to opening mingw64 native shell. We now running tests with make -i check to skip tests errors. Signed-off-by: Yonggang Luo --- .cirrus.yml | 24 +++++++++++++++++++++ scripts/ci/windows/msys2-build.sh | 28 ++++++++++++++++++++++++ scripts/ci/windows/msys2-install.sh | 33 +++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 scripts/ci/windows/msys2-build.sh create mode 100644 scripts/ci/windows/msys2-install.sh diff --git a/.cirrus.yml b/.cirrus.yml index 3dd9fcff7f..49335e68c9 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -63,3 +63,27 @@ macos_xcode_task: --enable-werror --cc=clang || { cat config.log; exit 1; } - gmake -j$(sysctl -n hw.ncpu) - gmake check + +windows_msys2_task: + windows_container: + image: cirrusci/windowsservercore:cmake + os_version: 2019 + cpu: 8 + memory: 8G + env: + MSYS: winsymlinks:nativestrict + MSYSTEM: MINGW64 + CHERE_INVOKING: 1 + printenv_script: + - C:\tools\msys64\usr\bin\bash.exe -lc 'printenv' + install_script: + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig" + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && pacman -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Sy --noconfirm" + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --needed --noconfirm -S bash pacman pacman-mirrors msys2-runtime" + - taskkill /F /IM gpg-agent.exe + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Su" + - C:\tools\msys64\usr\bin\bash.exe -lc "sh scripts/ci/windows/msys2-install.sh" + script: + - C:\tools\msys64\usr\bin\bash.exe -lc "sh scripts/ci/windows/msys2-build.sh" diff --git a/scripts/ci/windows/msys2-build.sh b/scripts/ci/windows/msys2-build.sh new file mode 100644 index 0000000000..d9d046b5b0 --- /dev/null +++ b/scripts/ci/windows/msys2-build.sh @@ -0,0 +1,28 @@ +mkdir build +cd build +../configure \ +--python=python3 \ +--ninja=ninja \ +--enable-stack-protector \ +--enable-guest-agent \ +--disable-pie \ +--enable-gnutls --enable-nettle \ +--enable-sdl --enable-sdl-image --enable-gtk --disable-vte --enable-curses --enable-iconv \ +--enable-vnc --enable-vnc-sasl --enable-vnc-jpeg --enable-vnc-png \ +--enable-slirp=git \ +--disable-brlapi --enable-curl \ +--enable-fdt \ +--disable-kvm --enable-hax --enable-whpx \ +--enable-libnfs --enable-libusb --enable-live-block-migration --enable-usb-redir \ +--enable-lzo --enable-snappy --enable-bzip2 --enable-zstd \ +--enable-membarrier --enable-coroutine-pool \ +--enable-libssh --enable-libxml2 \ +--enable-jemalloc --enable-avx2 \ +--enable-replication \ +--enable-tools \ +--enable-bochs --enable-cloop --enable-dmg --enable-qcow1 --enable-vdi --enable-vvfat --enable-qed --enable-parallels \ +--enable-sheepdog \ +--enable-capstone=git + +make -j$NUMBER_OF_PROCESSORS +make -i -j$NUMBER_OF_PROCESSORS check diff --git a/scripts/ci/windows/msys2-install.sh b/scripts/ci/windows/msys2-install.sh new file mode 100644 index 0000000000..6086452399 --- /dev/null +++ b/scripts/ci/windows/msys2-install.sh @@ -0,0 +1,33 @@ +pacman --noconfirm -S --needed \ +base-devel \ +git \ +mingw-w64-x86_64-python \ +mingw-w64-x86_64-python-setuptools \ +mingw-w64-x86_64-toolchain \ +mingw-w64-x86_64-SDL2 \ +mingw-w64-x86_64-SDL2_image \ +mingw-w64-x86_64-gtk3 \ +mingw-w64-x86_64-glib2 \ +mingw-w64-x86_64-ninja \ +mingw-w64-x86_64-make \ +mingw-w64-x86_64-jemalloc \ +mingw-w64-x86_64-lzo2 \ +mingw-w64-x86_64-zstd \ +mingw-w64-x86_64-libjpeg-turbo \ +mingw-w64-x86_64-pixman \ +mingw-w64-x86_64-libgcrypt \ +mingw-w64-x86_64-capstone \ +mingw-w64-x86_64-libpng \ +mingw-w64-x86_64-libssh \ +mingw-w64-x86_64-libxml2 \ +mingw-w64-x86_64-snappy \ +mingw-w64-x86_64-libusb \ +mingw-w64-x86_64-usbredir \ +mingw-w64-x86_64-libtasn1 \ +mingw-w64-x86_64-libnfs \ +mingw-w64-x86_64-nettle \ +mingw-w64-x86_64-cyrus-sasl \ +mingw-w64-x86_64-curl \ +mingw-w64-x86_64-gnutls \ +mingw-w64-x86_64-zstd \ + From patchwork Tue Sep 8 18:49: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: 11763927 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 E08E01599 for ; Tue, 8 Sep 2020 18:52: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 972FA2067C for ; Tue, 8 Sep 2020 18:52:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="al+bwAPm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 972FA2067C 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]:58540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFij3-0006dK-LB for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 14:52:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFigw-0002Uq-FI; Tue, 08 Sep 2020 14:50:06 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:45863) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFigu-0002fl-My; Tue, 08 Sep 2020 14:50:06 -0400 Received: by mail-pg1-x544.google.com with SMTP id 67so169937pgd.12; Tue, 08 Sep 2020 11:50: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=J6p0/9F4oWoBiAN/SDJT/VDhYaeCOAUy66N0oF2OF+w=; b=al+bwAPmK2vB3f/cr4VR6nO6eS9nwdtcdJOqwOoxYQs6nIEgqbS88wmFsXPnft+XER 4WPUVIrgqYWclDMWDkiX9BlpGxtH/Z0IFdn6ZrsPDif/XP/zporgjnfdXRCfKgprSrJb S4/+jTjrrKSOSYjeqNYPu3CUy3W+PMrBvWEYJGTfxFhOK1MPvxSkJWH3NmamrMyQaKV6 P+kKV86q2GwibwWuTNyf3ThBKTKSshkbAJ7I0pvn9YCmK51e30R7LW6rN2z+VhEPBeG3 /lDSFyTF8k3fOQOWsmbQB1x9CypWpaatFytB2tW51fxwHNl6PC5eN3UchWaIUnHpHi4e 12sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J6p0/9F4oWoBiAN/SDJT/VDhYaeCOAUy66N0oF2OF+w=; b=CPeSWhm6WRLG7KtDQeQIjvDF9+rvDM4X9oDUQpmghQRur85bO6EAsns5DZmWe/xL60 0/NOC53jrCEw1NWPwxf0xEX/MOxhy0itoqxbUzlWFuVT6b4zn/BaE1K5zfmidHMeQ/8I TOw8tUgcats5NNPtbIlMxN4WMrRti7J7Mw3yBXAI1VCsOFxl3KJrmeib9T0BcbSOUihr oME86a1+Fr2QaBsFfPESjCfHioZtLDJXLocFN23NyAPd8dFl5R0gmgPAyTlKsvsfcuCE wx0ozSoUdsglQyGucPs//ys9owfAV7nrkpGT04Cd7IA9nn3XNS7FUmS+Auv1ij7EaJp1 g4NQ== X-Gm-Message-State: AOAM5324RH+4ic/gIM4CnymdqvRcksHKO4QMjK7JDQOFubjhNKc3gTPh X8bhWMxRwFTQr5WZ/mwjTrooAzOpvXrjyqM2 X-Google-Smtp-Source: ABdhPJx7mnH+FGzeHgy/LoeKu+HiG8406aBUpCxpVftxYBszTAvVDnejbcRBkCyS9XYbQ6Tlor06Tg== X-Received: by 2002:a62:7ec2:0:b029:138:8cbc:ebd4 with SMTP id z185-20020a627ec20000b02901388cbcebd4mr484358pfc.2.1599591002614; Tue, 08 Sep 2020 11:50:02 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 8sm43553pjx.14.2020.09.08.11.49.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:50:01 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PULL 07/16] tests: Trying fixes test-replication.c on msys2/mingw. Date: Wed, 9 Sep 2020 02:49:09 +0800 Message-Id: <20200908184918.1085-8-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908184918.1085-1-luoyonggang@gmail.com> References: <20200908184918.1085-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::544; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x544.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" On Windows there is no path like /tmp/s_local_disk.XXXXXX Signed-off-by: Yonggang Luo --- tests/test-replication.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/test-replication.c b/tests/test-replication.c index 9ab3666a90..cfc1ae6feb 100644 --- a/tests/test-replication.c +++ b/tests/test-replication.c @@ -23,14 +23,14 @@ /* primary */ #define P_ID "primary-id" -static char p_local_disk[] = "/tmp/p_local_disk.XXXXXX"; +static char p_local_disk[PATH_MAX]; /* secondary */ #define S_ID "secondary-id" #define S_LOCAL_DISK_ID "secondary-local-disk-id" -static char s_local_disk[] = "/tmp/s_local_disk.XXXXXX"; -static char s_active_disk[] = "/tmp/s_active_disk.XXXXXX"; -static char s_hidden_disk[] = "/tmp/s_hidden_disk.XXXXXX"; +static char s_local_disk[PATH_MAX]; +static char s_active_disk[PATH_MAX]; +static char s_hidden_disk[PATH_MAX]; /* FIXME: steal from blockdev.c */ QemuOptsList qemu_drive_opts = { @@ -571,6 +571,11 @@ static void setup_sigabrt_handler(void) int main(int argc, char **argv) { int ret; + const char *tmpdir = g_get_tmp_dir(); + snprintf(p_local_disk, sizeof(p_local_disk), "%s/p_local_disk.XXXXXX", tmpdir); + snprintf(s_local_disk, sizeof(s_local_disk), "%s/s_local_disk.XXXXXX", tmpdir); + snprintf(s_active_disk, sizeof(s_active_disk), "%s/s_active_disk.XXXXXX", tmpdir); + snprintf(s_hidden_disk, sizeof(s_hidden_disk), "%s/s_hidden_disk.XXXXXX", tmpdir); qemu_init_main_loop(&error_fatal); bdrv_init(); From patchwork Tue Sep 8 18:49:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11763933 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 6229E1599 for ; Tue, 8 Sep 2020 18:53:28 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2C06B2080A for ; Tue, 8 Sep 2020 18:53: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="EhgPWbkN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C06B2080A 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]:37204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFikB-0000xm-Bu for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 14:53:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFih4-0002eb-1I; Tue, 08 Sep 2020 14:50:14 -0400 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]:40694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFigy-0002ga-SU; Tue, 08 Sep 2020 14:50:13 -0400 Received: by mail-pg1-x535.google.com with SMTP id j34so188259pgi.7; Tue, 08 Sep 2020 11:50:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ptTGH2qI85N+szgczRA8YGLjVKH01noRoeLoG/lJ5SE=; b=EhgPWbkNVems8YLYyE6wr7sF3xArBQOXekof16RmurAfg/8Tf1cIeCmt/8VD9gsfzn hofsdtHoodqunACuZc2+2JGv9mkx1AgmLK18zV+xPKmP0gOzkv3x8xLIK8e6ipKKpihl 3x0izdXJ87iBlKZVgCFfWd7pwpiX/J8lHc3XLUmOT1HQGXlG6T9826Dd5q+4R63Nyg6X ppGq1/goPM3KNvJyrUV4pDDjjkAWvqoMDEhJgAR/8KiABIKdDcibu/gwhRbrcI6Goull QUHh75lL0o+LLOghC4tAieWjKAJc7MeeNqzNegh1wognn6h7TJFBwkUM7ITtF29XDI7f nYkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ptTGH2qI85N+szgczRA8YGLjVKH01noRoeLoG/lJ5SE=; b=GrbebvKgExntvqxpAq8pykbLN9fHpa3c2ES3+KRoyLBUZ3HYjlFm4AjRItp43kIKgk tqgTW6UmmooyFRN3XN1ecpeu6j5bdFGRzpO7pQbzivQ8jkL04JzA1CyT2gsrOVaEALfT oeTeaQhExZahjShRYnQil1LBoy43GxR1S4mlXr+Y7KczXSo9vkI7aZ7/0DjO2iM06ULr 3MSaRW3RSrOrILllZmt57mrqoDCpLmOpBDYeLoAwOoH0RMMrY9FfR1mXVTZMD79yQ673 mo0NGf5Am9CX2WLunheRhrz4A5lYH55JpWHjvZikS/uUzbUNTMpg2EmMn9I2J8OTFHbE iXwA== X-Gm-Message-State: AOAM533YPocgLgrih3PWQ4vr5pICh/dlT7ynWOGiXI3B9afebvbHfyTA iHbFhYeFRuPNnrQuvONKOzns4YeXYP1id+DL X-Google-Smtp-Source: ABdhPJy0fnPJmIYZlrwQzKWxv3tGj9eNmltm6Epm6cqbri+NIC4Jer4Ny3/j8TTkxOf4OVOTlRXsDA== X-Received: by 2002:a65:68d6:: with SMTP id k22mr128248pgt.136.1599591006582; Tue, 08 Sep 2020 11:50:06 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 8sm43553pjx.14.2020.09.08.11.50.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:50:05 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PULL 08/16] block: get file-win32.c handle locking option consistence with file-posix.c Date: Wed, 9 Sep 2020 02:49:10 +0800 Message-Id: <20200908184918.1085-9-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908184918.1085-1-luoyonggang@gmail.com> References: <20200908184918.1085-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::535; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x535.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Yonggang Luo --- block/file-win32.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/block/file-win32.c b/block/file-win32.c index ab69bd811a..14e5f5c3b5 100644 --- a/block/file-win32.c +++ b/block/file-win32.c @@ -299,6 +299,11 @@ static QemuOptsList raw_runtime_opts = { .type = QEMU_OPT_STRING, .help = "host AIO implementation (threads, native)", }, + { + .name = "locking", + .type = QEMU_OPT_STRING, + .help = "file locking mode (on/off/auto, default: auto)", + }, { /* end of list */ } }, }; @@ -334,6 +339,7 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags, const char *filename; bool use_aio; int ret; + OnOffAuto locking; s->type = FTYPE_FILE; @@ -342,11 +348,24 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags, ret = -EINVAL; goto fail; } - - if (qdict_get_try_bool(options, "locking", false)) { + locking = qapi_enum_parse(&OnOffAuto_lookup, + qemu_opt_get(opts, "locking"), + ON_OFF_AUTO_AUTO, &local_err); + if (local_err) { + error_propagate(errp, local_err); + ret = -EINVAL; + goto fail; + } + switch (locking) { + case ON_OFF_AUTO_ON: error_setg(errp, "locking=on is not supported on Windows"); ret = -EINVAL; goto fail; + case ON_OFF_AUTO_OFF: + case ON_OFF_AUTO_AUTO: + break; + default: + g_assert_not_reached(); } filename = qemu_opt_get(opts, "filename"); From patchwork Tue Sep 8 18:49: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: 11763937 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 056CC1599 for ; Tue, 8 Sep 2020 18:54: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 BE8BE2067C for ; Tue, 8 Sep 2020 18:54:52 +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="V6OFu2dg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE8BE2067C 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]:43540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFilX-0003Y0-Ux for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 14:54:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFih7-0002nL-HJ; Tue, 08 Sep 2020 14:50:17 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:39436) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFih4-0002h9-CG; Tue, 08 Sep 2020 14:50:17 -0400 Received: by mail-pf1-x431.google.com with SMTP id n14so3776126pff.6; Tue, 08 Sep 2020 11:50: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=XFEZh3+xvAfqz2f0h/nVnmxCipA8eA9k8U4UHOk894U=; b=V6OFu2dg6CZvLJjbfgWJjGtZFKLFtNuLZXNc1L3aFXCcKG/2ZpUzCIy8KSpTu+6+sd NcQjFfA27TxpZISu5N8PGBte5xj1A6DgMM7+nrp5hAhRO4Pi/EgZ3UadkDe9BH5ps/iR op14hBtrLxq+nKPNyWj6NVD+3Kvl/YH3eABMKDcF7uYq09GXh+5HjJi+cM990LkXI6QR SIx44jMPCsgoums1CY0CpG8LIXlh8cDmSnwuRbZTi2LffQaX5q2uQDDQhEyf/DkNCzVH GwkQ+SoO80Fwl/KJ+bb3lTBStzyHKZC/vi/aBNx0QFAIMKuEIFg0RedxtBTPchuf1MUr FJ9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XFEZh3+xvAfqz2f0h/nVnmxCipA8eA9k8U4UHOk894U=; b=PuXDC+zSMX8+n8aY3k4rsBS8TNp7eQUmeFeA69azP3J4XAMminuKOIHOT/iBLnB73H KhNgmwI+Wxz/rImMO8ue3QcGsLvlGnbt4+gob6WzTF+gflWnxW2sNJ+HEVNjILad1gTF VJYaUQw3Lne7E1arfsE3OQJ8lyWJXbKkOZkmH9kMzw1Wv5feosUDNx4DPMSWg2p/yv2c 9O+6Q1+eXKOfaCSJcx4z/sPRCfVACgLL0I/KMTwoljAFWeQmmNjJanZt89om3JpIczLO lC8+aNAILkJyG3nZPx54rpbXm/9KIn7KIWr6uIcl60qApLrWSq6iNa93h572YTnASU2R p0Nw== X-Gm-Message-State: AOAM533wPpy6xDk1Df8fRWUCBWJ8Sqqd2tlK8ppJu6xzC7NePO2fGAiv t312BPHFA8KYa8DDlGBobvXAdCtoGzw3ljV6 X-Google-Smtp-Source: ABdhPJxltAQNJQpjpo6QySn0Om5mVDidGep+Vu7ytVk+Z9fksOba0nhu8czLC/wAi8SNPDfgLTQ4Bg== X-Received: by 2002:a17:902:b786:: with SMTP id e6mr63063pls.5.1599591010601; Tue, 08 Sep 2020 11:50:10 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 8sm43553pjx.14.2020.09.08.11.50.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:50:09 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PULL 09/16] osdep: These function are only available on Non-Win32 system. Date: Wed, 9 Sep 2020 02:49:11 +0800 Message-Id: <20200908184918.1085-10-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908184918.1085-1-luoyonggang@gmail.com> References: <20200908184918.1085-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x431.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" int qemu_lock_fd(int fd, int64_t start, int64_t len, bool exclusive); int qemu_unlock_fd(int fd, int64_t start, int64_t len); int qemu_lock_fd_test(int fd, int64_t start, int64_t len, bool exclusive); bool qemu_has_ofd_lock(void); Signed-off-by: Yonggang Luo --- include/qemu/osdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 412962d91a..e80fddd1e8 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -502,11 +502,11 @@ int qemu_close(int fd); int qemu_unlink(const char *name); #ifndef _WIN32 int qemu_dup(int fd); -#endif int qemu_lock_fd(int fd, int64_t start, int64_t len, bool exclusive); int qemu_unlock_fd(int fd, int64_t start, int64_t len); int qemu_lock_fd_test(int fd, int64_t start, int64_t len, bool exclusive); bool qemu_has_ofd_lock(void); +#endif #if defined(__HAIKU__) && defined(__i386__) #define FMT_pid "%ld" From patchwork Tue Sep 8 18:49: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: 11763931 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 3B402618 for ; Tue, 8 Sep 2020 18:53:28 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 007442067C for ; Tue, 8 Sep 2020 18:53:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="isDCUdUf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 007442067C 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]:37188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFikB-0000xQ-5K for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 14:53:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFihA-0002tV-NQ; Tue, 08 Sep 2020 14:50:20 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]:33775) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFih8-0002hq-UU; Tue, 08 Sep 2020 14:50:20 -0400 Received: by mail-pf1-x430.google.com with SMTP id c196so49272pfc.0; Tue, 08 Sep 2020 11:50:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=INK+kK1nWbJF7y+rXihzR5UqDDo3HdyPVAq4bdijot0=; b=isDCUdUfT2aQ208FaU1RwZRcQ4ZgSspqOkDdV2BmRe9ucEEUFCCilst3EkvCXVgnWz VjkjOWCisC7N8zi+CZ7Iz88kgzokrjQkiiz8XQv1IhX4qOoljT+TBUYQaqxF5AKNjjMB K7qoQ8iHdggCENhxfRddlJsnfnT6NYa6lSCNyBnrY20Lt6Wor0nNbssJi6srBXi3vKY9 jY0E8+vOP1kQYwXr7MnqOwc6Kq9TFkf5pIkeHp6uvD/A9yMNtVa4ZEYq1OLo7RfEFDf+ IUuDSgL4/6ZMTp+vY2L8k0KBtxRogtJurf0idDrJZmEzGRZemGfs0wrRhXhky7TGVOaV /rFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=INK+kK1nWbJF7y+rXihzR5UqDDo3HdyPVAq4bdijot0=; b=RfcuowNqpEQqyG1BVCYMEsIoeiZdoQ8OhqDwseiT9dxkhoe8lyVgpcvD9TEDzjZjQT U4VdqVeXjBwFT2cTjJI2j4lig8NsyMqsumtdp6DYtr0p6nMAs0795KMUASWEQ4pQZATB V2Jm6D5+A+o+C3n32u3Fk6Cqo62F8MiWkl8ny/XTKrSPJW0jDwLxCRISR8jkeXH+kR5R bM+8k64uLFx5t08CmwLWCZ7rvVJyz5fKVhSB+tugKZeTrniiEzsoYJts5UxWQhkXiCd1 SW3uhg6XzJAjR/e0N5s3iWFSo68qS4536IKOD8lgR56oG1+7V7u1Qq6mryhkdXAFVtXX EHpw== X-Gm-Message-State: AOAM531izNmay/zVL6afzcx4qK7LJSMnhTxvlBZ8oNk5aqg48v1VaVoz c+3qihIQbE/v032eFSb0NIRz3mIPbM4qjZVq X-Google-Smtp-Source: ABdhPJyQANkA3MXT9rKBX0DtGUNkZBqmqVBCL89DrSChekjamn1Erz8l8JDzzATRR3ol1yqCopJSKA== X-Received: by 2002:a17:902:ab8e:: with SMTP id f14mr43793plr.99.1599591016745; Tue, 08 Sep 2020 11:50:16 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 8sm43553pjx.14.2020.09.08.11.50.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:50:13 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PULL 10/16] meson: Use -b to ignore CR vs. CR-LF issues on Windows Date: Wed, 9 Sep 2020 02:49:12 +0800 Message-Id: <20200908184918.1085-11-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908184918.1085-1-luoyonggang@gmail.com> References: <20200908184918.1085-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x430.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" On windows, a difference in line endings causes testsuite failures complaining that every single line in files such as 'tests/qapi-schemadoc-good.texi' is wrong. Fix it by adding -b to diff. Signed-off-by: Yonggang Luo Reviewed-by: Eric Blake --- tests/qapi-schema/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qapi-schema/meson.build b/tests/qapi-schema/meson.build index c87d141417..f1449298b0 100644 --- a/tests/qapi-schema/meson.build +++ b/tests/qapi-schema/meson.build @@ -220,6 +220,6 @@ qapi_doc = custom_target('QAPI doc', # "full_path()" needed here to work around # https://github.com/mesonbuild/meson/issues/7585 -test('QAPI doc', diff, args: ['-u', files('doc-good.texi'), qapi_doc[0].full_path()], +test('QAPI doc', diff, args: ['-b', '-u', files('doc-good.texi'), qapi_doc[0].full_path()], depends: qapi_doc, suite: ['qapi-schema', 'qapi-doc']) From patchwork Tue Sep 8 18:49:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11763939 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 62356618 for ; Tue, 8 Sep 2020 18:54:57 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 28FCE2067C for ; Tue, 8 Sep 2020 18:54:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GiOJjH3i" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28FCE2067C 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]:43960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFilc-0003i7-7P for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 14:54:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFihE-00031H-E2; Tue, 08 Sep 2020 14:50:28 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:43478) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFihC-0002ib-PD; Tue, 08 Sep 2020 14:50:24 -0400 Received: by mail-pg1-x533.google.com with SMTP id t14so177822pgl.10; Tue, 08 Sep 2020 11:50:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yqpsa73bQrzKkEPT9F/kH2K7vNqI8slBD9edFCTrOo0=; b=GiOJjH3ilEZikj3FTRNsztRMH1W97EMua3CMJHa8ywtwXLASqFqWU/2TR0ZAeWE3jY edfgF7PnTiORe1isWQxyJq3h58bg1joez1yYqx0v+jYgQzX/FPsCQdJ2NURi5wtmUESE Olcdl2g1KiMquWWYlvwAvxer4UAUkQkFt7ZORQ3FcYIg8WhrKFJcaq+De9lW+atuFSbq +pZpDWbxWjYwI26mGBS1ONmWGYl9kKHl5evY/QosgrlpM3TA0ch0575exw3lreYS576b gzSObE8Lkn/8l3SHGZnum7mCWhtlyq5c4RMVT6ddm7uZYGCevn2ufVxtlklaFtdoqD2K HyiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yqpsa73bQrzKkEPT9F/kH2K7vNqI8slBD9edFCTrOo0=; b=GbNeecMzMQsFIKlFiVV1Pj3ia2k2I3WUZciKQ3nNCjeY724++r0TLVIB8zqDtYQUmj A3tUXev2XLWrDibo5mQZsYvnYg+f01tOwLzODoo9MkXe4tLO0IwbfCP2b9zQL+9dmfzl e+aD2/C9JiI8PwIS9Yk0U9uu7My1ZRHCcz6F5m9J/6fd7QARwCSUvh3oX0c03PIylLrr Ne9cJYj2bEMrDxp+/2/gyBBH1eS9n6hzFgxZhaYI3fTGQrr5+xXq/itmMSZNcg1dbsQN eT7ujba83cB9VXnkY6UpFchJlLtOvR8ijX1jN+xvL4ctGS36wrofTcXJbXDBlk8HVdQk pOyg== X-Gm-Message-State: AOAM53252bv+pLvvRrBaeOWvfEU6Tk0JY3jv2biv/Lv6AK+sTaBzhnrr 6Vd8NxBfEpCg0teFpP/d8I0AnPZdTJcZ0YFY X-Google-Smtp-Source: ABdhPJy+6wN4EfQnzL5iwjDk/XdHPi6JbeWCWa9ufz1jkUM5eqSss2Sa0C7WLpTGjl2mdtxq3Otn/g== X-Received: by 2002:a63:5561:: with SMTP id f33mr109436pgm.13.1599591020731; Tue, 08 Sep 2020 11:50:20 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 8sm43553pjx.14.2020.09.08.11.50.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:50:19 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PULL 11/16] meson: disable crypto tests are empty under win32 Date: Wed, 9 Sep 2020 02:49:13 +0800 Message-Id: <20200908184918.1085-12-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908184918.1085-1-luoyonggang@gmail.com> References: <20200908184918.1085-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::533; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x533.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Disable following tests on msys2/mingw 'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c', tasn1, crypto], 'test-crypto-tlssession': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c', 'crypto-tls-psk-helpers.c', tasn1, crypto], 'test-io-channel-tls': ['io-channel-helpers.c', 'crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c', tasn1, io, crypto]} Signed-off-by: Yonggang Luo --- tests/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/meson.build b/tests/meson.build index 998e4c48f9..b470a90e3a 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -145,7 +145,8 @@ if have_block 'test-crypto-block': [io], } if 'CONFIG_GNUTLS' in config_host and \ - 'CONFIG_TASN1' in config_host + 'CONFIG_TASN1' in config_host and \ + 'CONFIG_POSIX' in config_host tests += { 'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c', tasn1, crypto], From patchwork Tue Sep 8 18:49: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: 11763921 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 D63531599 for ; Tue, 8 Sep 2020 18:51: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 88C922067C for ; Tue, 8 Sep 2020 18:51:32 +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="Be3gGSOu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 88C922067C 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]:54192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFiiJ-0004tM-Db for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 14:51:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFihK-00036C-7I; Tue, 08 Sep 2020 14:50:30 -0400 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]:40688) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFihI-0002kz-Hm; Tue, 08 Sep 2020 14:50:29 -0400 Received: by mail-pg1-x52d.google.com with SMTP id j34so188848pgi.7; Tue, 08 Sep 2020 11:50:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=30KkRCFEtXNka1aga0YHq3EqESHJABavOs610tDas18=; b=Be3gGSOulo7LD2Xgr3lfyiQIIYyNJPzoLDmCDqUDa/gO6ghcf+0pFbKo2Wxac6DsQD /rUK4aTSlSlE4wCNwjGyc9Xyma0Bsti1PkJJZmHrwFjM7F/m5UbGJOxYnt2e1WY2Zf6G Zz6OEO0sbMZVpcFHOskD3QkLXO/Bp7PKIudjAxHtMEn6kduhuk8b+JTP5bAz9wqTkYV8 amRrarwtZ2PtlyqsSduqTX85QWbLhUOWAzu7E9WAJGMvdj2KzAAd33UrCjxm5D6qHKuG t1PrvvCNJUjqDEVxbksyfFU8uNTBlIM4DxgRxwtVaBNwyu4eMz+FjPJy9Ig0D+Iax/g9 URnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=30KkRCFEtXNka1aga0YHq3EqESHJABavOs610tDas18=; b=XEGVec8wJnxlULiZwLHwgPoSNpY1QpyNz/wfAUFNKLEK9Pff9zlK4BOr00X/nO8n90 LFDMTA/5QpZ3owOwncdsnINxMYVvtloMJYrcKruezsIjOxHpphPV9+tgUSV0LZpTuj9U wQceB2wdo+c54LZ41Vn07xeb04NLGFoo7bmgEkZqwto7+u6K8cUnKrIk+Rqh1q/ovXgt bZpD3pLG5BMW3UB80GtLNVqjSmaELgjH68dinIhAlrFFCaioAF78u5xvyXWuA6HILj5I 1R1QUg57qVz8BUD5hohOG3HWEYf0cgheD95dNK3x+RmKLDTvs6PN4CmgBfYuqVbwL9jP wzJg== X-Gm-Message-State: AOAM531gzN1rJ1rfcFVcu1sNRwMJEBPITLVrbrKOkD49LCPbE9ot4JJP b1lOA+1EBbzKFWzcwJmeFNgNEkF+eGFRwfuz X-Google-Smtp-Source: ABdhPJyqi+yLqF1aWAOhzmqZ8Buu+4f9lZMT+zsW4wRE5+uBl1oVBWReVWlZ4PstIWiL8jbmlxnzxQ== X-Received: by 2002:a63:242:: with SMTP id 63mr83722pgc.375.1599591024692; Tue, 08 Sep 2020 11:50:24 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 8sm43553pjx.14.2020.09.08.11.50.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:50:23 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PULL 12/16] meson: remove empty else and duplicated gio deps Date: Wed, 9 Sep 2020 02:49:14 +0800 Message-Id: <20200908184918.1085-13-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908184918.1085-1-luoyonggang@gmail.com> References: <20200908184918.1085-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52d; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x52d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Yonggang Luo --- meson.build | 6 ------ 1 file changed, 6 deletions(-) diff --git a/meson.build b/meson.build index 5421eca66a..0b1741557d 100644 --- a/meson.build +++ b/meson.build @@ -317,7 +317,6 @@ opengl = not_found if 'CONFIG_OPENGL' in config_host opengl = declare_dependency(compile_args: config_host['OPENGL_CFLAGS'].split(), link_args: config_host['OPENGL_LIBS'].split()) -else endif gtk = not_found if 'CONFIG_GTK' in config_host @@ -344,11 +343,6 @@ if 'CONFIG_ICONV' in config_host iconv = declare_dependency(compile_args: config_host['ICONV_CFLAGS'].split(), link_args: config_host['ICONV_LIBS'].split()) endif -gio = not_found -if 'CONFIG_GIO' in config_host - gio = declare_dependency(compile_args: config_host['GIO_CFLAGS'].split(), - link_args: config_host['GIO_LIBS'].split()) -endif vnc = not_found png = not_found jpeg = not_found From patchwork Tue Sep 8 18:49: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: 11763943 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 B5A461599 for ; Tue, 8 Sep 2020 18:56:02 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 15B4A2068D for ; Tue, 8 Sep 2020 18:56: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="BkwaF10W" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 15B4A2068D 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]:49298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFimf-0005vV-9K for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 14:56:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFihM-0003Cv-N9; Tue, 08 Sep 2020 14:50:32 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:38261) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFihL-0002o5-5R; Tue, 08 Sep 2020 14:50:32 -0400 Received: by mail-pf1-x42d.google.com with SMTP id l126so4695750pfd.5; Tue, 08 Sep 2020 11:50: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=9VMmLATL4hLY9MeoSmcNwnDOjnsVNymdFAgQMcXeglM=; b=BkwaF10WtWNLIvDotjR89OlGaCOVDtQFKpTkNmbQpJKvxWwcZlCrjySkVQeR0qUbvI cvlddfIZ+A+1G6qlx4M39Aa59Pjf7IrZfjMKg5uRDJ3O+n5yDrktF4lf70DaIv/a30bc FF7pgxc69IZVhBsV/Umxe3m2nxjDgHcFjdtw7EnEr1+IjXsSSsIwAWck3GgJ2q1nFfF/ FqL06kxBaxhdeaQXRKn0fpWgC0Vd1NDJ5PA++8qWojsj83wcYSCBdi9s00G6slO+YIJ8 igrMDi6ESj6aLxxa3qEv3Lna5LElYtBLiPEo4mHJ6YDqq+QaRkg4exYX8CnGr0Xyk1ff PULA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9VMmLATL4hLY9MeoSmcNwnDOjnsVNymdFAgQMcXeglM=; b=iH6RHkz4tzs+QOyPUSlpI+lfVsg5uPrBYopbg3xTnW1XKhS6HL2kE9Bn8fV4cZBDCB T3EA4BFMLTLrlXn33LQzahYRQ8iKUPri3jHwAsgzC6Ra59cAeioXyPlbDQoy7NZLmSfN HTcNN0Zlg0MRdno5XsAvkh4Y3WK8nREeXv/KBYzxGAFAJ5HygutgmkUKBBKx08mL3ZVm x/qbIUnTNPYoz0Jzo4PyhgcuZuVmSrwzvcPHAVPpXpV2G8rTfh3m/9lK30k9Wks56lz1 AR67GIhDtlKQcVPvvJopPUAX1eaLA8FMxnQeYlgfAWPtgHrLVDogLeCC40eUFyNAm6OX LjJw== X-Gm-Message-State: AOAM5311Sl5udUXkmXFjX09ueZVEYnjaX5jU8aunQV9esNKGF5YFiFRZ LjTSr2FKbiQQ+aB2XXygdgzH6GT0h3DYkUkL X-Google-Smtp-Source: ABdhPJydiNBnDobzjuQQzwM/PEQxFF0DSS5gbQDObvm8D/Wpt3ZADQoUJqtKuJeLh4AT7NFzQ7+0kQ== X-Received: by 2002:a63:5656:: with SMTP id g22mr137089pgm.44.1599591028864; Tue, 08 Sep 2020 11:50:28 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 8sm43553pjx.14.2020.09.08.11.50.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:50:28 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PULL 13/16] vmstate: Fixes test-vmstate.c on msys2/mingw Date: Wed, 9 Sep 2020 02:49:15 +0800 Message-Id: <20200908184918.1085-14-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908184918.1085-1-luoyonggang@gmail.com> References: <20200908184918.1085-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x42d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Li-Wen Hsu 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é --- tests/test-vmstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c index f8de709a0b..4c453575bb 100644 --- a/tests/test-vmstate.c +++ b/tests/test-vmstate.c @@ -34,7 +34,6 @@ #include "qemu/module.h" #include "io/channel-file.h" -static char temp_file[] = "/tmp/vmst.test.XXXXXX"; static int temp_fd; @@ -1487,6 +1486,7 @@ static void test_tmp_struct(void) int main(int argc, char **argv) { + g_autofree char* temp_file = g_strdup_printf("%s/vmst.test.XXXXXX", g_get_tmp_dir()); temp_fd = mkstemp(temp_file); module_call_init(MODULE_INIT_QOM); From patchwork Tue Sep 8 18:49:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11763953 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 43E541599 for ; Tue, 8 Sep 2020 18:57:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EEFC32068D for ; Tue, 8 Sep 2020 18:57:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="s09b1O8/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EEFC32068D 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]:56854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFinz-0000Zo-Vv for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 14:57:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFihR-0003OX-0t; Tue, 08 Sep 2020 14:50:37 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:46162) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFihP-0002oU-8a; Tue, 08 Sep 2020 14:50:36 -0400 Received: by mail-pf1-x442.google.com with SMTP id b124so11693041pfg.13; Tue, 08 Sep 2020 11:50:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GCgbOADJo9SgTrFvdP0jEa9PoTonwhtwSH4+oqHE/pQ=; b=s09b1O8/qPl0Wx5E6dWGi3ro2nFGD/w50/L3c+0UPd2GxLWgGxgWs7C2I5MRrvwmom scgrnZR9lFURs4Pf05KGDJTJZy1tgHbhXgGVcPR2WPBp6CQnQ10GDMqabv/7C0BVcvAP TSrTeQ1Ru/pU5HhrQ1bJxgEi7822FJPsV36GERd1qcA0S90ed6NLm3+J0ReNBDtJqWrP GgNxr91TYKn9bkejac+vNs8dr8NB+2c+GvQB51e/1NGsihqd3BdNeWk14k14xgv+b+jL A9kwgN9cJEAIkKvp04v1JzMXhNSZroStSIy08lVyNApwTgTU6Ipd7px1JqZRdenm6Mz4 ZHyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GCgbOADJo9SgTrFvdP0jEa9PoTonwhtwSH4+oqHE/pQ=; b=jaicMdP3aRa6C9bFhCur80myPB6yxW3dp2WTCcE79XkHewuYoqnvMq1h5uBWeRPeOr QCEUF9mBvdN3+BTxbuRSO/lLhthijheVDWfmRdbtDQCUZ/gPSfwwUyJHGB1V3GKD6Pw8 aI/nfvGEsWJJWfO13Mt3bWk8iSKcuHYpiPh8IHThtiRZg8n0wfJ2S0WKkv1lhPQpuSMJ jXFbUKPINmSZ6HmnFKaimrFi+d9+ulBpCfx6WGFOxYmFfbxIkc0n7f1F3vW8kUBJrC7U lZ5NDaZAuuG6DNlntfBej0f6o+6JpqtsOGntzEP3tyNNhWbeo8LkpPSM/3M2TdGyzVPz N94w== X-Gm-Message-State: AOAM5314CRe+VCDqCmVQrYJsUlfh7ZW40F8ScK9xkD1fFKoaefNtNFoJ jRhmHf3l4m3d+V1D7FwM2H6jnTqp5mXJNjd8 X-Google-Smtp-Source: ABdhPJxss9DgG3QnNN+8erdww6zfCgfMadiAlPJPVXzGP3y6VV/DSjOvl45KgBSPW9jrbQvajAE+aQ== X-Received: by 2002:a63:f70e:: with SMTP id x14mr83825pgh.407.1599591032872; Tue, 08 Sep 2020 11:50:32 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 8sm43553pjx.14.2020.09.08.11.50.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:50:32 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PULL 14/16] cirrus: Building freebsd in a single short Date: Wed, 9 Sep 2020 02:49:16 +0800 Message-Id: <20200908184918.1085-15-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908184918.1085-1-luoyonggang@gmail.com> References: <20200908184918.1085-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::442; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" freebsd 1 hour limit not hit anymore Signed-off-by: Yonggang Luo --- .cirrus.yml | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 49335e68c9..b0004273bb 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,38 +1,19 @@ env: CIRRUS_CLONE_DEPTH: 1 -freebsd_1st_task: +freebsd_12_task: freebsd_instance: image_family: freebsd-12-1 - cpu: 4 - memory: 4G - install_script: ASSUME_ALWAYS_YES=yes pkg bootstrap -f ; pkg install -y - bash curl cyrus-sasl git glib gmake gnutls gsed - nettle perl5 pixman pkgconf png usbredir + cpu: 8 + memory: 8G + install_script: + - ASSUME_ALWAYS_YES=yes pkg bootstrap -f ; + - pkg install -y bash curl cyrus-sasl git glib gmake gnutls gsed + nettle perl5 pixman pkgconf png usbredir script: - mkdir build - cd build - - ../configure --disable-user --target-list-exclude='alpha-softmmu - ppc64-softmmu ppc-softmmu riscv32-softmmu riscv64-softmmu s390x-softmmu - sparc64-softmmu sparc-softmmu x86_64-softmmu i386-softmmu' - --enable-werror || { cat config.log; exit 1; } - - gmake -j$(sysctl -n hw.ncpu) - - gmake -j$(sysctl -n hw.ncpu) check - -freebsd_2nd_task: - freebsd_instance: - image_family: freebsd-12-1 - cpu: 4 - memory: 4G - install_script: ASSUME_ALWAYS_YES=yes pkg bootstrap -f ; pkg install -y - bash curl cyrus-sasl git glib gmake gnutls gtk3 gsed libepoxy mesa-libs - nettle perl5 pixman pkgconf png SDL2 usbredir - script: - - ./configure --enable-werror --target-list='alpha-softmmu ppc64-softmmu - ppc-softmmu riscv32-softmmu riscv64-softmmu s390x-softmmu - sparc64-softmmu sparc-softmmu x86_64-softmmu i386-softmmu - sparc-bsd-user sparc64-bsd-user x86_64-bsd-user i386-bsd-user' - || { cat config.log; exit 1; } + - ../configure --enable-werror || { cat config.log; exit 1; } - gmake -j$(sysctl -n hw.ncpu) - gmake -j$(sysctl -n hw.ncpu) check From patchwork Tue Sep 8 18:49: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: 11763959 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 3A42E618 for ; Tue, 8 Sep 2020 18:59:22 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F1B862068D for ; Tue, 8 Sep 2020 18:59:21 +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="dZ61gXHr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F1B862068D 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]:36270 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFipt-0003ij-4E for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 14:59:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55252) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFihV-0003al-7D; Tue, 08 Sep 2020 14:50:41 -0400 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]:53408) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFihT-0002on-DY; Tue, 08 Sep 2020 14:50:40 -0400 Received: by mail-pj1-x102f.google.com with SMTP id t7so62701pjd.3; Tue, 08 Sep 2020 11:50:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NnBwIumxkiQ9pXVAp8TmFXF/H8dsT5OnHNvh40zg8GM=; b=dZ61gXHrueNmi8e4+i/f5VjPIc3SbBIj26rqqDK8YpFPdoVNxHukAD/T967bpZlWNo 2kSafz843mWWsSGaY0VSc3D/lV0aA5k364u9eA5v1JFfdAlfisGTA/rDfRVm1rez7FaD hCrZTtjXhq0tfIqrz6kpuXIrf+dU+nNhXhmbCzDg3YkDlyITZifS6rWkKvHpuEhDrPAf UWc2cORqtnXurqGXU799QdXDb29nS9DLDR+LWSPNaYGpSq/7X7/wfWiO/4MXknAUpi8Z dwPlpPYkvCwc0GNteYXZVLUF2TC+vvm5Z0DLJa4ckwnezwosXy3QHHSvZtwnpjgKPu9S wpWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NnBwIumxkiQ9pXVAp8TmFXF/H8dsT5OnHNvh40zg8GM=; b=Ei8/hboDXIkSRPlzDY74gLvT2OvNZzkv6UqOtdzazTk17/N7/48tik15hkygYHhVXl uwor2ZzPS2gN5ECznEK3BIiyJqKOeL3gmaTQ2fpa8Di5oLUGY7abTw2iVFhtCw1W0pzp acwT5pZhUV/3muZtcQD6yKfGfch0rjIsbS6qV2xEkSLVyRIIaoCUuZ0DWY0eRsC5/2IY tnctxIw2PkUVLHo22LT0Ubqc8mpGpCz2hlwHv4m/fvZ42FlsSv4SAR0GGK5TEQVHfxrj yOgTgZD1YAarpY1DSnJjbc6htmSf6cIRZLO9pYALU/v6RBo3Khao52uoH0vgx2hTwfC/ cTnQ== X-Gm-Message-State: AOAM532/JSdHsDZvenkpik7Y77Df7L2ltS4LRMgMxofgjtxnOzCExEO7 pyYJ6boYYV+rkt+ZzckoTGy5DH3y8bx4X0U3 X-Google-Smtp-Source: ABdhPJw7QsEuGqVB+fe4fIKSLWPRF/h3iM9/7Dslogjs3svpC/7HSG+UhzlGqie0zhflEaNfUxo3Yw== X-Received: by 2002:a17:90a:6848:: with SMTP id e8mr173323pjm.221.1599591037058; Tue, 08 Sep 2020 11:50:37 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 8sm43553pjx.14.2020.09.08.11.50.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:50:36 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PULL 15/16] logging: Fixes memory leak in test-logging.c Date: Wed, 9 Sep 2020 02:49:17 +0800 Message-Id: <20200908184918.1085-16-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908184918.1085-1-luoyonggang@gmail.com> References: <20200908184918.1085-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x102f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Li-Wen Hsu Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" g_dir_make_tmp Returns the actual name used. This string should be freed with g_free() when not needed any longer and is is in the GLib file name encoding. In case of errors, NULL is returned and error will be set. Use g_autofree to free it properly Signed-off-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daudé --- tests/test-logging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-logging.c b/tests/test-logging.c index 8a1161de1d..957f6c08cd 100644 --- a/tests/test-logging.c +++ b/tests/test-logging.c @@ -196,7 +196,7 @@ static void rmdir_full(gchar const *root) int main(int argc, char **argv) { - gchar *tmp_path = g_dir_make_tmp("qemu-test-logging.XXXXXX", NULL); + g_autofree gchar *tmp_path = g_dir_make_tmp("qemu-test-logging.XXXXXX", NULL); int rc; g_test_init(&argc, &argv, NULL); From patchwork Tue Sep 8 18:49:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11763957 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 161871599 for ; Tue, 8 Sep 2020 18:58: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 D13812068D for ; Tue, 8 Sep 2020 18:58: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="UBSin0nd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D13812068D 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]:33568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFipF-0002cW-Uu for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Sep 2020 14:58:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55284) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFiha-0003pI-CE; Tue, 08 Sep 2020 14:50:46 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:36113) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFihX-0002pI-41; Tue, 08 Sep 2020 14:50:46 -0400 Received: by mail-pg1-x544.google.com with SMTP id m8so204140pgi.3; Tue, 08 Sep 2020 11:50:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Mis/yrVWeY+EL6B3pLHydPEbEg8SDdnmsH3w5+AQmwk=; b=UBSin0ndWEHAjF6GgrKZbSQKKYKK4pOceqTUYQX5FPchRJGqE8HQrNsJEHacjbtc9L 7tWIskMBcG5jnTAtzvAybNrYfqXKEf6GimDWtnrQjD1x97RNXxreOck3RQ0MdAlfsPMY Ify4rk8z3/wKiVUiLDK6+4pXEq95z/pY+5jlgb2/rW2cguH2sppso1O+or6JipzI8y+a hktE4XK4/Cqm6gBD6ppNwUpRWfQcnHXirQGkvA7DjPK9YEz3DsZ+W9PVf71rSidOgUR2 KlzkHvEGlfK+qsCdd0XNMs6tYWjKRteYiNZh/hPNbmipwpK+jBmjIDGfvriuVcpJUrXl FFRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Mis/yrVWeY+EL6B3pLHydPEbEg8SDdnmsH3w5+AQmwk=; b=SsXQuR2wqMm9/e7TJ4swua2wp+f8uahueg1fYBSrCBO3kEHY7IHey4PRqWRRCFHEtq kdqT5Pg61f4TlH+bx06lvRh3xsn7Za/wGnTGqtZgpXyrVtf8uAqyWH71TNR6Gge10saL rh5XQmSNYBurgQXA3cHjpm7Hig2TuV6tCkYyDimmoCbKwDAgQpxgyBlrvtQpZVeZ127Z fLaZk87F0dvy5YX+a05ehFLx1wjGcubc0G8VTD6xnaSGs+k9FJQ/FbmwWYsXLi+Z7SRk SyHEItGWSxStM/e17Tgd9XmRgZPFE6PTcqTScFGODEllMlt+l739M2a6xqGUNwLc7S/1 zQMw== X-Gm-Message-State: AOAM533c6hDHlX96N+7YsBEezXMUea93AB4EcWOpgkhhH9ZjhTUtkyNi Krx76stFSPgRIuVeACosy2Cinq0Nk5JMchds X-Google-Smtp-Source: ABdhPJwt3qCC3t8ZqV9ZMa9sep3CmFCK1vUHHzEa9xLHn4t7gwOhWBUp+G1W7O7miLis2bTe+pE64w== X-Received: by 2002:a63:7a5b:: with SMTP id j27mr137161pgn.78.1599591041054; Tue, 08 Sep 2020 11:50:41 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id 8sm43553pjx.14.2020.09.08.11.50.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:50:40 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PULL 16/16] rcu: add uninit destructor for rcu Date: Wed, 9 Sep 2020 02:49:18 +0800 Message-Id: <20200908184918.1085-17-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200908184918.1085-1-luoyonggang@gmail.com> References: <20200908184918.1085-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::544; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x544.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Li-Wen Hsu Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is necessary if the pending rcu calls are closing and removing temp files. This also provide a function void rcu_wait_finished(void); to fixes test-logging.c test failure on msys2/mingw. On windows if the file doesn't closed, you can not remove it. Signed-off-by: Yonggang Luo --- include/qemu/rcu.h | 5 +++++ tests/test-logging.c | 2 ++ util/rcu.c | 37 ++++++++++++++++++++++++++++++++++++- 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/include/qemu/rcu.h b/include/qemu/rcu.h index 570aa603eb..dd0a92c1d0 100644 --- a/include/qemu/rcu.h +++ b/include/qemu/rcu.h @@ -124,6 +124,11 @@ extern void rcu_unregister_thread(void); extern void rcu_enable_atfork(void); extern void rcu_disable_atfork(void); +/* + * Wait all rcu call executed and exit the rcu thread. + */ +extern void rcu_wait_finished(void); + struct rcu_head; typedef void RCUCBFunc(struct rcu_head *head); diff --git a/tests/test-logging.c b/tests/test-logging.c index 957f6c08cd..7a5b59f4a5 100644 --- a/tests/test-logging.c +++ b/tests/test-logging.c @@ -210,6 +210,8 @@ int main(int argc, char **argv) tmp_path, test_logfile_lock); rc = g_test_run(); + qemu_log_close(); + rcu_wait_finished(); rmdir_full(tmp_path); g_free(tmp_path); diff --git a/util/rcu.c b/util/rcu.c index 60a37f72c3..43367988b9 100644 --- a/util/rcu.c +++ b/util/rcu.c @@ -308,10 +308,20 @@ void rcu_unregister_thread(void) qemu_mutex_unlock(&rcu_registry_lock); } +typedef struct QemuRcuMessage { + struct rcu_head rcu; + void *message; +} QemuRcuMessage; + +static int rcu_thread_exit_called = 0; +static int rcu_thread_exited = 0; +static QemuRcuMessage rcu_thread_message; + static void rcu_init_complete(void) { QemuThread thread; - + atomic_mb_set(&rcu_thread_exit_called, 0); + atomic_mb_set(&rcu_thread_exited, 0); qemu_mutex_init(&rcu_registry_lock); qemu_mutex_init(&rcu_sync_lock); qemu_event_init(&rcu_gp_event, true); @@ -327,6 +337,26 @@ static void rcu_init_complete(void) rcu_register_thread(); } +static void rcu_thread_exit(QemuRcuMessage *param) +{ + atomic_mb_set((int*)param->message, 1); + qemu_thread_exit(NULL); +} + +void rcu_wait_finished(void) +{ + if (atomic_xchg(&rcu_thread_exit_called, 1) == 0) + { + rcu_thread_message.message = &rcu_thread_exited; + call_rcu(&rcu_thread_message, rcu_thread_exit, rcu); + } + + while (atomic_mb_read(&rcu_thread_exited) == 0) + { + g_usleep(10000); + } +} + static int atfork_depth = 1; void rcu_enable_atfork(void) @@ -379,3 +409,8 @@ static void __attribute__((__constructor__)) rcu_init(void) #endif rcu_init_complete(); } + +static void __attribute__((__destructor__)) rcu_uninit(void) +{ + rcu_wait_finished(); +}