From patchwork Tue Sep 15 12:12:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11776335 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 D5B896CA for ; Tue, 15 Sep 2020 12:21: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 86AEF206DB for ; Tue, 15 Sep 2020 12:21: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="FJu6g39d" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 86AEF206DB 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]:59268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kI9xv-00083g-Hd for patchwork-qemu-devel@patchwork.kernel.org; Tue, 15 Sep 2020 08:21:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47886) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kI9qA-0000Qg-Fk; Tue, 15 Sep 2020 08:13:42 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:39308) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kI9q8-00088W-DO; Tue, 15 Sep 2020 08:13:42 -0400 Received: by mail-pl1-x62f.google.com with SMTP id x18so1240354pll.6; Tue, 15 Sep 2020 05:13:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WkGXuI97nU8bI2sZbeibQm7nhrF3DBevmzRpIwEb6PI=; b=FJu6g39dnOPI8Hqbiu7rG/pOl6W2+v/ItXfhkkd6IgchDFuWtEZxoNe16XCHZgcGuB QLZZOocnZf5admTtVSC/Y80DaN8q+gWRVEQSUr444tbtLGYYFi8BgTN7clb54xF3gXmi rhWAA+tA1Rqtfx3vZ57oZpM3gPHLeT/zfJtQFpQ4O45xztWF2uRCamaAt6z2mKGPlsbq ozrmzePCSdUEblVup+ToHSmlaIpyZxXfEoywdbhe3D7mysIqsF+RprfbT4U3Bu3ZOzEL kmj/e4UV4UirdYeCE+CXQ9lTE+yDyKvHXElMA9aXgnARwtefMNSCTDnsH4PA84Dcv3oN spcg== 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:mime-version :content-transfer-encoding; bh=WkGXuI97nU8bI2sZbeibQm7nhrF3DBevmzRpIwEb6PI=; b=d6tI7tkPo9RYvWHcRbc8d6YkorXlGBA3sVZAdzRKebBM4LC6LNLUhyD/4RQQKLbOeo 2hcsSIp9qUFvwqGZYQG4lhbEAYjgUqME1q3wPYahzDX0lDevTy7UVcwb+OHT+UsmtA2w 8SMwAvYzIRw6/Uv8gwofA83zDknyQ0saSkkosv5IKSg0lT29FqkRWQzW5RXiKi383yCV fSDDOXlQl+J4hifcKJO2ZxjdQEPq8EAyDMtWjcyFmcYqI0uk9yuqmyPbaF2pzGk6kzX3 pHZxyaG4eKhOP6ka2oHgu3qklkxTPCgomwkcXkPSOwnMwBBuxILyIftdW6LRt02zA0d8 uG2w== X-Gm-Message-State: AOAM532OQxvNsHpiLfx39+hqIjJzIUN1bf7vkYuFkJ8wJGig8GqWWmH0 fxffS5nNRAH1rY1+VCGE92mm/9pPwyJAGbIGOg0= X-Google-Smtp-Source: ABdhPJzicWS55SYuACIidgVSbR7ZstFbKad5g06VU+6CP80YQlBXUcKrL/1E/87oGOlvzJOy5uyyRA== X-Received: by 2002:a17:902:b216:b029:d1:e5e7:be05 with SMTP id t22-20020a170902b216b02900d1e5e7be05mr1444661plr.56.1600172017698; Tue, 15 Sep 2020 05:13:37 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id k28sm13683061pfh.196.2020.09.15.05.13.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 05:13:36 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v9 00/26] W32, W64 msys2/mingw patches Date: Tue, 15 Sep 2020 20:12:52 +0800 Message-Id: <20200915121318.247-1-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=luoyonggang@gmail.com; helo=mail-pl1-x62f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" V8-V9 * ci: Enable msys2 ci in cirrus do not install libnfs, libcapstone and jemalloc ident lines properly Do not install libnfs when the add the msys2 ci, * Revert "configure: add --ninja option" Skip this revision * block: Fixes nfs compiling error on msys2/mingw Use typedef long long blkcnt_t; for libnfs on msys2/mingw for futher implemenation, still disable nfs_get_allocated_file_size on win32 as it not working yet, but preserve the possibility implemenation it in futher * gcrypt: test_tls_psk_init should write binary file instead text file. only fixes the file open mode parameter * osdep: file locking functions are not available on Win32: Reword with "Do not declare the following locking functions on Win32:" * meson: Use -b to ignore CR vs. CR-LF issues on Windows Reword of commit message * tests: Enable crypto tests under msys2/mingw Reimplement qemu_socketpair in a simpler way. without thirdparty code * block: enable libnfs on msys2/mingw in cirrus.yml New commit * tests: disable /char/stdio/* tests in test-char.c on win32 Needs review * tests: fixes aio-win32 about aio_remove_fd_handler, get it consistence with= aio-posix.c Needs review * rcu: fixes test-logging.c by call drain_call_rcu before rmdir_full Needs review It first introduce msys2 CI on cirrus by fixes nfs, capstone, curses and disable partial test-char tests. And then fixes all unit tests failure on msys2/mingw This fixes the reviews suggested in the mailling list All cirrus CI are passed Maxim Levitsky (1): rcu: Implement drain_call_rcu Yonggang Luo (25): ci: fixes msys2 build by upgrading capstone to 4.0.2 configure: Fixes ncursesw detection under msys2/mingw and enable curses win32: Simplify gmtime_r detection direct base on _POSIX_THREAD_SAFE_FUNCTIONS. curses: Fixes curses compiling errors. tests: disable /char/stdio/* tests in test-char.c on win32 tests: Fixes test-replication.c on msys2/mingw. tests: test-replication disable /replication/secondary/* on msys2/mingw. osdep: file locking functions are not available on Win32 meson: Use -b to ignore CR vs. CR-LF issues on Windows gcrypt: test_tls_psk_init should write binary file instead text file. tests: Enable crypto tests under msys2/mingw meson: remove empty else and duplicated gio deps vmstate: Fixes test-vmstate.c on msys2/mingw cirrus: Building freebsd in a single short tests: Convert g_free to g_autofree macro in test-logging.c tests: Fixes test-io-channel-socket.c tests under msys2/mingw tests: fixes aio-win32 about aio_remove_fd_handler, get it consistence with aio-posix.c tests: Fixes test-io-channel-file by mask only owner file state mask bits tests: fix test-util-sockets.c tests: Fixes test-qdev-global-props.c rcu: fixes test-logging.c by call drain_call_rcu before rmdir_full meson: upgrade meson for execute custom ninjatool under msys2 properly ci: Enable msys2 ci in cirrus block: Fixes nfs compiling error on msys2/mingw block: enable libnfs on msys2/mingw in cirrus.yml .cirrus.yml | 97 ++++++++++++++++++++-------- block/nfs.c | 37 +++++++++-- capstone | 2 +- configure | 61 +++++------------- include/qemu/osdep.h | 2 +- include/qemu/rcu.h | 1 + include/sysemu/os-win32.h | 4 +- meson | 2 +- meson.build | 6 -- tests/crypto-tls-psk-helpers.c | 6 +- tests/crypto-tls-x509-helpers.c | 106 ++++++++++++++++++++++++++++++- tests/crypto-tls-x509-helpers.h | 9 ++- tests/qapi-schema/meson.build | 2 +- tests/test-char.c | 26 +++++--- tests/test-crypto-tlscredsx509.c | 47 +++++++------- tests/test-crypto-tlssession.c | 68 +++++++++++--------- tests/test-io-channel-file.c | 10 ++- tests/test-io-channel-socket.c | 2 + tests/test-io-channel-tls.c | 51 ++++++++------- tests/test-logging.c | 5 +- tests/test-qdev-global-props.c | 6 +- tests/test-replication.c | 22 +++++-- tests/test-util-sockets.c | 6 +- tests/test-vmstate.c | 3 +- ui/curses.c | 14 ++-- util/aio-win32.c | 11 +++- util/oslib-win32.c | 2 +- util/rcu.c | 55 ++++++++++++++++ 28 files changed, 460 insertions(+), 203 deletions(-) --=20 2.28.0.windows.1