From patchwork Thu Oct 6 15:11:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 13000483 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 07CCDC433FE for ; Thu, 6 Oct 2022 15:24:12 +0000 (UTC) Received: from localhost ([::1]:54488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogSjK-0007lB-0W for qemu-devel@archiver.kernel.org; Thu, 06 Oct 2022 11:24:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57834) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogSXL-0002bw-O8; Thu, 06 Oct 2022 11:11:47 -0400 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]:37472) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogSXJ-0004YZ-VD; Thu, 06 Oct 2022 11:11:47 -0400 Received: by mail-pg1-x52d.google.com with SMTP id bh13so2139101pgb.4; Thu, 06 Oct 2022 08:11:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Z6o+30SmN2bco3CjzBwlafSMtQ2m68d1i+due7WP7eU=; b=j9YvNGBdhswSvkESLCAeqzKNaKfhGWs/BRcaxqrtoOjOPBKpoXSNy4DKYBB5SEUSXj InOEakXznMq+ExyZNqt9vKjg66mZCNmYXj65PuMsdNOnbDsPYna2pbCrqrPvEfXnhWoj YgRmKwfXldmD95Phevox5JqqvnqeR/1X2MLbDYuvUVF+pHs48oZ23VL7IMriiOsxNmwF bYSqu5s0LqJRr1NDRPwrQF2e/AbGf5XzWp5mSrOhXKweq/ESq5Ol92WSz9F9LHl0IiYS 9gzgxDwAzn/iIoKZQ70Nu/UgHOe+DKdxacp4h2ifWYy2U99PDKet8bNMpVcqiS4X2lZW Dd4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Z6o+30SmN2bco3CjzBwlafSMtQ2m68d1i+due7WP7eU=; b=GyfHKzzChvsjbUQpVeR0CkIA9VDyB3P5j7xgk7/oVFgTSYzBuinyU/SdQ41ldAgROR GbtjGK95daSc9AdFvIeeflynda7cL6WVfdB+2GoamSeDPxpXt6zvqn8S6Va7gcDYjiS1 a0ovo2naseomzdectdAyDlyvvtcJoKgYwlHB/ORZohMDcDSxVSlOd1pgika+4FfkGk46 0SRB12pvEGgZ3fcTASnAB0VMhwBlLUo9fXzcGQe9R0JYsaSQWz+b/iGLzoHPm7O1OrkY z9eVNks2xqLSavXUtSctaTqWkIlayrMkeGVvxeMXx8MLS+hUTGZQCmiX5wpPkmkTGq2M zF9w== X-Gm-Message-State: ACrzQf0ojbLOkicZCT913JTLEnvrr702ttxGmNFHPLhmcpdLRWcUv/V8 uJM9pDNugQBGQOd6ig1SvIXa1VGwgt8= X-Google-Smtp-Source: AMsMyM4RextZm9HdkkAODR7vvD7uPtFHyhQblGpXCVwwwn4cFBXfwd/NXH7MG8DN60mvqeYvzsBnBg== X-Received: by 2002:a63:9143:0:b0:458:c565:6518 with SMTP id l64-20020a639143000000b00458c5656518mr305151pge.219.1665069103871; Thu, 06 Oct 2022 08:11:43 -0700 (PDT) Received: from ubuntu.. (144.168.56.201.16clouds.com. [144.168.56.201]) by smtp.gmail.com with ESMTPSA id 135-20020a62148d000000b00540c8ed61ddsm8589067pfu.150.2022.10.06.08.11.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Oct 2022 08:11:43 -0700 (PDT) From: Bin Meng To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Beraldo Leal , Christian Schoenebeck , =?utf-8?q?Daniel_P=2E_Berra?= =?utf-8?q?ng=C3=A9?= , "Dr. David Alan Gilbert" , Eduardo Habkost , Gerd Hoffmann , Greg Kurz , Hanna Reitz , Juan Quintela , Kevin Wolf , Laurent Vivier , Marcel Apfelbaum , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Thomas Huth , Wainer dos Santos Moschetta , Yanan Wang , qemu-block@nongnu.org Subject: [PATCH 00/18] tests/qtest: Enable running qtest on Windows Date: Thu, 6 Oct 2022 23:11:17 +0800 Message-Id: <20221006151135.2078908-1-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52d; envelope-from=bmeng.cn@gmail.com; helo=mail-pg1-x52d.google.com 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" In preparation to adding virtio-9p support on Windows, this series enables running qtest on Windows, so that we can run the virtio-9p tests on Windows to make sure it does not break accidently. Changes in v5: - Rebase on qemu/master - Drop patches that are already merged - Use g_autoptr(GError) - Restore to v1 version which does not touch the posix implementation - Replace sighandler_t with its actual definition, since it is not available on BSD hosts Changes in v4: - Update the error reporting by using the GError "error" argument of g_dir_make_tmp() - Remove the const from tmpfs declaration Changes in v3: - Split to a separate patch - Add a usleep(1) in the busy wait loop - Drop the host test Changes in v2: - Use g_autofree to declare the variable - Change to use g_mkdir() - Change to use g_mkdir() - Change to use g_mkdir() - Introduce qemu_send_full() and use it - Move the enabling of building qtests on Windows to a separate patch to keep bisectablity - Call socket_init() unconditionally - Add a missing CloseHandle() call - Change to a busy wait after migration is canceled - new patch: "io/channel-watch: Drop the unnecessary cast" - Change the timeout limit to 90 minutes - new patch: "tests/qtest: Enable qtest build on Windows" Bin Meng (15): semihosting/arm-compat-semi: Avoid using hardcoded /tmp tcg: Avoid using hardcoded /tmp util/qemu-sockets: Use g_get_tmp_dir() to get the directory for temporary files tests/qtest: migration-test: Avoid using hardcoded /tmp block/vvfat: Unify the mkdir() call fsdev/virtfs-proxy-helper: Use g_mkdir() hw/usb: dev-mtp: Use g_mkdir() tests/qtest: libqtest: Install signal handler via signal() tests/qtest: Support libqtest to build and run on Windows tests/qtest: libqtest: Correct the timeout unit of blocking receive calls for win32 io/channel-watch: Drop a superfluous '#ifdef WIN32' io/channel-watch: Drop the unnecessary cast io/channel-watch: Fix socket watch on Windows .gitlab-ci.d/windows.yml: Increase the timeout to 90 minutes tests/qtest: Enable qtest build on Windows Xuzhou Cheng (3): accel/qtest: Support qtest accelerator for Windows tests/qtest: Use send/recv for socket communication tests/qtest: migration-test: Make sure QEMU process "to" exited after migration is canceled include/hw/core/cpu.h | 1 + include/qemu/sockets.h | 2 + accel/dummy-cpus.c | 14 +++- block/vvfat.c | 9 +-- fsdev/virtfs-proxy-helper.c | 3 +- hw/usb/dev-mtp.c | 4 +- io/channel-watch.c | 12 +--- semihosting/arm-compat-semi.c | 3 +- softmmu/cpus.c | 9 +-- tcg/tcg.c | 3 +- tests/qtest/libqmp.c | 5 +- tests/qtest/libqtest.c | 124 +++++++++++++++++++++++++++++----- tests/qtest/migration-test.c | 14 ++-- util/osdep.c | 33 +++++++++ util/qemu-sockets.c | 5 +- .gitlab-ci.d/windows.yml | 4 +- accel/meson.build | 1 + accel/qtest/meson.build | 1 + tests/qtest/meson.build | 6 -- 19 files changed, 194 insertions(+), 59 deletions(-)