From patchwork Fri Oct 28 04:57:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 13023075 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 20F05ECAAA1 for ; Fri, 28 Oct 2022 05:08:04 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooHRm-0003lS-E3; Fri, 28 Oct 2022 00:58:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHRj-0003jx-9p for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:19 -0400 Received: from mx0a-0064b401.pphosted.com ([205.220.166.238]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHRh-00026I-05 for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:18 -0400 Received: from pps.filterd (m0250809.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 29S4MWZp011302; Thu, 27 Oct 2022 21:58:07 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=PPS06212021; bh=IvlVyUTOqsfYiyRmPJbagrL+jOmKpxiu8ckJ0uMgbFg=; b=o1FBwTCzwA8+FPR6dEXW1ewmI2C87X12/2HVG93JL7zGC7qWJxUTfXICkrWXsDlEF5am DUjFuzOnNPZue9kLl/RUt1+CClozxHTapC7HS+486ryuRCL0XVtyG+xycGem4kqXLKxG rbcSC7s0GZzW+5XabTFgaZvMksDLhAqkVFkm+iGQgXI8a07xJ5y73XsRuNLL3Q+WSRp4 avsirB6UCUxeSIg9losjkzRrRTvhztEZfkwFb0aQ8Yb2nnnfOgzh9NaAfqdkiDYQswT1 cJDTEKnwK6evccPE9gzp/MhptkdspgcA1MaZ5MDfz5P4vg2ejmPps71DRVSB/cCJj+pb 1w== Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2170.outbound.protection.outlook.com [104.47.59.170]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 3kfg3gs4ts-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Oct 2022 21:58:07 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LY4vrWAGdGiNXjW7Gyx6CpigSVYMvA5DRUIRjuVzQ7fG+qY4LCOKzv6nD/oqJMdV18GZa1+zORfMCbgIGrdCJWyDqdNkmhKt6h0zP+lWv37WJG049GnPVYE9Zb7hNVl2UTXNxeIBxdqPD9DHODlV7QYNBS9/YWS26ssiWmiIkd3lqPd7gQvGZi5KxqVYAsC5T/aC1Au8ragWldtioWMobdQYE5BykeZmoy4+HhFNZgM/9WYPXYTVllMTLebqZWPlcXouGoc9+CLwdpmOk7p58ZWr2LZbbeROhRfAwqBeYmAPA/nzIICurKEhpF7kkEuj8hvb17Ij+9XX/yyHNmk2aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IvlVyUTOqsfYiyRmPJbagrL+jOmKpxiu8ckJ0uMgbFg=; b=czoIXOglv3OsbzfHSNjiefaGVozKdITx+01oqXoJFlGo1i9tNT/2vkzEDc3qm/CM0p6O9bQC5kNqmp+N5fO9Rab4HcbH6u9Ye10OHQ8+9WtDUrE6Hhngj5dB7Y3GK+HHTwl7m4KAg2qqL7S49OHzGW5LdjjJeh2lvS3JHk9QQ6YzZpjwTGrsZ0/pugOCy89j0dsqPl9xbSjWtuWU9ro4VsC2ok8lbbCQ9G7p2ni7x1R7gn8AJMomUtiCPr43CuE/t2FvkgBHe/zXseA7tPxkMXGjVPvZzss7mCtAoOKe8ysq358fUbdqwLI010PSH/rGTf+mgKzbZW3s4zIJ9Clv0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) by MN2PR11MB4632.namprd11.prod.outlook.com (2603:10b6:208:24f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Fri, 28 Oct 2022 04:58:03 +0000 Received: from BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201]) by BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201%9]) with mapi id 15.20.5746.026; Fri, 28 Oct 2022 04:58:03 +0000 From: Bin Meng To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Xuzhou Cheng , Eduardo Habkost , Laurent Vivier , Marcel Apfelbaum , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Thomas Huth , Yanan Wang Subject: [PATCH v6 01/11] accel/qtest: Support qtest accelerator for Windows Date: Fri, 28 Oct 2022 12:57:26 +0800 Message-Id: <20221028045736.679903-2-bin.meng@windriver.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221028045736.679903-1-bin.meng@windriver.com> References: <20221028045736.679903-1-bin.meng@windriver.com> X-ClientProxiedBy: SL2PR04CA0009.apcprd04.prod.outlook.com (2603:1096:100:2d::21) To BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR11MB5351:EE_|MN2PR11MB4632:EE_ X-MS-Office365-Filtering-Correlation-Id: 95aead34-074a-45f6-810e-08dab8a0fe19 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7DA7R38OJ2vqX001h786XU1wMlDOFEuS++l/2wv7jc8Y194cSdkZTrUE0zgVrrje2CveNBBI7cs1sgvvJ5uZe5YXKvHWQiW5XkfvnHa72Q0IIKoH8Y/BpzQ3hULzzQkRSvDVqcUSIAGNAYRjJgChWrPbYTZoPoE8NFK31LErppfzo91LASPmUdKAmVGVhyCll1xmQn7DkoV6zH1kjP1V74zV1vQeCR3Fe4ZDJAbt/dd9eGSZ1oYK4fd0oguDwuOZclqZ1loS1DLFGVUwLWa4PvgxqO88dNVBP8FXCFS5jJa+76LOTTePdtao8TwSWa9ymQ9xuV+oLFksJfgW1Jy8LZg0IdUFPn4N5ROKStTmJ58P/tJPYaXi3RYIlZMlM2sNNwwg0PByh2AIq0OTIfV3X641LoaRgdFTSWJHuSZ4QRNK6li59bWzY7qy8Q9IzDvlSfemIPv+PtUKA7ISxzW4p/Fyguhy98dEXLxCmPtr4oNOeKkUlH2Fj+nE/5kYBvAqojG+1HEvS4ORziHe5fyvhEHVlZ1V5c44QB0SNUN4eab32An9s5ruC1S0JRy4CqTSG2zpTeC5itAzlrjuVzDvgJynJV43Fm9xd7N9h6lTBiOO1Oas1NXuDnU4CruwlBWB2VtwOnXttkEHYhG40BU+IiNEgBbFHzLEfac3T4g13S32RXTPnlh+0S8fapILK/izN/8OyN4J1aoxVETA259Q44YZk8G7rgc7uAw99pqlLTQp0enMciFHhuL+T4XCjZk9RqaVaaQaP3PmWLy67VX8nA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL1PR11MB5351.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(39850400004)(346002)(366004)(396003)(451199015)(478600001)(26005)(6486002)(6506007)(36756003)(2906002)(83380400001)(52116002)(6666004)(86362001)(5660300002)(38100700002)(38350700002)(2616005)(316002)(186003)(1076003)(6512007)(66476007)(8676002)(54906003)(4326008)(6916009)(41300700001)(7416002)(66946007)(66556008)(44832011)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?SV2fRnQeAUlYFpzNcCfOdd7tHSY6?= =?utf-8?q?YoFnS+g1FMCst65CAhrXtDXINfhDLQuX26KyqPYRLAZndeANzo+B9lKbnyUSirYVL?= =?utf-8?q?wefHzqeKJRmOXxzNj7iq5HfwSp/+f+SLZZUpq5J5aBAEMtkPV4Y8Y3BBdPz8u7n4J?= =?utf-8?q?8xgtNanqwpqj2rSC9gIgcmFHpyvyCsafQlTdxnTf5aJ+kFSluoHIRUWI8XBAq82RD?= =?utf-8?q?NhseBRXip4cw+odTX8OE3ts5glVhRLx0ZdAN/q0gmyexp8HMVIRuAmcoS22Jf7b9x?= =?utf-8?q?KeM9yGbZrlHMf10ka61SzNDFBx/6nQ/2/7lUCaZk0lxkYri2JOMqvoJRhlKwB430E?= =?utf-8?q?5WOhE41LMxszDdU15UoABwFw8Y7d4slVsJ9D5PoQ7NI9OMOG27D/Q2oY5zpjH2MPg?= =?utf-8?q?dEmN7gtiWOi8EPawxheklFGj3/ZORP/QQhovCerE6irE70fk1dVVO4qsD4Cs4Eioz?= =?utf-8?q?NoFxNB/VpCf7KtkrlzeC64MrLagUXrlutGgNKoRklZQePaDs4ZxRIWgFSve+acSaG?= =?utf-8?q?DuHFkQIkM8vvqbYWI+3UNBZ00q8sX0Z9elOlehiInsK5/TJiCt75+Nb45cIz7mrEh?= =?utf-8?q?YZdGwKnPbtrhDq6oyrrr7fZDd7o5zQZwRt/7BSbi7QenvknS3MczE3FVM+BK8FKVA?= =?utf-8?q?LPoy/YeR7Du12ioGKdHBpnXMAi45A/VFjmfGib137WbwlC7/RXUtmllc/NzaY8RbK?= =?utf-8?q?RzmSm6mfMxMJx0d6asvotvG26vflT/+sd0i337sOU8vku+nzHKtmdNMkALvFl+Max?= =?utf-8?q?3+dAucjrFtQm4s+ZFw44setBpFFpN1pTkXozCxkm9FjcsxoKYzdkn+/l4yWgFEw2v?= =?utf-8?q?TrYvYWT1+KbEqq8W4cwuqwgycPKRoBYP+uQAHPa63GRNpRXb+1djZS16mfnnYJQzX?= =?utf-8?q?yv4+2Kz9i5oRhwBx8w5fufQDAwbPY6Pzous5EWaCMhgyOjEEI0mDUSV2uUJkxuy+X?= =?utf-8?q?pIFroo3BHS7JT+MGhe97x7Thlfyq2FHQHzRCjlTPztbFkcPG97bYeyAqgTvo+SokS?= =?utf-8?q?fAZlspkUuC+i22FwNlCVV9vrKLD25iJhAwZZ20q2hrNfXiaZTWM0zhLwNcYAWtoeL?= =?utf-8?q?IIa4Gtrt0a51nQM1sNWNUvGZ+l6IejFw5lDy4Z2zPZiz0ehiDSDc7jGPjcYSDi9Jq?= =?utf-8?q?D7JsugZrzazP2MuUzPxMxWLBtIvWy6nfvNthZWbBvQswiImz/QbFhtFg7Cb7mOVup?= =?utf-8?q?56wCY64b7hlDln7IA/W+hnZ4m3O1OfFkTh/xfPkr3XeKXFvYbZeUKt6HK4Su7VREK?= =?utf-8?q?ws/fibmlIETTnMv6IQdZELyUqD6SFLc99iGC3tmuAubi3ShAYP8fY6RP4NY5f7Ed0?= =?utf-8?q?JH9CfHZ3QrnSVNEaVUSW1vltv/Z6+hbSsDYolP0wbhW5Fr/xfYLDr7JYisP0yCr7M?= =?utf-8?q?YPoUVpqvJgQjzJluqTlD5G7QiskrvUAIuKfixOsrH4gdBBmbu0J0n1xkKvLUc5AMX?= =?utf-8?q?dwXOxreWs/hGyS4GNVVERvkKC2htqPNRJ1O8JgyJByVDHY0M6UYsSYRedtmYerS6t?= =?utf-8?q?N3alrMjkrO59?= X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 95aead34-074a-45f6-810e-08dab8a0fe19 X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5351.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 04:58:03.1366 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +46MRmHF/3tv56/g3Ha1vFDIOBz0rXqN2CuPP0M29QxLqCtT1AVEsznny7k7e8w9S37Q5jVqPjsG/dIGoKWHLQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4632 X-Proofpoint-GUID: QpxRZX62BtWkxRtUqnHbHWjahKbGiSr7 X-Proofpoint-ORIG-GUID: QpxRZX62BtWkxRtUqnHbHWjahKbGiSr7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-28_02,2022-10-27_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 suspectscore=0 spamscore=0 bulkscore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 mlxscore=0 impostorscore=0 malwarescore=0 priorityscore=1501 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2210280030 Received-SPF: pass client-ip=205.220.166.238; envelope-from=prvs=7300ee25fa=bin.meng@windriver.com; helo=mx0a-0064b401.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Xuzhou Cheng Currently signal SIGIPI [=SIGUSR1] is used to kick the dummy CPU when qtest accelerator is used. However SIGUSR1 is unsupported on Windows. To support Windows, we add a QemuSemaphore CPUState::sem to kick the dummy CPU instead for Windows. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau --- Changes in v6: - remove CONFIG_POSIX from meson.build Changes in v5: - restore to v1 version which does not touch the posix implementation include/hw/core/cpu.h | 1 + accel/dummy-cpus.c | 14 ++++++++++++-- softmmu/cpus.c | 9 +++++---- accel/meson.build | 2 +- accel/qtest/meson.build | 3 +-- 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index f9b58773f7..8830546121 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -333,6 +333,7 @@ struct CPUState { struct QemuThread *thread; #ifdef _WIN32 HANDLE hThread; + QemuSemaphore sem; #endif int thread_id; bool running, has_waiter; diff --git a/accel/dummy-cpus.c b/accel/dummy-cpus.c index 10429fdfb2..d6a1b8d0a2 100644 --- a/accel/dummy-cpus.c +++ b/accel/dummy-cpus.c @@ -21,8 +21,6 @@ static void *dummy_cpu_thread_fn(void *arg) { CPUState *cpu = arg; - sigset_t waitset; - int r; rcu_register_thread(); @@ -32,8 +30,13 @@ static void *dummy_cpu_thread_fn(void *arg) cpu->can_do_io = 1; current_cpu = cpu; +#ifndef _WIN32 + sigset_t waitset; + int r; + sigemptyset(&waitset); sigaddset(&waitset, SIG_IPI); +#endif /* signal CPU creation */ cpu_thread_signal_created(cpu); @@ -41,6 +44,7 @@ static void *dummy_cpu_thread_fn(void *arg) do { qemu_mutex_unlock_iothread(); +#ifndef _WIN32 do { int sig; r = sigwait(&waitset, &sig); @@ -49,6 +53,9 @@ static void *dummy_cpu_thread_fn(void *arg) perror("sigwait"); exit(1); } +#else + qemu_sem_wait(&cpu->sem); +#endif qemu_mutex_lock_iothread(); qemu_wait_io_event(cpu); } while (!cpu->unplug); @@ -69,4 +76,7 @@ void dummy_start_vcpu_thread(CPUState *cpu) cpu->cpu_index); qemu_thread_create(cpu->thread, thread_name, dummy_cpu_thread_fn, cpu, QEMU_THREAD_JOINABLE); +#ifdef _WIN32 + qemu_sem_init(&cpu->sem, 0); +#endif } diff --git a/softmmu/cpus.c b/softmmu/cpus.c index 61b27ff59d..9dd1a4dc17 100644 --- a/softmmu/cpus.c +++ b/softmmu/cpus.c @@ -437,18 +437,19 @@ void qemu_wait_io_event(CPUState *cpu) void cpus_kick_thread(CPUState *cpu) { -#ifndef _WIN32 - int err; - if (cpu->thread_kicked) { return; } cpu->thread_kicked = true; - err = pthread_kill(cpu->thread->thread, SIG_IPI); + +#ifndef _WIN32 + int err = pthread_kill(cpu->thread->thread, SIG_IPI); if (err && err != ESRCH) { fprintf(stderr, "qemu:%s: %s", __func__, strerror(err)); exit(1); } +#else + qemu_sem_post(&cpu->sem); #endif } diff --git a/accel/meson.build b/accel/meson.build index b9a963cf80..259c35c4c8 100644 --- a/accel/meson.build +++ b/accel/meson.build @@ -16,5 +16,5 @@ dummy_ss.add(files( 'dummy-cpus.c', )) -specific_ss.add_all(when: ['CONFIG_SOFTMMU', 'CONFIG_POSIX'], if_true: dummy_ss) +specific_ss.add_all(when: ['CONFIG_SOFTMMU'], if_true: dummy_ss) specific_ss.add_all(when: ['CONFIG_XEN'], if_true: dummy_ss) diff --git a/accel/qtest/meson.build b/accel/qtest/meson.build index 4c65600293..176d990ae1 100644 --- a/accel/qtest/meson.build +++ b/accel/qtest/meson.build @@ -1,2 +1 @@ -qtest_module_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_POSIX'], - if_true: files('qtest.c')) +qtest_module_ss.add(when: ['CONFIG_SOFTMMU'], if_true: files('qtest.c')) From patchwork Fri Oct 28 04:57:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 13023064 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 D11AFECAAA1 for ; Fri, 28 Oct 2022 05:01:43 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooHRh-0003jB-CB; Fri, 28 Oct 2022 00:58:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHRf-0003iU-SR for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:15 -0400 Received: from mx0a-0064b401.pphosted.com ([205.220.166.238]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHRd-00024i-Jj for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:15 -0400 Received: from pps.filterd (m0250809.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 29S4MWZq011302; Thu, 27 Oct 2022 21:58:08 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=PPS06212021; bh=YLhacHRwL8fUc2NHT+7N2mRS2uOsKJ1uYgdb73cCTy8=; b=O5xcIOlaL6WzJRhyd3VfJ9QXNdK9uTiNkrW93ulrWOa7G5ki3i2sseOo2Xp+Yy5Wjw/4 66N191QObZyEbo6deTxI+oZ7V3aITv+MrA+HOtpFU6LaffBSV6AekOmYWbRFNELCPaxR 134QO2isJsHmrhoK5RywavOXzPav4Zq/daYp09emT3tuQcKDQR6oxt8xT/brV/U2wjP9 QRndxe1gesLl8NHiew+8MK5lG40DKIRwDWceS3Xq3Ij7Ck6wsslcK7jGzkT2V5EC31il PaSmJgc3X4QTRWRXPUmbBNnJdXJh0NG/zZsh+mlVehxCJ1EOfLmhU9IU7Zc7KIlWpHC5 6Q== Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2170.outbound.protection.outlook.com [104.47.59.170]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 3kfg3gs4ts-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Oct 2022 21:58:08 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RaZNFEexBfp5lcbTKY/YMjc+ulNB0v5bfgCcZCgV+Vk9zsxr+3QqmuMdKAaLPnXbhnfhqtCnwuOl2F+Er9WzzvFgCMem/ct1v8SUTbKxAOlxF/X0yg92ZTm8R3njzsVHd8djRJa0EB4YBAgF944S4un/XgvtAfOsbqyg65jrY9pKSw8ykwIMJkUeEtwt8V/ipE9n92g0jwA/xH+zvpFNERtq9ptlHBpx2AeD9wMf7/vW/BWqz0o6O5hoK/NLBVZYz0RahO/LBXBspLWzlnjbC0WkWlTqWupAW5QpjuLJBO8kyBqxHyhNIXskKpIUv3hrH8lrNO/5GSaBIm36tA95pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YLhacHRwL8fUc2NHT+7N2mRS2uOsKJ1uYgdb73cCTy8=; b=mwpqNPqJSqtbWvYEeKHQqpOyQBsU//H20dP3HhltK0z6yHQ0GvE/yBBG/UAs+HawOLBTPPTK2yaQv52wLSgmrfCAOBNthxuJEUJtfgI2rP5Np8jBLzOTVBUGUbuV3qDkl+40w2boKlV0rNRqg+1UAcBmByyWf0BSSYtpVEZxubvP6P+9P/4zSWUCnjDngU0NnAT0p43rR6QZbtTqxBca0XViyN4+xDoPToD3uG8FsVVqH3pquXgJ9/MlRnqQGIPEH/FTHENJovLo0g2vO/i65fgZBMZNBAb8MWtRoH2PtwChSKgsuNRAZO68XmWxSJzh/BLn3Am7idBWUwEsMr1OWg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) by MN2PR11MB4632.namprd11.prod.outlook.com (2603:10b6:208:24f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Fri, 28 Oct 2022 04:58:06 +0000 Received: from BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201]) by BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201%9]) with mapi id 15.20.5746.026; Fri, 28 Oct 2022 04:58:06 +0000 From: Bin Meng To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Xuzhou Cheng , =?utf-8?q?Daniel_P=2E_Berrang?= =?utf-8?q?=C3=A9?= , Laurent Vivier , Paolo Bonzini , Thomas Huth Subject: [PATCH v6 02/11] tests/qtest: Use send/recv for socket communication Date: Fri, 28 Oct 2022 12:57:27 +0800 Message-Id: <20221028045736.679903-3-bin.meng@windriver.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221028045736.679903-1-bin.meng@windriver.com> References: <20221028045736.679903-1-bin.meng@windriver.com> X-ClientProxiedBy: SL2PR04CA0009.apcprd04.prod.outlook.com (2603:1096:100:2d::21) To BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR11MB5351:EE_|MN2PR11MB4632:EE_ X-MS-Office365-Filtering-Correlation-Id: 76d62c7a-bb85-4bbb-6097-08dab8a1004a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bt2Kds/pAn6QWVbH7SJXrZz0T9RU6UM0Ww9sGQbyGHw2SGSbKY7kXU65sPnPXoOEdrz0DfC8G3OY6w0SJA1Cl8LwWIaohG5dQsslC9e88vBTkdH5GFeA8F7OqEzbHXS0tZuKguoxSlqN9S/dTsGkK5RVs7JWuIWPHYoNfLBwnG1VQAw3QLeiwXMSFpG1Bet6PvfoHY3KUycwPizZr2jn02GYnUh4zC7eG1JJnNGdiSBs/LwbNQStp3K22q+21lqni1NBaeXgvFxdy5y+cmp3V+nFgPWlG0y2rwJZXX1obsX01TVCpwliUPE4GGGC3Y2yRYwYOqGA0IBCpwZgQurDM+LyifKrxsxPN2wPZFI8joiTXioKSSvxOLF3rbfyZFGzL+yUUHFExVuQAf8FgW4K4b6iJZsEcT9tb2wM2myfXx23vKv1OHD7xoE3EWIFBmRFC14APZLnXYe3C22Gh1LoztodrDxAllasbIDXrajbTiPdd3MeC6lbjGZFMIIrwFoWmYAABPpL846zqx8f1ORo2rnRpmhGx75AOlEp9M+8SdYORbilu2bjeMkMZIa+MDq0GWnBu88iKY7QM5+V6K71OLTCw5ej4yCMbJQvpA7FZWA+/OGKZCHsCj6KxYQGscOcVzP9R3pEKVLH+bseKFpBU581pQlgD7uvpoPHU+bkED/YKV8VB/lwGNFfeBDHymL/vApH3gpCIZh9EHJ6XxJ55hr8iiKYdRpq0tHhqBAXg9HPRSGMAKiPfPf3LKzroK6V3cUuNH8iVnNkJRlZNir6yg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL1PR11MB5351.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(39850400004)(346002)(366004)(396003)(451199015)(478600001)(26005)(6486002)(6506007)(36756003)(2906002)(83380400001)(52116002)(6666004)(86362001)(5660300002)(38100700002)(38350700002)(2616005)(316002)(186003)(1076003)(6512007)(66476007)(8676002)(54906003)(4326008)(6916009)(41300700001)(66946007)(66556008)(44832011)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?2Pj9ty4IBafaojLdTFWBebe4fWPc?= =?utf-8?q?p5XCoE9l9QlFMteXHfAK2/wvVBttYlMcL3NIHBYsQSNqUKjdZXbTlFBffXrGSW5MP?= =?utf-8?q?J+PDjRVvXMlDg61bHnwUdsM7SpDrsNsfktD/ET21RRc6ps+F6FWAAGa1uY2g1rTnx?= =?utf-8?q?qc3Qyr4sJn0moVkxG7gt3JMaOqtZLX5GnLSOvULeMoVNoYR0L+2bz2T3fuK6PG3cd?= =?utf-8?q?HYROJyKKmTIOx1Ox52ao//Z7vIouZZyprk47Z5TLZm/K0CfETW59FeKleQ9pBwNB7?= =?utf-8?q?ozlUqqUR9/0vDoJnPCDmUfX9wBc7yJuWmCz+cMin59UpYCGKLFlB5Fe4vFWaW+A30?= =?utf-8?q?mnB8+Qw+AsW4JmG/+9m4YBREJ00J/raZVfQtXOym+N9XFm9zC11/cTfuzqqf2HSkW?= =?utf-8?q?3CFCvVSfgHsARVjekGR5OS3PRkXdNAGEjX7AjvM4mmv+DnpSyoa1VQULmPMchmLwp?= =?utf-8?q?78RJ+OCGlg0VFsaY7ptbkQ/HupQVEfuQ7jl+vbBu1717xoERGyx8s6kPXLfOGbACm?= =?utf-8?q?26X6nrM1/NMZ7pXK/kC3VhWpr5Fh6nr3nEAiC+3UNlQKApSQPNe8lqnFzMyeZuRPw?= =?utf-8?q?F8gzHfeHldvc9A0+8eiBLdUCXYsTCV5Z6Ejrnh4k1Cb5La9rXUk0xsoqDUNjHRNdJ?= =?utf-8?q?P9Wt4svWPyNvK7WGEAkM9vA0y4q3uFSRRJk8lV8lnrg1aW2Jy5ampvD/Gizh/l4w5?= =?utf-8?q?89x3pgLlLL/np5FN+r9mq7vLmESuyc+8kUlRLi2iiiXHpCcWdWSGnSvfzTW1kL863?= =?utf-8?q?tmwtD4MScTTB51Uk8SLrvbuWEVX5tBrFcl6aeA+34b97ZU69mRrqylgqLVTudK1Oz?= =?utf-8?q?nKdvM6pB7PuXP4ISaFLjm6my5Hr0h41mcYvECJPSMiwUAm2GVezjpaIeWpxBrDgEa?= =?utf-8?q?jFaqQpwMhC3+FpDcEzVjxfRoDcf45GeE/4r/1+jBkiExkpmIulENI4rAvpqettI0Q?= =?utf-8?q?BZ1QSB+TaEbS8bcSIPcyT9pwnq9sQJGHCbXR7L9TXkvx5Ttl07eQ/UPjakBcnUmtl?= =?utf-8?q?QbYA8WOTfIyN3asSURJPhthFfQFzkG2vAblqYiGUaREi2HbQM4PddvHrrqbfnt/YF?= =?utf-8?q?IZkbhUZmSM6ZWa0iEy/ZZLtEDJcfQ4Dwd4XaNqatALxkan4eaXgm2+j0DFGPwwj5R?= =?utf-8?q?3LNnFZpUwNqe7mr1ja08LcutOPwEOTHi6LQ2tVUOz9y1Hj1dwZ/ZAOczBMbdOADQ/?= =?utf-8?q?cWPRj4jmfmB8MUeoEPyqd1/JMvmzfqsuQBkNj0VvHp4pn16SJ/+ZhHV53ab5m1oMb?= =?utf-8?q?tSPt1AhJvb+HP6/3DM+GEcjAvaqKu2W94sIIpl/nZyYwlUMrMlmNFXf4eY+ybvefB?= =?utf-8?q?Y5QcPpc3grYBkagNAsNoP6UlMFER+b0FQQRhPeiL4p+zqHnpf4QIMXdOIQ3J2QLPa?= =?utf-8?q?hI5aD3PJdomGbN+lckGDIIDZ/lpV2om0jJ1CWu9ttFxv4WHvHgwk9+H56R5Vl8wab?= =?utf-8?q?AXEnltIqdcDgwYBtEUe5Tdkio0kRvJYVfzLOWpld6xndi/GZ/49cHotwCACAD17a3?= =?utf-8?q?eqfzm0nO4Be8?= X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 76d62c7a-bb85-4bbb-6097-08dab8a1004a X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5351.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 04:58:06.2340 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MA2Qo1pV0T96WPDXgqqH5mloK08DAVNCbI6QvHl+kqo4/sYZGgKI1iLx3I1U7QNX5LSRjqziiffjvpff4S2RCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4632 X-Proofpoint-GUID: 7VRUoZNJEAXUkrmhvxtKtS_1uTbCKXrv X-Proofpoint-ORIG-GUID: 7VRUoZNJEAXUkrmhvxtKtS_1uTbCKXrv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-28_02,2022-10-27_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 suspectscore=0 spamscore=0 bulkscore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=980 mlxscore=0 impostorscore=0 malwarescore=0 priorityscore=1501 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2210280030 Received-SPF: pass client-ip=205.220.166.238; envelope-from=prvs=7300ee25fa=bin.meng@windriver.com; helo=mx0a-0064b401.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Xuzhou Cheng Socket communication in the libqtest and libqmp codes uses read() and write() which work on any file descriptor on *nix, and sockets in *nix are an example of a file descriptor. However sockets on Windows do not use *nix-style file descriptors, so read() and write() cannot be used on sockets on Windows. Switch over to use send() and recv() instead which work on both Windows and *nix. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau --- Changes in v6: - include in libqtest.c - move documentation comments of qemu_send_full() from util/osdep.c to qemu/sockets.h Changes in v2: - Introduce qemu_send_full() and use it include/qemu/sockets.h | 13 +++++++++++++ tests/qtest/libqmp.c | 5 +++-- tests/qtest/libqtest.c | 5 +++-- util/osdep.c | 22 ++++++++++++++++++++++ 4 files changed, 41 insertions(+), 4 deletions(-) diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index 036745e586..61648f3f3c 100644 --- a/include/qemu/sockets.h +++ b/include/qemu/sockets.h @@ -33,6 +33,19 @@ int qemu_socketpair(int domain, int type, int protocol, int sv[2]); #endif int qemu_accept(int s, struct sockaddr *addr, socklen_t *addrlen); +/* + * A variant of send(2) which handles partial send. + * + * Return the number of bytes transferred over the socket. + * Set errno if fewer than `count' bytes are sent. + * + * This function don't work with non-blocking socket's. + * Any of the possibilities with non-blocking socket's is bad: + * - return a short write (then name is wrong) + * - busy wait adding (errno == EAGAIN) to the loop + */ +ssize_t qemu_send_full(int s, const void *buf, size_t count) + G_GNUC_WARN_UNUSED_RESULT; int socket_set_cork(int fd, int v); int socket_set_nodelay(int fd); void qemu_socket_set_block(int fd); diff --git a/tests/qtest/libqmp.c b/tests/qtest/libqmp.c index ade26c15f0..2b08382e5d 100644 --- a/tests/qtest/libqmp.c +++ b/tests/qtest/libqmp.c @@ -23,6 +23,7 @@ #endif #include "qemu/cutils.h" +#include "qemu/sockets.h" #include "qapi/error.h" #include "qapi/qmp/json-parser.h" #include "qapi/qmp/qjson.h" @@ -36,7 +37,7 @@ typedef struct { static void socket_send(int fd, const char *buf, size_t size) { - size_t res = qemu_write_full(fd, buf, size); + ssize_t res = qemu_send_full(fd, buf, size); assert(res == size); } @@ -69,7 +70,7 @@ QDict *qmp_fd_receive(int fd) ssize_t len; char c; - len = read(fd, &c, 1); + len = recv(fd, &c, 1, 0); if (len == -1 && errno == EINTR) { continue; } diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index b23eb3edc3..b01846fd98 100644 --- a/tests/qtest/libqtest.c +++ b/tests/qtest/libqtest.c @@ -27,6 +27,7 @@ #include "libqmp.h" #include "qemu/ctype.h" #include "qemu/cutils.h" +#include "qemu/sockets.h" #include "qapi/qmp/qdict.h" #include "qapi/qmp/qjson.h" #include "qapi/qmp/qlist.h" @@ -428,7 +429,7 @@ void qtest_quit(QTestState *s) static void socket_send(int fd, const char *buf, size_t size) { - size_t res = qemu_write_full(fd, buf, size); + ssize_t res = qemu_send_full(fd, buf, size); assert(res == size); } @@ -460,7 +461,7 @@ static GString *qtest_client_socket_recv_line(QTestState *s) ssize_t len; char buffer[1024]; - len = read(s->fd, buffer, sizeof(buffer)); + len = recv(s->fd, buffer, sizeof(buffer), 0); if (len == -1 && errno == EINTR) { continue; } diff --git a/util/osdep.c b/util/osdep.c index 746d5f7d71..77c1a6c562 100644 --- a/util/osdep.c +++ b/util/osdep.c @@ -502,6 +502,28 @@ int qemu_accept(int s, struct sockaddr *addr, socklen_t *addrlen) return ret; } +ssize_t qemu_send_full(int s, const void *buf, size_t count) +{ + ssize_t ret = 0; + ssize_t total = 0; + + while (count) { + ret = send(s, buf, count, 0); + if (ret < 0) { + if (errno == EINTR) { + continue; + } + break; + } + + count -= ret; + buf += ret; + total += ret; + } + + return total; +} + void qemu_set_hw_version(const char *version) { hw_version = version; From patchwork Fri Oct 28 04:57:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 13023065 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 E89A2FA3742 for ; Fri, 28 Oct 2022 05:01:43 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooHRi-0003ji-7R; Fri, 28 Oct 2022 00:58:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHRg-0003ip-Ie for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:16 -0400 Received: from mx0b-0064b401.pphosted.com ([205.220.178.238]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHRe-000262-KJ for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:16 -0400 Received: from pps.filterd (m0250812.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 29S4vKLF032280; Fri, 28 Oct 2022 04:58:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=PPS06212021; bh=XTajlg8zWR4ljYU7tENX2Jx3IUIKPhlrual8lt7JCD0=; b=TMtDiArbAkTsJG8Lv79HuNzEaA1hokKkq+RDGjPj7lhTZS9/rqFPE90plgvvUhx829Gp VBY7t3/1vcPQuWtxENn40n9GR87TlAoppC9hdF7O/lw7rQwjb1VIUi93WFVzB4BpiL9e 28ajA0B5/6AnH2LuYhle6131bf6Lk1w4MLrP7zt6glew17cMLoZkS34Hav9lqjvVlwOd k7OiTtoSQfROq6xLR3DKPA4AhcYi2xt0pHhAAtCtT+sHgp5kBQ5x+TJGZ4k66GsomFrE q+YddVuzSspv8fR52jdtA8ZbpRVUhF/bvvS0RfIn2T9XnqY3f+53RSwswL4x3yQLKz/1 Rg== Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2171.outbound.protection.outlook.com [104.47.59.171]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 3kfg56h33t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Oct 2022 04:58:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J8cdFDI9ekHsUprn1sZtfvfFb3GW27rkPyvf3Yth44gdoWd2RmQ205S4HAbjbqbNeRKjveVp6Xo6lQBNhdrIG5fwd+NbcvQ5r7zA6pRUlRi63xNG/xOo2NRPiL1DFDJroZZQA8VU9SS3uJhntm1R/aSZcrA/F+3rza+ru1LQhhM8nNKRuJ/nRM8urpq0SX4WquZ0w3rX+jtVXpb17F4tFh6dFN1tkzJQ3wOQgYb+65fUkFtrC+zWHzXIzZuJfpOJPlrMXbwpbYUyG17fjT1PaZ9RBSqLl19iJcWi2zCw4rYSmz3I7kR/JBHPUrwPpynkj/AV8HN7rC1dxr+V7o0l4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XTajlg8zWR4ljYU7tENX2Jx3IUIKPhlrual8lt7JCD0=; b=ef8n7+TC6RnKHZNcNTQxLfh9hAkPMDcpERpLE0lz5Tdu2sJM7OCPup/7dWAiWMnXk8HqyGuoUd/4cVQu9FxeYtC6XYPfUAWWfeXGDb7gjyhO7zZgs1qo9DsAoTIxFU4CdxRrkVBQKn0BkOLTSDVkSUT0Wu0fmjKS1N8M58FwUvc7Dz05UxQtBkqEhRkKdT2vGlcIA5oDq49D8UL6/wzEKZY6cHNgDaDgUcS5pJOfmrk2rT1qcvP/gbrt+NHazri8+61AA9ERf4r+oCzOT/vkkgo943VTNtu2zCgsjTXSg+sL7k+NjtmHHpZUzwfP+eHmX93EebZ6lhJch4m3B2tOzA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) by MN2PR11MB4632.namprd11.prod.outlook.com (2603:10b6:208:24f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Fri, 28 Oct 2022 04:58:09 +0000 Received: from BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201]) by BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201%9]) with mapi id 15.20.5746.026; Fri, 28 Oct 2022 04:58:09 +0000 From: Bin Meng To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Xuzhou Cheng , Laurent Vivier , Paolo Bonzini , Thomas Huth Subject: [PATCH v6 03/11] tests/qtest: Support libqtest to build and run on Windows Date: Fri, 28 Oct 2022 12:57:28 +0800 Message-Id: <20221028045736.679903-4-bin.meng@windriver.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221028045736.679903-1-bin.meng@windriver.com> References: <20221028045736.679903-1-bin.meng@windriver.com> X-ClientProxiedBy: SL2PR04CA0009.apcprd04.prod.outlook.com (2603:1096:100:2d::21) To BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR11MB5351:EE_|MN2PR11MB4632:EE_ X-MS-Office365-Filtering-Correlation-Id: e1a7a26e-3d81-4844-e6ea-08dab8a101f2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Yp9ofU6DUF1k5g9Z0ZIpLA6O2akGo5HWubfIIl2EfFW9SF2WpcnHotc0Rs3hmkOyhRQuRbc2yUS2wqYF3evVLAi7m57zcGtryLIZsW13RCN+2yRX0/Q49Fnq/wM3VJRrKl/mR4O5+iBldYJR8o+G/0nMiYYCr77fSXH5xh/jP7JN5eMZkxRk1bEaVFqo8OiiWK+rVouUlka/oGhgn70hBn/HnN6fjCIS3AlBxOJIB+YlvN4YrOPbSFYWuqcP7j4yge9emA6NeacEt64CQpSxoBy/U3groBSmsGPkxHU8cfEYW9Lm0qC9koB+RZ8QXL0eyX0/39bwYXOU9OlO3K6w1DV+2UUYWutTiDc1JhCHkXwrmmcFHsw+kvwKFiG9y/0WM8sNog/NTg2MZ6gXVrhEgQRQ96FvhywEnbiUmbnR/fWWcTiv7MsBk0PNwVFqM8/2kWRyRTtSJwVNI5JegYOu6YVih2y7nB6dSNAg+6H/92eXmEy3lfbduL+3l1eA+Ii5WhG7AltpkbGFpGsjz6caxc7nwA9vbxB5kwkWwGr7tfY3uGRVUsD62UkSwnIsHsE6HB+nOcCeVPwDOBmcP3uLUgAoSPTEi9CJKb036ASLklxuit6KIatJ0layR2iAKMldCPqRNPGALGHg0w3so4NqFyjf2daw5KIj13fFOqDUTtcMdoybb5tkD2IwB6rvtB7/jszK0hs++x7NiSGwMx8sDCEu5NrVfw6mq0rb70uE2kWBlKit+2uO+0SQwwgYmoXNYk6j6FB0EAQPBcVduTGt6A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL1PR11MB5351.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(39850400004)(346002)(366004)(396003)(451199015)(478600001)(26005)(6486002)(6506007)(36756003)(2906002)(83380400001)(52116002)(6666004)(86362001)(5660300002)(38100700002)(38350700002)(2616005)(316002)(186003)(1076003)(6512007)(66476007)(8676002)(54906003)(4326008)(6916009)(41300700001)(66946007)(66556008)(44832011)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6kz0NzbCHYPcfqBh9Z8zAex1gfB3Kfkz7FbBdg6QaApxboB/rYiSqwxfEknSB8945zZjgvmm0bO5+hRYWmBAs23FZhVrva1p8ImRAipzQ2G4zEQ88LsCbXKvqvn8lftH50KOlR9udx5hmDb1PoY+GpYUtfcaRSN1CB75rJwyfB0JQ6ozx28X344UT4KD6syrE/zhxXMyc0ecv/CnoKae7jwx579BZ6Q0Re02XQFk/pDu+d3jQNCF3ape1KbCk+uk+3ZQ8pPmtA5on7AJqv0nu+N+Etg5p5Vaet4uk/fuyl2ZwHKpJTGbbqrePCcXUYYpNZ5sK3sBXSi4YTJlZrq8ehvdmieqhKZFxZj7gt8ilDcc16t7Oz0jwHET7I9ukL4UzTSW4hM383pJ2zVka0I3T52NEsqef9xaWLXN8r/ktuQpEpDuuFTKoiGob+T1OG8CS2KKmHzHMkfZRALjwDj//bhatsbyM1ve2pY7A3UV/Lrmh5ZfqdSnNBYDE6V1q/MV7CQTlFYUGoCdN7T4JUG/JaOOU1ZGmTuOWB1tWnoHywGfjQ7qg7sXZVS0idlJoPB2pa1dZi5EGI1PJ+jkFGuqrqqbNsvOXqygAY9SbGhND+6r8Oy2rOzt60Uy7TnPaCBHJxkCUDOkv7/RaaWlVMVG2fDbRNmnwr+1dqQ4aeuoXakYNLb7ZUKt9MuXvg6hAykEqrba9a66ks8gNlSzAr1LvREMdV7D3NOH3QRa7oE4mEB/tizEd6KI7/QBYeZghcz6OuUDmv8QJ7eg8Knu5oeCV7fkw5fl5mIftcelBoYlJBGPFUBTba8f9mb4bJGctuU8PIwHxfkPf0PAwfmrnmOrH/UrPaZdaMIUtpUx7AnWDx8WxD2xUaKsGft1UXqpyjQLj0KXjiyCiSbG1ige23BVtPMnKfRrQtAIOMYPjym/XMasDGB1K86/8WVuZuxatmZJ7JtHKi/Q8gCFlo2XdxTkSavoRUd/M2gMhk64dsaRF1On73+6yUCU+O6Z6clKdO5KxLIQXgPI8MVsMdi/SlyS1GNwXzjo2frTPdcrNdRx+GaOAnYqjNcZ0hvuv8qWQpWpyxXD3L+/EfCVrTosirP2fyL7SSMV9HsZDkmi0FZQfOUeZ+zgcJD4YWMvOD8tFz5uR6auBMog6rZkVfu+2BGLdJ40W9uWUHJlGzdsBBRIX0Sbgn+nUvKYggyTZiUxHJbFjYXTL2kVvc0m/nRY1JQKWdIxErSK5rmb8kzJKAYL75VzR0OzGgkKkLSS7hv6puLude1u/FgG9qaCHD8lCt5b8ZT0zAryIwcEiottoaXkm2n+82cnu5PUCdJPJ1Pgs15TdFcoqgIAAN6hsX3Ld6YMJNTQJ90ZJVhEeopdZWl04iYo2PbQZeQ2m05bnrBMY0qpvtNdeE+FAQITBUyXQbTDvyly3ixkVeXQh+XLXtWEybrUZQxqKaJ5P0CucCdAUFcpqHx68dQQoJq1MOuOUejDE7Q+gpgnGx6PWVSnNSdNsdB+Nn+ihunlNJZpSJhOY+ySBFj/6SrEWaKfXYBSpgF/BegA8q2RVYDnCk9gYCXnn25najj4dbFItHL7LmyOM2Lu X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1a7a26e-3d81-4844-e6ea-08dab8a101f2 X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5351.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 04:58:09.4536 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pzQOl6dKQCjskfwUrJdwWl9oVUgVDgT3x/wBA0DXzw6lIMf4MK7PaGa2dsTY6c1wnXJgwFXjlQZcrjJcDq1zhQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4632 X-Proofpoint-GUID: BaAXBUj_YgImiZszJXEpSfdnKcViPu69 X-Proofpoint-ORIG-GUID: BaAXBUj_YgImiZszJXEpSfdnKcViPu69 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-28_02,2022-10-27_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 adultscore=0 bulkscore=0 lowpriorityscore=0 mlxscore=0 suspectscore=0 mlxlogscore=989 impostorscore=0 phishscore=0 malwarescore=0 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2210280030 Received-SPF: pass client-ip=205.220.178.238; envelope-from=prvs=7300ee25fa=bin.meng@windriver.com; helo=mx0b-0064b401.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org At present the libqtest codes were written to depend on several POSIX APIs, including fork(), kill() and waitpid(). Unfortunately these APIs are not available on Windows. This commit implements the corresponding functionalities using win32 native APIs. With this change, all qtest cases can build successfully on a Windows host, and we can start qtest testing on Windows now. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng --- Changes in v6: - save the "exit_code" in struct QTestState Changes in v2: - Move the enabling of building qtests on Windows to a separate patch to keep bisectablity - Call socket_init() unconditionally - Add a missing CloseHandle() call tests/qtest/libqtest.c | 96 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 94 insertions(+), 2 deletions(-) diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index b01846fd98..d12a604d78 100644 --- a/tests/qtest/libqtest.c +++ b/tests/qtest/libqtest.c @@ -16,9 +16,11 @@ #include "qemu/osdep.h" +#ifndef _WIN32 #include #include #include +#endif /* _WIN32 */ #ifdef __linux__ #include #endif /* __linux__ */ @@ -36,6 +38,16 @@ #define MAX_IRQ 256 #define SOCKET_TIMEOUT 50 +#ifndef _WIN32 +# define CMD_EXEC "exec " +# define DEV_STDERR "/dev/fd/2" +# define DEV_NULL "/dev/null" +#else +# define CMD_EXEC "" +# define DEV_STDERR "2" +# define DEV_NULL "nul" +#endif + typedef void (*QTestSendFn)(QTestState *s, const char *buf); typedef void (*ExternalSendFn)(void *s, const char *buf); typedef GString* (*QTestRecvFn)(QTestState *); @@ -58,6 +70,9 @@ struct QTestState int qmp_fd; pid_t qemu_pid; /* our child QEMU process */ int wstatus; +#ifdef _WIN32 + DWORD exit_code; +#endif int expected_status; bool big_endian; bool irq_level[MAX_IRQ]; @@ -119,10 +134,18 @@ bool qtest_probe_child(QTestState *s) pid_t pid = s->qemu_pid; if (pid != -1) { +#ifndef _WIN32 pid = waitpid(pid, &s->wstatus, WNOHANG); if (pid == 0) { return true; } +#else + GetExitCodeProcess((HANDLE)pid, &s->exit_code); + if (s->exit_code == STILL_ACTIVE) { + return true; + } + CloseHandle((HANDLE)pid); +#endif s->qemu_pid = -1; } return false; @@ -136,13 +159,25 @@ void qtest_set_expected_status(QTestState *s, int status) void qtest_kill_qemu(QTestState *s) { pid_t pid = s->qemu_pid; +#ifndef _WIN32 int wstatus; +#else + DWORD ret; +#endif /* Skip wait if qtest_probe_child already reaped. */ if (pid != -1) { +#ifndef _WIN32 kill(pid, SIGTERM); TFR(pid = waitpid(s->qemu_pid, &s->wstatus, 0)); assert(pid == s->qemu_pid); +#else + TerminateProcess((HANDLE)pid, s->expected_status); + ret = WaitForSingleObject((HANDLE)pid, INFINITE); + assert(ret == WAIT_OBJECT_0); + GetExitCodeProcess((HANDLE)pid, &s->exit_code); + CloseHandle((HANDLE)pid); +#endif s->qemu_pid = -1; } @@ -150,6 +185,7 @@ void qtest_kill_qemu(QTestState *s) * Check whether qemu exited with expected exit status; anything else is * fishy and should be logged with as much detail as possible. */ +#ifndef _WIN32 wstatus = s->wstatus; if (WIFEXITED(wstatus) && WEXITSTATUS(wstatus) != s->expected_status) { fprintf(stderr, "%s:%d: kill_qemu() tried to terminate QEMU " @@ -166,6 +202,14 @@ void qtest_kill_qemu(QTestState *s) __FILE__, __LINE__, sig, signame, dump); abort(); } +#else + if (s->exit_code != s->expected_status) { + fprintf(stderr, "%s:%d: kill_qemu() tried to terminate QEMU " + "process but encountered exit status %ld (expected %d)\n", + __FILE__, __LINE__, s->exit_code, s->expected_status); + abort(); + } +#endif } static void kill_qemu_hook_func(void *s) @@ -244,6 +288,38 @@ static const char *qtest_qemu_binary(void) return qemu_bin; } +#ifdef _WIN32 +static pid_t qtest_create_process(char *cmd) +{ + STARTUPINFO si; + PROCESS_INFORMATION pi; + BOOL ret; + + ZeroMemory(&si, sizeof(si)); + si.cb = sizeof(si); + ZeroMemory(&pi, sizeof(pi)); + + ret = CreateProcess(NULL, /* module name */ + cmd, /* command line */ + NULL, /* process handle not inheritable */ + NULL, /* thread handle not inheritable */ + FALSE, /* set handle inheritance to FALSE */ + 0, /* No creation flags */ + NULL, /* use parent's environment block */ + NULL, /* use parent's starting directory */ + &si, /* pointer to STARTUPINFO structure */ + &pi /* pointer to PROCESS_INFORMATION structure */ + ); + if (ret == 0) { + fprintf(stderr, "%s:%d: unable to create a new process (%s)\n", + __FILE__, __LINE__, strerror(GetLastError())); + abort(); + } + + return (pid_t)pi.hProcess; +} +#endif /* _WIN32 */ + QTestState *qtest_init_without_qmp_handshake(const char *extra_args) { QTestState *s; @@ -271,6 +347,7 @@ QTestState *qtest_init_without_qmp_handshake(const char *extra_args) unlink(socket_path); unlink(qmp_socket_path); + socket_init(); sock = init_socket(socket_path); qmpsock = init_socket(qmp_socket_path); @@ -279,7 +356,7 @@ QTestState *qtest_init_without_qmp_handshake(const char *extra_args) qtest_add_abrt_handler(kill_qemu_hook_func, s); - command = g_strdup_printf("exec %s %s" + command = g_strdup_printf(CMD_EXEC "%s %s" "-qtest unix:%s " "-qtest-log %s " "-chardev socket,path=%s,id=char0 " @@ -288,7 +365,7 @@ QTestState *qtest_init_without_qmp_handshake(const char *extra_args) "%s" " -accel qtest", qemu_binary, tracearg, socket_path, - getenv("QTEST_LOG") ? "/dev/fd/2" : "/dev/null", + getenv("QTEST_LOG") ? DEV_STDERR : DEV_NULL, qmp_socket_path, extra_args ?: ""); @@ -297,6 +374,7 @@ QTestState *qtest_init_without_qmp_handshake(const char *extra_args) s->pending_events = NULL; s->wstatus = 0; s->expected_status = 0; +#ifndef _WIN32 s->qemu_pid = fork(); if (s->qemu_pid == 0) { #ifdef __linux__ @@ -319,6 +397,9 @@ QTestState *qtest_init_without_qmp_handshake(const char *extra_args) execlp("/bin/sh", "sh", "-c", command, NULL); exit(1); } +#else + s->qemu_pid = qtest_create_process(command); +#endif /* _WIN32 */ g_free(command); s->fd = socket_accept(sock); @@ -337,9 +418,19 @@ QTestState *qtest_init_without_qmp_handshake(const char *extra_args) s->irq_level[i] = false; } + /* + * Stopping QEMU for debugging is not supported on Windows. + * + * Using DebugActiveProcess() API can suspend the QEMU process, + * but gdb cannot attach to the process. Using the undocumented + * NtSuspendProcess() can suspend the QEMU process and gdb can + * attach to the process, but gdb cannot resume it. + */ +#ifndef _WIN32 if (getenv("QTEST_STOP")) { kill(s->qemu_pid, SIGSTOP); } +#endif /* ask endianness of the target */ @@ -393,6 +484,7 @@ QTestState *qtest_init_with_serial(const char *extra_args, int *sock_fd) g_assert_true(sock_dir != NULL); sock_path = g_strdup_printf("%s/sock", sock_dir); + socket_init(); sock_fd_init = init_socket(sock_path); qts = qtest_initf("-chardev socket,id=s0,path=%s -serial chardev:s0 %s", From patchwork Fri Oct 28 04:57:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 13023066 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 F0118C38A02 for ; Fri, 28 Oct 2022 05:02:27 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooHRk-0003kR-3w; Fri, 28 Oct 2022 00:58:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHRh-0003jM-6l for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:17 -0400 Received: from mx0b-0064b401.pphosted.com ([205.220.178.238]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHRe-000267-SL for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:16 -0400 Received: from pps.filterd (m0250812.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 29S4vKLG032280; Fri, 28 Oct 2022 04:58:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=PPS06212021; bh=i+Usbd+a6oRewrulcMrF8NEbi8yhqxZBZBGbbVZPgtM=; b=UsWIjmDAsDzTBo9rrUbf89hyjIwb0T6uF7bD6Zf8btiyVz3ekm61+7sBBTuxvzpudTUx evArzeyGs45Qll0cqSYtRArE/MIwK3cSvb3l4QPoqof1FLlAB6PBJ8CVoERgTKR28ri6 c/hJBmnz+a0hGeBuVnu18tjzlNZg1O3gbKNgG4/GXVPUN10kxuGa5YBy8JTmsnz4212W LdhoIfhsNkj4dp7txe7bGWj0CyM11BMpitG0nGz4kYNSUPgfDnohTbHIbJHfusNCTNqF dMcSx7QTmhuvUmpsDQr35NLQN+llECQdjndhb0yLg0USuSqIMnl1y6o71cfOCRllZ1ub 2w== Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2171.outbound.protection.outlook.com [104.47.59.171]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 3kfg56h33t-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Oct 2022 04:58:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DRsFQOZ6yCPTPaDa0BEkF2H0OHNxa1VzIb2L3RELEbZqTrClnpOi/rZx9qrAAf4TxYDu0Bw/AQf71cAJR3kwRzldCMMtTT/XvNGS4AkA6Opk1zvU2KreBr96kVQR1dElHnQOrhkfj4DoR4N7Grg1ZyYmRAkt8f6vYMy/jA5wdbj/D3UGl8RwGf6ZnVflUmN/ntgb1cfeCXX6wi5lwRqD0aPRswrPChBy7euRyrfq7eth+IB9MVbBu5OFqx9ZFJj2OP+aWT1TrIJgqBtIRSHcn2lWMFezOyd6fjpiiuf6BeSj5B/J+7UpiRQpr1OOm1CxioHWXVdcvuiUyFTHS7Ua2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=i+Usbd+a6oRewrulcMrF8NEbi8yhqxZBZBGbbVZPgtM=; b=b8TjSwsx74eHHnNLbHa0iT7UfL8ByXJjU4of7g8u+Sa9X2LtGgfjd4fxWjWgdxdn7UWvNMCW3bjd3PcF3VDhnMlphrQawEq5ZJd1zDmhkkeQWXF/3MoEAUDgS2MZU1iRQ8eBbYVX55cQY4l6npxOB6igmf4NQJeiijg++/73IZNluYwty2seOnZ7iqhrcYoM0nF+CKybflUHjmg/9iid0CVqv34cja8kx9aLokTahbd9oU1hq4/TPRe02fiio9wzuaG8UglOkL0vnHr4Nak8D+jGZOV4+ZYhfvyK1WNAlBRcBHVDWXlzEyr97OLy/4QYYNyRMJZxxAFryWj1vPVCpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) by MN2PR11MB4632.namprd11.prod.outlook.com (2603:10b6:208:24f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Fri, 28 Oct 2022 04:58:12 +0000 Received: from BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201]) by BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201%9]) with mapi id 15.20.5746.026; Fri, 28 Oct 2022 04:58:12 +0000 From: Bin Meng To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Laurent Vivier , Paolo Bonzini , Thomas Huth Subject: [PATCH v6 04/11] tests/qtest: device-plug-test: Reverse the usage of double/single quotes Date: Fri, 28 Oct 2022 12:57:29 +0800 Message-Id: <20221028045736.679903-5-bin.meng@windriver.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221028045736.679903-1-bin.meng@windriver.com> References: <20221028045736.679903-1-bin.meng@windriver.com> X-ClientProxiedBy: SL2PR04CA0009.apcprd04.prod.outlook.com (2603:1096:100:2d::21) To BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR11MB5351:EE_|MN2PR11MB4632:EE_ X-MS-Office365-Filtering-Correlation-Id: 77f1d7af-481b-4a75-9b9f-08dab8a103d4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9rXCexNT652/ZLRUZBcbpCvI+oiol6gLhhe0RZiC4bS4Ha3awo3MqdcqjBPH1rMOhAPvveYIaGx5VlT2xJnXn6ScuFNeuVrLzSMFeHfq/fhHexCIRAm2/WySKcf9kb/BUJ4TN4WFL18BXml3BFKOF1/p+GixLA3TE6aCJu07KgjsAjIs/uBE/NPJNh/uKU6Ik9EPdnLkdLxYXBOKPM1IwzJ+wM5Y7lBc0Xlq6B5eHCuhkQNI/AmOTAMr/Gw9dyumGDJtqXntOEogTCSqoREqjb4fvyYfduXkVs6F7BrUn0gWmGzrcvKHaJEO7R8r5Pq+GBzkMXb4t2H9IoOCxMMSU9P0kFemDc7BBxUjQZTmSb/hXfyK6ZoGEcZNk+C2CVz6HFgkz5LPSri3DA/swlb5yTUIAyKXkezs5YJGZqEl6AZIfQqX8tJPYslLBqznA9U/Ekv5xa4zaWH94vUR/k6iZKGIWF3SiTywxIAFHT1NnP2F+sxSZD/3Rp6X0g+F8rVCVSBe8lY2vjU5bvcJzQLsr6HFOXb/b62etNBL51CXCvUGkPItsnpy8itpz+ILtMQM0D1E+nxwBVuvprFkWMVf+7GuLWlnocm1HsQ8axo0C20oDhVd+IfNDhSUwUNmeAg1bvR57vT4BSOuiz2hEUY704lrlTZsdoYvG1e8eH+S54tvYlJwAqjF3PberET0m5pKhHEw5evCqcD9TRvXhvDVU3B5BaL4+bmO1HCEkJCtQDgaA/AbzMY2AIhYYMJJ+tA5RL8HSHtbkI2DNqbk5IZZfA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL1PR11MB5351.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(39850400004)(346002)(366004)(396003)(451199015)(478600001)(26005)(6486002)(6506007)(36756003)(2906002)(83380400001)(52116002)(6666004)(86362001)(5660300002)(38100700002)(38350700002)(2616005)(316002)(186003)(1076003)(6512007)(66476007)(8676002)(54906003)(4326008)(6916009)(41300700001)(66946007)(66556008)(44832011)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: X660BtMEtR46HY4XKSp9XsGXn9b8TezRFC8R4e7mNghNJ/ZbhkZpQ3/vwT2XlSHXBLwvIqU4XJL83/4SZX3q51lIoeZOxXOM4Db6gnKAncpSY4R1laR3Hu8rctmWx/F0aXi6ndwjIwvP/0ORCDnrXsD+0SXccy5KRwInVziBsYz2vZEJ5uSW76Hk4KtCd5TVXRmMxYN3jtENgAPe1iZxWqIg4Bc59HeSOtyzL9WkFPzO66ai7m2rGxX1BXnWOz3BS36qt+XwD51MbU6xwezSzpO7Eb4MjAlEOwJb33gQoQdGysOZu8jeCE+t86zBruk1JQWQonujTWIFkvTV9FRivPTDVL5ASnOQ+sAw03af/LWvgD95myXb3PxrbBPn/5raBNG9mIkQW+KrOopc2IeXk0ZXiBpolA+5SoCyryjJxzOWqMCakMPDzO6veUdW6ZaA2g7RHDRyV9aQa5C4yd3tBOOW40MtSh0YZxt51f43HUYYfpKoW9/kmZKezDCVtC5zOOnAla3yIhc8PFDGjlZBaWEKeWNAdiP9ciI00NHbbm8dliINNmVdNHO5Di4JIVBCE4uIYgHMFWcDWIk+nKqiSkq5NAVHyzJrddNE9biIIOvFXgUbbVEWdDkWQ2/hgvHdApKA/L6gsBQZT62z6ORhBhUB8RXNDNE/vHJ1706npXrSzUWKfknr3WywSOnmfxiE3E69KCBe9YQjk6vwX1q61JGviLmRMmFEnZ9BI5HhsGrJ5r0DK/E0HNmpcvat4W0bkwpzTWaFQT7vES2Fa/o45OG0jEEpEIsC85qOHQoN1f6Pk0JMUTYnz1OpQXIAEFsVcCGX0fwwqM69RtzKlniPby+Lng7g6h4LsLyPh3NUY0e4BO9lqtxIw+eIzdKaChGic2W4syjKvo2/FvbhRFlzqeLOucoJK2Z6BH0SZ3WJB4a8bDgGYdOMXp9LekBTDZsX8x9v6pB+Ntt/n+v5lIgjNDf7tmPnr1LIDyZd6N61zgFtN3qnTAyNZ6LTfUNNmqnJ6qYtBo4/NurD9D6ZfikSX8ba7T6J5mOaMMECmWoGIWOYzHo1Wf++fZXTECCwKL/mCmRAqqeU7VXiTIQQeSxEuLUK6vv3Ev9nF95NoDo7yxbNKJnM4s04FHOsuSUcxlwHt8ngGrYCfM8HTu2N4Uir41EvodoIOQCsqMsSqTVMup0N20bKvkYVN46novRNYAI4dAwblNWrcuSkwtNEMWzvBFCu1Uyp7C1GOkGd2e9+26fzj8VSqsTqgPLbuHT8c+Vxq7YrxmQokcS6Att36YFOW+NDBzaTtWPpHwfPzkYheKGr3AJzvQY3j2+bE4m+bCHQ23uY3BLdsSgMPOBgjOIPOHQH0W/8Gq3QnzE/vyoWZy5f4zWbk6pmuLxthLyxvYMMCSB/ztkN9HggEikRkFOvf1Ya0DrFVCogUk4NCYL9bMVfCJEA1yX4nUM/16o9uQDK4tp658XPr7sr2LXO71OVG3KCMu8dDe89lQQXmbX17eVuKrDUrVQix7npamk7gFd3Aad0PBiuoV5Sf3YHBcSkBKOGOVnJfl/JcMKPDBqiuRjt/IH0YkqUY/FETeDzyubU X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 77f1d7af-481b-4a75-9b9f-08dab8a103d4 X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5351.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 04:58:12.7187 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2/oGBgA3FrzdMXtt/Xxq3iCGHq/RQdgT57yS6x3UFg9k5kWtOled+gyzLAzGbMVHHhSGLOQizck3RCCEsTOoYw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4632 X-Proofpoint-GUID: R6yzT_EOKzExrJrct_d91ExVHl-8WAv7 X-Proofpoint-ORIG-GUID: R6yzT_EOKzExrJrct_d91ExVHl-8WAv7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-28_02,2022-10-27_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 adultscore=0 bulkscore=0 lowpriorityscore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 impostorscore=0 phishscore=0 malwarescore=0 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2210280030 Received-SPF: pass client-ip=205.220.178.238; envelope-from=prvs=7300ee25fa=bin.meng@windriver.com; helo=mx0b-0064b401.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The usage of double/single quotes in test_q35_pci_unplug_json_request() should be reversed to work on both win32 and non-win32 platforms: - The value of -device parameter needs to be surrounded by "" as Windows does not drop '' when passing it to QEMU which causes QEMU command line option parser failure. - The JSON key/value pairs need to be surrounded by '' to make the JSON parser happy on Windows. Fixes: a12f1a7e56b7 ("tests/x86: Add subtest with 'q35' machine type to device-plug-test") Signed-off-by: Bin Meng Reviewed-by: Thomas Huth --- Changes in v6: - new patch: "tests/qtest: device-plug-test: Reverse the usage of double/single quotes" tests/qtest/device-plug-test.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/qtest/device-plug-test.c b/tests/qtest/device-plug-test.c index 3f44f731d1..5a6afa2b57 100644 --- a/tests/qtest/device-plug-test.c +++ b/tests/qtest/device-plug-test.c @@ -112,16 +112,16 @@ static void test_pci_unplug_json_request(void) static void test_q35_pci_unplug_json_request(void) { - const char *port = "-device '{\"driver\": \"pcie-root-port\", " - "\"id\": \"p1\"}'"; + const char *port = "-device \"{'driver': 'pcie-root-port', " + "'id': 'p1'}\""; - const char *bridge = "-device '{\"driver\": \"pcie-pci-bridge\", " - "\"id\": \"b1\", " - "\"bus\": \"p1\"}'"; + const char *bridge = "-device \"{'driver': 'pcie-pci-bridge', " + "'id': 'b1', " + "'bus': 'p1'}\""; - const char *device = "-device '{\"driver\": \"virtio-mouse-pci\", " - "\"bus\": \"b1\", " - "\"id\": \"dev0\"}'"; + const char *device = "-device \"{'driver': 'virtio-mouse-pci', " + "'bus': 'b1', " + "'id': 'dev0'}\""; QTestState *qtest = qtest_initf("-machine q35 %s %s %s", port, bridge, device); From patchwork Fri Oct 28 04:57:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 13023071 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 19F80FA3742 for ; Fri, 28 Oct 2022 05:04:50 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooHRn-0003lW-Ov; Fri, 28 Oct 2022 00:58:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHRk-0003ki-FQ for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:20 -0400 Received: from mx0b-0064b401.pphosted.com ([205.220.178.238]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHRi-00026i-7x for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:20 -0400 Received: from pps.filterd (m0250811.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 29S4wHvC031759; Fri, 28 Oct 2022 04:58:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=PPS06212021; bh=yeE4BaMqTy9r3XtCBfy2Ls2Pu0c0qV3Kyaz6ba5l6k4=; b=LB4bAYSPQuSSOTF/jOEhnI8mTziSACqVr0ix0lPqL4m+ifLlhhbvwELTWeEi9fL/CeeL nze9a+uWom9vrNLTGKnDIGkKDAri/sc37eGI0a4upqzh9U+MY055YFnFd7DNFv/1gZLC 5ZAHSAIsX8WF6OJaxhAG4zDvrEGvz2gyCVZLrDPyuh0XwcLWaIkE/PofdFRv51POaDrd r1EmAxbIlXv0+3cSY0eybonZEHKvdU6E3GNIHCju4Oqql6vErKpx3RkZdmlLkgrUPOCt EFfS70NttbebpTi9XLoX95vwx23ZmFqpRVhKHopMF9M4A6gXkP3+cWshg3k/SoR/05qd Tw== Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2173.outbound.protection.outlook.com [104.47.55.173]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 3kfg3xh30t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Oct 2022 04:58:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UQqpVvYCniIx/8dFV4h5YzZw7MOsmGlhGiORbPWRwR4+yDNSsjcIgdiH3wuihBLa2wFwIAptTgRviq6ZBbDP1NbWoXkwRsPrrA/ROlLbM1FLj3pvu7hJQVLCx9B8B08wBgodcXuEhaJwgFBt2umnHwLl5BFKp4TN2EmjbR0pCujv9xKTV4rg69fOG6d4s/ASs7/p3Hw3fctjiWB1G9r2FBITZ6Xax45cXfxhb/wXvxPjAu5assPScMRpnKFBtNYa3GxPmsksNs5lgaTNi9Gct2kz8knPv0PW/tLb3Eweh74sB7oHndK7z1/jgMYns2aFgmLNPWCCiFt1OKkmSwtVRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yeE4BaMqTy9r3XtCBfy2Ls2Pu0c0qV3Kyaz6ba5l6k4=; b=AJesfZeqLAm7jUPMTP9WADcv39LqaEKPgDMUi7KYmPwj5Ugt1VED6SoSy2p0tMycQ2nAl30pKCg5ltbjPpjgdz4Ioaod7iaM3PyygAcwy5CrU8f+WtzbjI3S+3F8tURCyFQagh8GqBwlusfGzs1Y9DvzwNLj/nJ3tp1E4nWCS2p5EC2B/T3rD8Ib6UVpNmxxDDDtCyym5f+g92tPQLrLWW9GUDb7FEjOXzBAJTIabFZ3wnSEbhU8S6Vz6SpWztZWGNgzdGeu4ieqBGRRjEUSam0Tt7TN4ABfP8RCQkeZLAqFs/H7NmYeWoXg/2c7+wxSvQqMYqma8zoSEPOICXCIyQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) by MN2PR11MB4632.namprd11.prod.outlook.com (2603:10b6:208:24f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Fri, 28 Oct 2022 04:58:16 +0000 Received: from BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201]) by BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201%9]) with mapi id 15.20.5746.026; Fri, 28 Oct 2022 04:58:16 +0000 From: Bin Meng To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , "Dr. David Alan Gilbert" , Juan Quintela , Laurent Vivier , Paolo Bonzini , Thomas Huth Subject: [PATCH v6 05/11] tests/qtest: Use EXIT_FAILURE instead of magic number Date: Fri, 28 Oct 2022 12:57:30 +0800 Message-Id: <20221028045736.679903-6-bin.meng@windriver.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221028045736.679903-1-bin.meng@windriver.com> References: <20221028045736.679903-1-bin.meng@windriver.com> X-ClientProxiedBy: SL2PR04CA0009.apcprd04.prod.outlook.com (2603:1096:100:2d::21) To BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR11MB5351:EE_|MN2PR11MB4632:EE_ X-MS-Office365-Filtering-Correlation-Id: 76e83ba4-a53e-448a-1f6e-08dab8a10611 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vaOXgNG7cAu871E4CEFZquKkd1pWbW6+h8NBZpkVmZJk95+qNRCL8JP5yOXxpWVUsoq8xPVAm61l8nBOylSb5flO0hShm/0GSn+5jc6u9zsp2ze3sZE6uGAKrhpNGwNGuY57LsGy+dDhK7B09CacTym7psc/exlOueXfzXEaDGacwSf8V7taWoBfw9KAQIf9Qb6n+QK1PZxyvJGO1YacEtZGZCkyLH8G1o/O4JXacaKQ/bNijLUgSw6iM+y9aJrE/SQqsmMplqsiOgpskYTmAHP6BTLoM9eaiuPHgZrVK8ct4YPELjP3vWF6KPata9TDbKQEoTwX2hFUXTI5iJRiwZUWmSDFYAeRaZaI54knq+jCkQPtMyOkkb69v6GHr8mnHkywNkZegjmz2Kq4JyjJzVOC63wZa67vnt81tBPrkzuggmt6Abj+7AWpgHqAZreKWt3Qp0H7Sh0/4Z+gwSWtHfqhj+EcO/gL8VjnolxO3W3CRZAQPQmp4NEg9stn0B6+Q15ilVmXjwan0yvNhR1izUk/Kw2EZBEJ8iMtFT3uIssv443UMrgMD+Q9/XYfcRVXlMprdgrAgNhRxi/z/vpCdD45a6r7EBYg767skG1h9UckOPyvPdMLdhMLGvDLJnqTu4ONyg3wtoig2VC9EV+S0PwIVyZiSvdv7ByUvPqPDXjtIHCotW9Mp2ybXA7h3g6IF8QQ5zfz5IoAsmPE0OBeO2tgRwrlyoP/kTgyiX3fpZMwjFR9HDaLWN/3HFFSot1wZAJuCgaKdDVCmdDjMLt/Vw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL1PR11MB5351.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(39850400004)(346002)(366004)(396003)(451199015)(478600001)(26005)(6486002)(6506007)(36756003)(2906002)(83380400001)(52116002)(6666004)(86362001)(5660300002)(38100700002)(38350700002)(2616005)(316002)(186003)(1076003)(6512007)(66476007)(8676002)(54906003)(4326008)(6916009)(41300700001)(66946007)(66556008)(44832011)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6gUCtAITlNgslO19fUU9euR1B219fdtg5L5L9vCs2aft1yBBq22hXns/7nhOgz794+KkHnd29Zif8ssinH6vndYYgakGE/qz/g4MRhJaG+3zdWqfUxemx/ssCMtqNITVkpp8lobrjn9zM0JDAzcZJy5G2IJHqYFA+OfPQQ41j9unQTX2sJimU34/viGinCHZ0n4dTi6NAD1u3Z8bl8Yd+r5DZrztpvDDCWFSCjllJf4A3Y4nJuP9Qc4f6hyU1wCA8qre7oytGTq6WItnqURA03B23wAv1NKLEw+V18LaBjsrwZZ4wX6xuEANVSbdeT8miykyE3oNTYu2RH0i7FaDxQ2fuWaV5PEgN0uGd0xD2aL4FWh8Jp8Sx4rVetKT1FOGO5rRRqaXQcY+OP/o3zdFxv5MrcEoALFLpKBbMuVzBvbLONid1XoLNuR/fhlaMZdERYPeOYTsU1z3SNa9oASIduC2kuZlxng8zxM3I+y6Yq6QplmhVdQDsxeAKelOXokEkA/tyiDqkoNuRmcyzl3apz975t9Mnanv3Z3ZfdXAfu9zd/BbeiIInFwJ+w8yXC1FJSDw60JjnDs/vjoeYdTY395xg+OL/nbA8LOSMwjTUicfp9vRn02sSSJcLMXkqwD5UCm30WlFFTR2lN/sQdPpreAET46LSj+JhkWcRXPqzDil6hCtf8iWN+eN4FNcfUVsn9c59jD6G+J7c7VQ4TswMFW89PrxXY72FYEtqbryKHNtXxiSwunqt73svZtqBdaQ8OoSUPZ4ASvvlxHye9jbnLzfFq6fj1HniwUynkHfEjrRj+rIQEzFQJ426xMKvZYoY0KRoZpZSYqPNxQ5/c1wT/MZudbdOK0d2IkULOVsOJgFqh7lIpbxk6Jk88xOJIy0Oosb7WUNGmMR2xWUc2YKmdZLwqGCTw7Ul8fU0bP52cuglUnDy0Y6gSalMddB6UQKI97SmQK9rdZEkJBldD0tFoTXG30jUEPqD+M3UnncEOijIpdye3gdpx1fNBU+Vkyyp5b4N80FquMyK0cDUXF2FPil0iWOhxuMK/XSE5JzN0vxbezTGacqts7V809gndATrbswljm1CaKmDkJugZ8YzPX3ZFix0PwFOSLQxXZCIU2yJcpSZ0tko0hPDqViXcxj+SerciwB6Pb3kfwSOwkP5NiqWwnsbrjj3ysay5nSp8CdyfOzvra1/ZQhD2lDYjJhIh6lY+LDXrGsAMTHvDzH3y67TRuexw78OuD7RnwPhI5XzcciP2oSDiSR99AM1kMfR/uk6s7u/qcUMKRyQIXa5ip5TNq7oBY9UAZ0wLRQEYpgmYxOvkKd+lDswHefpsaKqXEhFm28sAJs8H8jaHUUaRwmiOf2w3SrHlAM6rsQvCkii+4qIugbqu6MPhJBXaHG4c4vl/W8kOskTbxb3wlAKqhU/Ik45Zkchl3atV3XEK6onMCpP6qzq2fnrcWbU/ektwGkkmJq26YF+6qJUuFzEK6vcoN9RotBzhbNtgU2GPiZdsCZO/eSm8vkg9bRhHfW7Dgcb3e7z31NYeYujQAqXcYVrU1wIgb0cMoi1k4xsadVhsqnwYSwf3C88doVlAYI X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 76e83ba4-a53e-448a-1f6e-08dab8a10611 X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5351.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 04:58:16.2532 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: atr99oLWpXz1S3PHv4JJlSLjt2IWVPl6r29FXgTWcjh2ysSUwtrGulDF7NEE5wjXZacs6+wdXo8h3gQPb1c11w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4632 X-Proofpoint-GUID: hb57DzcHUm7Y14pQJMe9aUfIFCp3KbEe X-Proofpoint-ORIG-GUID: hb57DzcHUm7Y14pQJMe9aUfIFCp3KbEe X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-28_02,2022-10-27_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 adultscore=0 spamscore=0 clxscore=1015 suspectscore=0 lowpriorityscore=0 impostorscore=0 phishscore=0 malwarescore=0 priorityscore=1501 mlxlogscore=419 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2210280030 Received-SPF: pass client-ip=205.220.178.238; envelope-from=prvs=7300ee25fa=bin.meng@windriver.com; helo=mx0b-0064b401.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org When migration fails, QEMU exits with a status code EXIT_FAILURE. Change qtests to use the well-defined macro instead of magic number. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth Reviewed-by: Juan Quintela --- Changes in v6: - new patch: "tests/qtest: Use EXIT_FAILURE instead of magic number" tests/qtest/dbus-vmstate-test.c | 2 +- tests/qtest/migration-test.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qtest/dbus-vmstate-test.c b/tests/qtest/dbus-vmstate-test.c index 74ede651f6..6c990864e3 100644 --- a/tests/qtest/dbus-vmstate-test.c +++ b/tests/qtest/dbus-vmstate-test.c @@ -233,7 +233,7 @@ test_dbus_vmstate(Test *test) test->src_qemu = src_qemu; if (test->migrate_fail) { wait_for_migration_fail(src_qemu, true); - qtest_set_expected_status(dst_qemu, 1); + qtest_set_expected_status(dst_qemu, EXIT_FAILURE); } else { wait_for_migration_complete(src_qemu); } diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index aa1ba179fa..28a06d8170 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -1342,7 +1342,7 @@ static void test_precopy_common(MigrateCommon *args) wait_for_migration_fail(from, allow_active); if (args->result == MIG_TEST_FAIL_DEST_QUIT_ERR) { - qtest_set_expected_status(to, 1); + qtest_set_expected_status(to, EXIT_FAILURE); } } else { if (args->iterations) { @@ -1738,7 +1738,7 @@ static void do_test_validate_uuid(MigrateStart *args, bool should_fail) migrate_qmp(from, uri, "{}"); if (should_fail) { - qtest_set_expected_status(to, 1); + qtest_set_expected_status(to, EXIT_FAILURE); wait_for_migration_fail(from, true); } else { wait_for_migration_complete(from); From patchwork Fri Oct 28 04:57:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 13023074 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 00D45ECAAA1 for ; Fri, 28 Oct 2022 05:07:14 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooHRs-0003mI-97; Fri, 28 Oct 2022 00:58:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHRo-0003ld-GF for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:24 -0400 Received: from mx0a-0064b401.pphosted.com ([205.220.166.238]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHRm-00027T-P2 for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:24 -0400 Received: from pps.filterd (m0250809.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 29S4wLMp017954; Thu, 27 Oct 2022 21:58:21 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=PPS06212021; bh=RU0NaIOfqT5nuKq/A7791gRn6np2jXF6/QYbNcHmKmI=; b=OOqIaqpWh7pnh78OqE36xSCR/rLIxpQ0dzKHniXzjfwMAqb7NUZXDd4virV4ffeS29YW fmf4COwQlf9zds3PBwUX9XTH+VIYhjz/XSIBAWB8bzVhz7mbBAYczxOX0TQuFYGqwrZQ XQqqYLtyzcvC/b7vKNJuSu+Ofj1T/hz/bTfgONztKd6DeXfXPJRQfxJYIKp3HDw9fs+f 3qjko7b9sgEDu0UKMkyoTXt1k8I63z6Gha5UjVo/XIe+roIXL7ZJFC2dVwsJ+fIfg98c YVYmKGaREV2jcs5dif2qeD7YyB4MszogStRU7OjuEKuMaFURZrgKzrSrmrCe9/mcHbOe 2w== Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2168.outbound.protection.outlook.com [104.47.55.168]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 3kfg3gs4tx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Oct 2022 21:58:21 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eqNk52HwNVYVerLNQk7gdVbeHnYnR/CJmBVyk2ICkvW8vvK6YFe2vNIopVpspztf1FYKFyMOnBfY+PKFS5nfY8Mz0d15KFdLnHAr+kNVgs9hn8U3jLGAV4IXVdA4yQZ8rxoIfTkO81jxnfAKG6Z+A6SGlNK4eqvnpFcfLztA7MiHLRz65L7OBnqyAi6eGRQu5GjfMaJ/g0Xsz2FBR5kizWlQVrFz6R/Lxac0atay3KzFb30LhFp5jYf6KlmJGDg4MY1X6XhgFIrLhGqM1zRC09Iw1ddOEuaWqFrQnaUSLFuMwJ+sk6n6o7FVnTFok7UwXd+fWc2NMa6B7xbpZebKIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RU0NaIOfqT5nuKq/A7791gRn6np2jXF6/QYbNcHmKmI=; b=UMs81Zwrq6McVbPl7VKaQWAz9oimdguvSPYil3uVC3fuMyr+LPiWVvN3YkFZFGkKhhSttBHH+cPNcVhCH9PY6rfhBSl+9lAtTHvCWtZxpgi3dXuaRxKvFo0T1sNBFDovdHkVMIbf0gtI22nLK27FHiTvWjfCgB8k74Iv+lWgjz8PXyWtDV4TVaxlneQwKm9Jbc2lhM3PLRLLBw861ixze044VG4EIgza+TH9aJa8ztFbaU8HqsMtHm72A7lMSu4F+5bUUb0yCoqJ7h8nxl/GW+4Tz3x6JvLeudqkbLuKMXaBcbGmIv2gPK3O5+mxh0UkD0pvcFHnIb8Szu6bC5n3Ug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) by MN2PR11MB4632.namprd11.prod.outlook.com (2603:10b6:208:24f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Fri, 28 Oct 2022 04:58:19 +0000 Received: from BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201]) by BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201%9]) with mapi id 15.20.5746.026; Fri, 28 Oct 2022 04:58:19 +0000 From: Bin Meng To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Laurent Vivier , Paolo Bonzini , Thomas Huth Subject: [PATCH v6 06/11] tests/qtest: libqtest: Introduce qtest_wait_qemu() Date: Fri, 28 Oct 2022 12:57:31 +0800 Message-Id: <20221028045736.679903-7-bin.meng@windriver.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221028045736.679903-1-bin.meng@windriver.com> References: <20221028045736.679903-1-bin.meng@windriver.com> X-ClientProxiedBy: SL2PR04CA0009.apcprd04.prod.outlook.com (2603:1096:100:2d::21) To BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR11MB5351:EE_|MN2PR11MB4632:EE_ X-MS-Office365-Filtering-Correlation-Id: f46d4ae7-1ab3-4e0b-547f-08dab8a107f0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: z3XzQhSMVLU0PxNqbwCHSwap7Cj7RPZf0+DVAZSquKGI29fuo+QZIGwKXPDyRXkxWkFGui4JbY/mu9RdSl0VdprBjE8gl86RJdD1ebrFy3ggHOs/Jkf5SWTMk+F4sD6gRSxYd+JZhOwGHp9m6IoLfJjTktnTbd66jUIi5eY5dDb50pmf557nYfrkIN9Cmvty26zyI8wvwAfRz63a23eQ6q7yusDwDoHsKjyETSxIHMlLYkkIadi67ql/o+63BvLkHs4NAlHXFG+sxE2v+ftlxgcPArB/TrMjunaKdpr6hBbD0p5d+ALX1fAnRLzsoJEFZsjD3ATnNm/EAtYJOe4JYHEHFMXKTL7HOM0jjh/0pKq4Xvp0a82aRvidV8oh94qpOQ36fRA3n123YUU4VWOYc4gMseVuG1tdIuqHFU0jB5GnYWKsGZcBjiPIpV01/qQ6Xu15MmR5TaJ9QajatOIoO6ESxBJc6svSRir4TrohALY6LebZGp1AKOXPRr40E5iEf+BBKXycqd8H033W4QY5yGp5wGG9KG648BI/pDzR5VraFz/tntfznXufE79okSCC1LXXRV8bSXvxoz6XpQoZQm6kdS3x5GrB6QedowR6Lapx1al4PP8LAsWBt15ct0oMLuwtuDH1gdHIAaAiX0FEK6BOCex4TlhSExA3q+4b7BeWq7u02BnxWZtLFl+mzHwIN2kygGoExWlhdwGHz5jOAZ59p8rHAH9lSSElNU4CgUwoo+NCUuDxoRoIxXNur2NHbsWoR1WOFT8qu5Sp1CToXg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL1PR11MB5351.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(39850400004)(346002)(366004)(396003)(451199015)(478600001)(26005)(6486002)(6506007)(36756003)(2906002)(83380400001)(52116002)(6666004)(86362001)(5660300002)(38100700002)(38350700002)(2616005)(316002)(186003)(1076003)(6512007)(66476007)(8676002)(54906003)(4326008)(6916009)(41300700001)(66946007)(66556008)(44832011)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?KjRxoMtJi871VGBijafAslafXuOT?= =?utf-8?q?HTUxyxow5cOn3e9MR4vmrLdOR1/glyvzL09aZ8BNkmqV38U4rN6lM9rWpHUZ6CD5p?= =?utf-8?q?QU/NG8MJcVRxT47ghKPz1s7xog5ipV1xIQS3CrQcyNu9WJDFdh3nx9lFirBb8nKAE?= =?utf-8?q?n9uoK2PkiginrKa4I1PlKBUzcc1koFz2AHol5kuOrrZ+wpHySVBqWScRtr4nbeG8M?= =?utf-8?q?CA5bDGdor9CJev7+q0VnSD73nHRqkwK+hgylURjxrUDkTHuHS4xsv+bNxl7V9o2W+?= =?utf-8?q?aZv2D+3vr0PfTrIomGg0nSs1sgYHKbz5uifw9AF0we3yY0RAfeiuchDWisfIpzGyE?= =?utf-8?q?cVHyl71rES7zYuHdzrKLESkjhzvFEjowjrxGHn3pxwsMTGHdhKlknSxw1KxyZAb0O?= =?utf-8?q?Zd9ACOJ4dQUGEDX9bUh7nvmSs+fnJBslVZ/yBhPh+s2osYQfy4/qL/laPpq3jnzar?= =?utf-8?q?sGAJNLgSopFL+cypnthDO9WHygf1V5AiENWrWaqEtjOraBxHI02560nUpaMD01p4s?= =?utf-8?q?LRF8j7N7Acj+wBIgyUFSKtK+YBgET5dj8+2WyNGI/fC+YZBRaOTVuyoGc4FfzR3wz?= =?utf-8?q?ZBIE3d7nbmGR/GCrYUuoMSkWwmM89HLc4TaU1LpznHYKyWHJrEk3Y1/YZLWv6nLYY?= =?utf-8?q?SNgpXZ9Zy4NmNtF32rJfr6l6gcd32hMe7YjRyicvukeK+VMMjXEdvqcD6BDXrJ/Om?= =?utf-8?q?KFk6q4WWrQvk6EhnweT81/kXPbQo9Y0mxgx08TR3iE1YfDraA75dTUbeMpaJGzdWB?= =?utf-8?q?FNMxPnDvXrqRzxPHFmUcTY/bWvAsEWMfaXI9SAcmZWIw4btYcNbO5hoirorx2AqkB?= =?utf-8?q?F54RpUw5vYsSH1VugWe8I0llyvCYahPwXQRtkK7cUQ4JilzFeWpCzOb0G9/Q3ROcR?= =?utf-8?q?cx9t0AUdxQaTZcVHVmt/E1fgeGEt6xesTQI9hDlTMycD+nSDxGPuNphSg1/XA29lj?= =?utf-8?q?VAbGAjnpARUNdt0C0XMk8TaOZibnvWPwIktym2cRScz04citBZ3VQQ7RI4zdI85c9?= =?utf-8?q?dea9YRnsJQq7TAtzBFKRtOywWQPi124ZNYv3XTYrLZjnB2Ntuf3cT4Nq1EucwQAWq?= =?utf-8?q?axO0K4jan20OynhMHs0vNj9u6OtRhBOsklHmxNLiV1FbS5WGBRTgqQGnjMsNI2Ymh?= =?utf-8?q?CTxj9QB3HzrPK59gsVlWDfRHSuvTdKECP3fYITXXrDtTCRlGtFFdrz+qTMCjJlI76?= =?utf-8?q?6pVKMZ+uh189Lxw8CKSAvVG5Jj+tIlUKuyHxhRPIss/5YCqzSly70kg0n507bUt3j?= =?utf-8?q?dkdTgF6nH/Ob0P9LKh8iiJztRwZfwYk/eEQoHCUDyCYbQqQVQ6TIvyswp+HjIZqpz?= =?utf-8?q?wLlRjT6xgLhCKq/PTvixQYW7SeeA+hIbg0zJtrwDHUO0ano2vldbOACIraEICGuQa?= =?utf-8?q?Nq6J04/weZm4uT69iT/kmjlR+vgM1vpftsLlCWzuPpzUNesHqwG47K61juGO40+CV?= =?utf-8?q?i1YnvXOCb2usDGn4nT7oCLQOHCZ5uV+COGCIKQu1b3zOJD19B/Pj9E6tBZPvMGUNt?= =?utf-8?q?ke/t0uTdMTUz?= X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: f46d4ae7-1ab3-4e0b-547f-08dab8a107f0 X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5351.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 04:58:19.2687 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ajbS8ZFDmxziMHwW/ct3T008TmxOEk+DfoNZEew3d9nzKXlTGjj+Y0fAB1GlueffRWOfmhJO0wTAvQnKNgP/Pg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4632 X-Proofpoint-GUID: O_5-D2W8swr_sfmHHF0oB0Re9rN_RNM8 X-Proofpoint-ORIG-GUID: O_5-D2W8swr_sfmHHF0oB0Re9rN_RNM8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-28_02,2022-10-27_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 suspectscore=0 spamscore=0 bulkscore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=933 mlxscore=0 impostorscore=0 malwarescore=0 priorityscore=1501 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2210280030 Received-SPF: pass client-ip=205.220.166.238; envelope-from=prvs=7300ee25fa=bin.meng@windriver.com; helo=mx0a-0064b401.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Introduce an API for qtest to wait for the QEMU process to terminate. Suggested-by: Marc-André Lureau Signed-off-by: Bin Meng --- Changes in v6: - new patch: "tests/qtest: libqtest: Introduce qtest_wait_qemu()" tests/qtest/libqtest.h | 9 ++++++ tests/qtest/libqtest.c | 63 +++++++++++++++++++++++++----------------- 2 files changed, 47 insertions(+), 25 deletions(-) diff --git a/tests/qtest/libqtest.h b/tests/qtest/libqtest.h index 65c040e504..91a5f7edd9 100644 --- a/tests/qtest/libqtest.h +++ b/tests/qtest/libqtest.h @@ -75,6 +75,15 @@ QTestState *qtest_init_without_qmp_handshake(const char *extra_args); */ QTestState *qtest_init_with_serial(const char *extra_args, int *sock_fd); +/** + * qtest_wait_qemu: + * @s: #QTestState instance to operate on. + * + * Wait for the QEMU process to terminate. It is safe to call this function + * multiple times. + */ +void qtest_wait_qemu(QTestState *s); + /** * qtest_kill_qemu: * @s: #QTestState instance to operate on. diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index d12a604d78..e1e2d39a6e 100644 --- a/tests/qtest/libqtest.c +++ b/tests/qtest/libqtest.c @@ -156,37 +156,14 @@ void qtest_set_expected_status(QTestState *s, int status) s->expected_status = status; } -void qtest_kill_qemu(QTestState *s) +static void qtest_check_status(QTestState *s) { - pid_t pid = s->qemu_pid; -#ifndef _WIN32 - int wstatus; -#else - DWORD ret; -#endif - - /* Skip wait if qtest_probe_child already reaped. */ - if (pid != -1) { -#ifndef _WIN32 - kill(pid, SIGTERM); - TFR(pid = waitpid(s->qemu_pid, &s->wstatus, 0)); - assert(pid == s->qemu_pid); -#else - TerminateProcess((HANDLE)pid, s->expected_status); - ret = WaitForSingleObject((HANDLE)pid, INFINITE); - assert(ret == WAIT_OBJECT_0); - GetExitCodeProcess((HANDLE)pid, &s->exit_code); - CloseHandle((HANDLE)pid); -#endif - s->qemu_pid = -1; - } - /* * Check whether qemu exited with expected exit status; anything else is * fishy and should be logged with as much detail as possible. */ #ifndef _WIN32 - wstatus = s->wstatus; + int wstatus = s->wstatus; if (WIFEXITED(wstatus) && WEXITSTATUS(wstatus) != s->expected_status) { fprintf(stderr, "%s:%d: kill_qemu() tried to terminate QEMU " "process but encountered exit status %d (expected %d)\n", @@ -212,6 +189,42 @@ void qtest_kill_qemu(QTestState *s) #endif } +void qtest_wait_qemu(QTestState *s) +{ +#ifndef _WIN32 + pid_t pid; + + TFR(pid = waitpid(s->qemu_pid, &s->wstatus, 0)); + assert(pid == s->qemu_pid); +#else + DWORD ret; + + ret = WaitForSingleObject((HANDLE)s->qemu_pid, INFINITE); + assert(ret == WAIT_OBJECT_0); + GetExitCodeProcess((HANDLE)s->qemu_pid, &s->exit_code); + CloseHandle((HANDLE)s->qemu_pid); +#endif + + qtest_check_status(s); +} + +void qtest_kill_qemu(QTestState *s) +{ + /* Skip wait if qtest_probe_child() already reaped */ + if (s->qemu_pid != -1) { +#ifndef _WIN32 + kill(s->qemu_pid, SIGTERM); +#else + TerminateProcess((HANDLE)s->qemu_pid, s->expected_status); +#endif + qtest_wait_qemu(s); + s->qemu_pid = -1; + return; + } + + qtest_check_status(s); +} + static void kill_qemu_hook_func(void *s) { qtest_kill_qemu(s); From patchwork Fri Oct 28 04:57:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 13023069 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 53357ECAAA1 for ; Fri, 28 Oct 2022 05:03:31 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooHRu-0003mr-LY; Fri, 28 Oct 2022 00:58:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHRs-0003mJ-2K for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:28 -0400 Received: from mx0a-0064b401.pphosted.com ([205.220.166.238]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHRq-00028b-F7 for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:27 -0400 Received: from pps.filterd (m0250810.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 29S4bMw8021593; Thu, 27 Oct 2022 21:58:25 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=PPS06212021; bh=1WANvbMosBHmDX90xw1DthOFkFTyssGJmD1wJkDbp88=; b=OTrV2yb/z/SiPK7jzasfaEWLz99vICwxvEwa2QnqeKwEEeo537kC8juCTO1iGjdivBi9 PZSqv/SO3sqU+zBwth+j+3ITB4fZUy1D9bnrM/UjFgNHgpHKJaUOKzMTbtZ4z8IHW/J0 7kEsjL/Eg5ptgP5MSy+FGLUizno8WEeVxhFXAQeUKbH6RVpeZ75hrmWupD3lOsyIkm71 XGTBpDf2n6OqUggcHbqqdmnrAfeC17McwZUSsNXB5iX3fz8bwIqJxkyq3BesGl+CUE0e lE6jFYwlkgzfExpKzGZlF5GLHNATIv24F1R8WjxSqjtj5Y4a2W4li/LJeJT3RCGtdiSz KA== Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2175.outbound.protection.outlook.com [104.47.55.175]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 3kfg0r15kv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Oct 2022 21:58:25 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vfc5nuwGh8wSRIFiTpn5c/thGWfqacFYGt+xyM0JSO98VXU/EDe74LfwREKvQQU4PcHy+UdujNaOchoEAebQFx3cKVhkyMptaWG9ZB9ZIp51UpGZTarAzGf5w3BPXjBVNlYMtu6aG+ulb+EPSOYnbvzNrS1jBHeWhenXAdzCOo5QcmPeNSYbWjv9hKoDIJgnb8iioPRm/sAQWahp8Njweq0PgPl9JngPMlTR5ZyVbZ+mg7KGAhtOxXFctOUsDz2gxtFWOjKwyPmNqsjVC44TiSw9zz6h7aA1dETUFnR91dNJCY/plJuQK815RV33O39nxbjouap38fOp9V+juHHUKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1WANvbMosBHmDX90xw1DthOFkFTyssGJmD1wJkDbp88=; b=khZsgajhOq68Zp/fKAHtuq1meIe66HTxDK8rqhvlqCQCe2J48VF11rlgGlPaRg5aiYEdZ1cxyyhwTvevu+YeAK+rAEPHPO2YDEPdi5zZ8iMnxb6954a16WY69uNVntr+9bVwGVQMkc5+g/LqGDw9ux3KcV+/wJN7OY7VtATWP/Jq2nXUYo68+7/z2Veb9Vb4s9yZqlB11hVh3w104qFuXufm5k/PD3JQnOlIKwSjQvRSDxZjOBlDebI76o9VLbMsEjD1Xfa6YyEbn33sIddZrZJnoP7vKq5QZSm+imkR2+2F+AM38I+zjWyP0hyZdTQAZok/e48zqTwxAmmIrd7uPA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) by MN2PR11MB4632.namprd11.prod.outlook.com (2603:10b6:208:24f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Fri, 28 Oct 2022 04:58:23 +0000 Received: from BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201]) by BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201%9]) with mapi id 15.20.5746.026; Fri, 28 Oct 2022 04:58:23 +0000 From: Bin Meng To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Xuzhou Cheng , "Dr. David Alan Gilbert" , Juan Quintela , Laurent Vivier , Paolo Bonzini , Thomas Huth Subject: [PATCH v6 07/11] tests/qtest: migration-test: Make sure QEMU process "to" exited after migration is canceled Date: Fri, 28 Oct 2022 12:57:32 +0800 Message-Id: <20221028045736.679903-8-bin.meng@windriver.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221028045736.679903-1-bin.meng@windriver.com> References: <20221028045736.679903-1-bin.meng@windriver.com> X-ClientProxiedBy: SL2PR04CA0009.apcprd04.prod.outlook.com (2603:1096:100:2d::21) To BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR11MB5351:EE_|MN2PR11MB4632:EE_ X-MS-Office365-Filtering-Correlation-Id: 27390434-0532-4f5a-75f1-08dab8a10a25 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jm03YW5z/tYOPVufIOEtpdeC7esXEfiVz/h+UAnu4AT6Fj7Y3dhYelkS2DwqWq8MlphQY8dEAMn/NsNhk59t5rldUsOa59cWPMlF6q//jd5/4DLJhxtR+viagqXZgDqx2vgPHyBuKRjBkmTyUh3xOM0Ra5BwNZMY590FsTEh/8f9nVgl/Nap8OoNVezWtuStzDjz0da2xuLTVvVpNmNKuVa9GNaOD6YbWd7As8OWEYK3ar8eBXKO62wlqB2ieTNi4iVLypdNUw9MwqDNCjugxyuyclHkeZ8bPX59laXXb08IGs3vJFHlVtftdw0d2TKXuu0L7OtsDLZwDpgbzhGAFvELYxHn1vkKe+zvCAFJKPsUTHqaZC2eqC9lUksuB1u8DyPM6/ZhVybImW7jqTdYW81Og/ZuhU8HYA9S5LC1OwH5gg2in8snPjgo8/744axg/S+C+rqT+OvaWBX0EYj5F/daG3ODUBtOIXA9wScbyHNXNBfeCobIB36rMT6meO5B6732uoa3dN9InB0Grffiank1VqjpeHnmZLpmdoGhWpgFzRA7qKler2NI6FPmcx5LSo4h4KIoKzVlQfyAC1jE5hLGOvnpLzeVwFQaErPK9Z1P3D8ICLwou7bSQo1US698zqNNzBv9k4D5GwGD3XFH/v9uO7pdzm5DXtn3S4d34WbbOqZD30UwdhGhnCQuo/qFfrFM1Fvw+rT8u19LRhC1HZZ5ixrcHqUAYGZKE2Q2uyMD/DJmp8YXpX4gDjFU1xXVdmBrTZmRAYUkrct9Cp/AvA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL1PR11MB5351.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(39850400004)(346002)(366004)(396003)(451199015)(478600001)(26005)(6486002)(6506007)(36756003)(2906002)(83380400001)(52116002)(6666004)(86362001)(5660300002)(38100700002)(38350700002)(2616005)(316002)(186003)(1076003)(6512007)(66476007)(8676002)(54906003)(4326008)(6916009)(41300700001)(4744005)(66946007)(66556008)(44832011)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: d9oge9H2DMfQwwjs364vKdSiGcpkab9Ir0qq98hvwFWeH4MtMpdMBo11cGekCS+B7+xJ5PDV1zqfeHcHwmWRHiPFlGMXaMDIaPyECXnCuGcag9VPDQoIn0x5xnoEr8iFUTQOLWPixdQ++L5VIlISb6EJbFjJzGafkMMoQjXrlh4+YIOTP6gyy6c82G2SdeAyBaisPVP541DQGT7WlfjUwCpSkrxSYExNFCZFzRiyaTu/dv11V+Vh5zA5pm/D3Bkw59cpGWxKDCuXsU6Eio46Y2Q6CWcxN3gSx5cW0udfvMNkWEoROPU4o+WdPicyEUXutsquQ5KFX0Aj8L5qLsMfAyJYrE9QE14T+0H9Sfxfm377Vq8jNRh71WmobCvstUokaGyRnK8GUcpCtiM08xReu1e4btJphgZqfe2m5xD7MsdzPGZipheyC51iZqhQB+D5CvqCq1Zy1Yd7Hl5XMZf52PAZEuPFCekq+4mNrYyGv4x/xQcc04Qa+tXKVlB1tXPEOVP5BgpJ0lW+prxi8bHy7DeUfHD6L0fiN+kp7ENgFgsq2ci3qyuJRVQ8rDB9rsyEeQ3PYIUv82QmSHtTbBZU5ZLhXNnciQXCvAypINJFYOgA53yd0U6ioiGKAQKKRlBH4hNQTrME3pikY5PrvLUQNpqNxAqTs2oE4iblEz+mGJUNChu2pIToKJgCf8TRXnw7AoPxGa6n300BqncuUqLgjtyAksjvzxMXWorQqZPdqMNjEpGlWgTqjXg9pHE3FViWq1Iv5p38k+LIOnjKcSMacBAswlhTfceIIlnnbQkMipyLM7vJJ3mbmOkn88RNgh7o4uEV8W/VVZb25HJ3gulIgZ3bmW5fCUy281QgnkuVFAgpGMAAsCKNTPRquTRrEiJ+5Z6wopWHBK1161ksIfKoTbZTT77dr4x0tarIauKVZItOAX8pOQp+vMCDkkCqWSSCCfK0SCb5WCJ+cBSA+mqYKcOatsKwe1Xt2BPTxo/kjEuI7mtlZwXXifN200fqFsXNKe5pu1Nc+cGAMJBeMBMu63dxFArWU7UwcVTqnyGs56o/yVscXTOzaIXmU2kpAT7dCe0apM5zg4iJ7F3kdL6n9AVmKRfMryrVD+cbcOfr/t7KB9rjcbxDeTfcLdBl03RIDpQ7OLDiVwYUbDIr0CK5AFnrQ9EvNZhcHilvPOyZ/LHUKOR2COHeDJxkXO6ssOB6XjpKSrBfbh7JErdfHrVkjXwxznZ77uv0Nll61qMtwg/OsG87uUhceamXCUB9LrQnaO10oa7/Nk4g8QoO0DoklFTXq8+Xl8n0aM7Cj+wrRL2wrdItPvJs3j5QcF7tjzsbrJmnwcbZTeR+yhcwEqNR0T/sVFECOAZBX7rH0uRWBAp3xcloyqRqIXoUZNxVKsz/VOmvNke+/8e3XgZiY0eoSAobLT8l06YxnfpmeiX6XtCEGE4jRiwG3aQ1dhphHxfanVg8uzPIhGzzIj07Df3LBWHyGKVGVXTxXjvAr3R8S4MW+N/S95yjkDLC4SuHuVA0NGi0mRFUTG1hOX/V99CrN2q5QIw9s/TiQ8l0mpDbZGN+wlmXPIjWa61gP5+VfnIU X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 27390434-0532-4f5a-75f1-08dab8a10a25 X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5351.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 04:58:23.2226 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1umh+7USmEUyaoQvHIG+AEDKdUeLr/9ZQVcFcZhPwhYMhhanbWdw9M5m3WKEUSzl1OBLISi4TSnTGVqLFbMAXw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4632 X-Proofpoint-GUID: MDlB6fLahcLDCt0Go9zOX_kSqNSZpVgm X-Proofpoint-ORIG-GUID: MDlB6fLahcLDCt0Go9zOX_kSqNSZpVgm X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-28_02,2022-10-27_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 suspectscore=0 adultscore=0 malwarescore=0 mlxscore=0 phishscore=0 mlxlogscore=670 impostorscore=0 clxscore=1015 spamscore=0 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2210280030 Received-SPF: pass client-ip=205.220.166.238; envelope-from=prvs=7300ee25fa=bin.meng@windriver.com; helo=mx0a-0064b401.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Xuzhou Cheng Make sure QEMU process "to" exited before launching another target for migration in the test_multifd_tcp_cancel case. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng Reviewed-by: Juan Quintela --- Changes in v6: - change to use qtest_wait_qemu() API Changes in v3: - Add a usleep(1) in the busy wait loop Changes in v2: - Change to a busy wait after migration is canceled tests/qtest/migration-test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 28a06d8170..d2eb107f0c 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -2141,6 +2141,10 @@ static void test_multifd_tcp_cancel(void) migrate_cancel(from); + /* Make sure QEMU process "to" exited */ + qtest_set_expected_status(to, EXIT_FAILURE); + qtest_wait_qemu(to); + args = (MigrateStart){ .only_target = true, }; From patchwork Fri Oct 28 04:57:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 13023072 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 74EFCECAAA1 for ; Fri, 28 Oct 2022 05:05:12 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooHRw-0003nT-Ht; Fri, 28 Oct 2022 00:58:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHRu-0003mp-GX for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:30 -0400 Received: from mx0a-0064b401.pphosted.com ([205.220.166.238]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHRs-00028l-Rz for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:30 -0400 Received: from pps.filterd (m0250810.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 29S4bMw9021593; Thu, 27 Oct 2022 21:58:27 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=PPS06212021; bh=Zrnkbyv3OWCddJ7JS8KEsxHIe9iT1VFezo0N+P9yM2E=; b=Z7ARBbDv9/sVcGyFnDMRO0gnz1tPvI1ckFtnYXwcu+YmcvEX1+JdLbA2sjhu7evwayKa LqeI83zg3c2YLJ9Tv8ceocafN6YIuBAw97WlgQLA0eYBGLasPnYYInID+6xJoyfD4zGD Zt5kvtelq8CUomOYIq+hYEup62A+wryf2UViVWWEmSEsi7gL22D2WUjTFmFHmvOvHC+e KoyBzlskEYdwnVBuCBUgfz5yLl00LbHuthEY1uBwSsk9NrwovjPrG7fsqDe89dVhFott /3n2yDIrA2wSFYC16DO4EV9Cb2k9ubTCig4FpADzrG5vqII7fdvUdCf1E6Ot6kkhyhH2 NQ== Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2177.outbound.protection.outlook.com [104.47.55.177]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 3kfg0r15kw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Oct 2022 21:58:27 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mgQS2/btlIGWxOuyY9A5A5CXv8UE+ZfQATYv2Snu29qw5nC/AL0C+NgPjPbDtibQA8Fo+6fMAab1nG3NsFP8p4ipBDuh/SL8vne4Uh3PSDyTIkKND0NG8Gn7XVkc1jpCiHi9YAy/njTvtRB2X9gxvjsUceUYlRzdzF5YLGNBlib4+LjtQd62J9jpNrp+IYz1Wz1qDkOTgN97JhyobKEcdY0gTt+qOynw9cm17DfAGy2liFNJnSErHErEneYM2gtrySxQsUQAHzfmwMVCHHvmGNdtgBH+uBzkPI4x1S6oc1CMY3fwbd5wn/69Wbzx9bEsaZp8rzER3gSEeIWz8IngVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Zrnkbyv3OWCddJ7JS8KEsxHIe9iT1VFezo0N+P9yM2E=; b=Oa+IFCGLIqHR7MDpZFNOHX1mdq7r+ogDO762mrDUwn6Rr+8OomJqlXBbkkjl3FHv6ptIAo3IrG5HnsEPqw6z6uSI1HF+qsgG+++EJmW0FleCQbLTn0e3aycHBmDn2okrFMXmWOoqXLOB4McfRiz+YHzYZUxVYnj7+9uHq/xoeu4MP75AKVEcCwIKoDYP44udhnBiQVYjDM9/HEJ4K28mWwBofb25Sd7IcbosDn4/PP8l5yc77+fN/qXP0IWzKTDnLo36vzQeGIgfg3N2rYwmAa0MA9Wr5DS9HsiHfudfoebvTJbV+vIYg+FKxnkfLxOTaAwgYevL58X5lakHvvJ0MA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) by MN2PR11MB4632.namprd11.prod.outlook.com (2603:10b6:208:24f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Fri, 28 Oct 2022 04:58:26 +0000 Received: from BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201]) by BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201%9]) with mapi id 15.20.5746.026; Fri, 28 Oct 2022 04:58:26 +0000 From: Bin Meng To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Laurent Vivier , Paolo Bonzini , Thomas Huth Subject: [PATCH v6 08/11] tests/qtest: libqos: Do not build virtio-9p unconditionally Date: Fri, 28 Oct 2022 12:57:33 +0800 Message-Id: <20221028045736.679903-9-bin.meng@windriver.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221028045736.679903-1-bin.meng@windriver.com> References: <20221028045736.679903-1-bin.meng@windriver.com> X-ClientProxiedBy: SL2PR04CA0009.apcprd04.prod.outlook.com (2603:1096:100:2d::21) To BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR11MB5351:EE_|MN2PR11MB4632:EE_ X-MS-Office365-Filtering-Correlation-Id: 39a5cd0a-7269-466c-29f8-08dab8a10bf4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6YqBKwhohr9pUSTndyx9nmsP9+3LGdCmbrs8z7mqUmpoljXVCtx+eXyt5ROSN5rxKGQZEXGhOTVcc+ljECQ0cOZiP8CDWKnAohk427yv2DJq77zeeOz2sZIha/o1WSmCwO0RuQ96WuM1XeKJyzTN8a+MYkGeqq3R1spP/IUPFQL0iE7NuFK2s8kXqrnqCbBFn7ZGLQ1asU1izXNfQg7Bt67p/fshNfS6KU9tM6KTpIrbnQCYywQXDTl6CxIjloeSnkVn0wzfIMjNJYNTZo2pBMJZYualbxxOrlQqPS1Qb3Rc/12cDG8kCN8yuJH20i7aqG136BKfarSHt03eXngtGCL+3vjezD9kgE51FZAAmKOV8mWj5mjnu4AM6Lc5U0mrJUAbbOtDbU4yVAzjQucAexPtjahhlt4gJIgwVGxLZT5IhAHSat3pfw+N7dNm9FIWhO60Q49y/VIfMzM70Zx/G99RNmLLc1QG5O0TZ2iIs2yyqlZQa2FzHe5rYM9sg33UBiYt1dFhT4O13WlBeHtSaCrJbr+cy5G0da3Kbm8CHPQbq6GME2j1nWXSN4uJ4n9mLjYJnTEOXUQwW8eERscajDc+yRsYv+Pr9xMCq2NMAAxO7d/QSienAvC7njt7aL6NuOI9WM15V+pzAEqlEBtCFXqQ8iheehk5cDrIcdzJ4WH/wagm4NmHmNPA7i8YXMvVOPXN2zphwvX630N3WveG3izm/A32yIL+DjlDNxNN4s375TZaG1lBYTh/w24b5hUTWfz5mxr5WGXADPFUA83/pg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL1PR11MB5351.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(39850400004)(346002)(366004)(396003)(451199015)(478600001)(26005)(6486002)(6506007)(36756003)(2906002)(83380400001)(52116002)(6666004)(86362001)(5660300002)(38100700002)(38350700002)(2616005)(316002)(186003)(1076003)(6512007)(66476007)(8676002)(54906003)(4326008)(6916009)(41300700001)(66946007)(66556008)(44832011)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HS6Ri+vRPBzHpFFb6YdwkTAwDHP+4hrwqrTITxaMFvdMwliFWoq3x6n6MU59JTRsiyVuZyUh7U0ABTmzP25sEyQz5mQn2TyDQjDWHKZAT3h2v5XpE51mT7HvDksnERRk6t8cvMibxhbbmmetzB4YYK8OD+ZZNBqRwhS87/tFdbqb2VTCfCSj5eqq0uBkHszYM0OQ/rjGexrI2E/Odrh7Q2l9+EU4SFbU8Ox/M94voVloHrGuhSqN4Q9uoXK51WwHYw0ATGc8U8UyoaM2lXVUeJwrurPdaT45cldf7HNsKJAwM537Aq2AiRlJPIuZTtAlJeZFu9hZLQnRb9UiISWpjVz7o+H5WD1YYUV8HlWGinhGyv/Ap0bTsYhdnpdFWJZa3umzeh8jrFA11TEcn5cMyDMhBN/8H0DHlsvbxh8Jr89daVPcJj6sekle9SeLgthOZB0l1QzTDQqujtpBJQ86qxDmm9rSy6gqsVEkGV94QAQHIRESBYuV1R2idf7UP8ioCGNuhd7Esc38/rp6PY2XeA18djWJ3d83DyOq9KsMcEeKSiwsY6OBSqSJmY6m0kpdyHY1q+82TPzf5rwD6RSSyB4peh6MRl5JrbyYwwBKwodtdO9+2ymYMYggFrm4VcoDUWCTkH87zkipi+dRGnaJK16csinVppSeT8XsOTbYvInp4t2lKO8Smlv9Fr4hTWVZC24bHBpH6BIOeTITrCajV1Q6DMm62gdF+O0kNaoz34DVQEi0nDRaUFVUB2UQnrSWewZ2khiQKMw87oODAl5WmX2he8ewto+yalS4MTbfj/w5Jnph9rBWldgf8KzIT5m4HG8lAxDKBrO6mn+hcv8IRUzBjkpT+ovYCywvIjuz9Em2LTwzCJ6EQbrkDs8QkMAzQfZN4J7M2oDnYKcjsusipT/4BEU8EsNoC6b2didhkd5hnYdB1bwYjFBMSTvb4V21vacXM11yU+hHrntazpPSX5C/mO7bCePljUb5javFiAFl+P9Es/MXX4zkxWRetnL9xN0ROMYiNEydB+SKseI5ewuPn873v+cQI2THk3v0RLTahmyUKTeN1tKCoTruMT9sMV9ddHPZ+t1pn79rAAJPZXnHYx+hdwW+XxscMJEOjkrFBmKFxYci3nC1z7+P4KkSOzWm5YsEtLB0DDQy8aaNg0wcIOCR7zP3fcgfwISYeOTJBBKYgRsQWCyWrmPj0szsXtwGJHUWOm2TH8W5Df4jhmSXQBpE9c2pqjmDXMyUfR/4uxHKZm57n91F0AuD3JCE+Tc9oPR4FptPjen2N+WonGn79gm8fCl3jVU2ye96xc5/7qUKnIHpHiTI+T6RDxR62G46EUS2hfl5XVQUIebZ2QCe9u/lkh+MieuclxQGlh8uvWiOIEGQfysVc1vobmhEFSNwkK6u93kDq9ZF6AcshNgvH2z4x4jcL1d9gVYJqXD6IMnDPGTdNgFKefM2vWarOcDE6q4zuShiOzPeABa2WzuNcyDhC5FtWz7qUxWfkYKZh7E1RxJ5sWLIzhMc5R5JU+JKt0dheAaXojllWlovlswqWGLUv/kXSAjoh4ZZvjM/xw5qTSFaBi8QelusKpB8 X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 39a5cd0a-7269-466c-29f8-08dab8a10bf4 X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5351.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 04:58:26.2234 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qmgfQAPwEqL0gD3jzsa2ilcI0u7gnVJPJinL2/XdvwycpnuZiAL1H4O0/3Bqsk/fM25MpbOM647BpZyaAjyQHw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4632 X-Proofpoint-GUID: BdesoCrorj5q3RB5kqquYw3BjIk0A9-U X-Proofpoint-ORIG-GUID: BdesoCrorj5q3RB5kqquYw3BjIk0A9-U X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-28_02,2022-10-27_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 suspectscore=0 adultscore=0 malwarescore=0 mlxscore=0 phishscore=0 mlxlogscore=762 impostorscore=0 clxscore=1015 spamscore=0 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2210280030 Received-SPF: pass client-ip=205.220.166.238; envelope-from=prvs=7300ee25fa=bin.meng@windriver.com; helo=mx0a-0064b401.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org At present the virtio-9p related codes are built into libqos unconditionally. Change to build them conditionally by testing the 'virtfs' config option. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth --- Changes in v6: - new patch: "test/qtest/libqos: meson.build: Do not build virtio-9p unconditionally" tests/qtest/libqos/meson.build | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/qtest/libqos/meson.build b/tests/qtest/libqos/meson.build index 113c80b4e4..32f028872c 100644 --- a/tests/qtest/libqos/meson.build +++ b/tests/qtest/libqos/meson.build @@ -33,8 +33,6 @@ libqos_srcs = files( 'sdhci.c', 'tpci200.c', 'virtio.c', - 'virtio-9p.c', - 'virtio-9p-client.c', 'virtio-balloon.c', 'virtio-blk.c', 'vhost-user-blk.c', @@ -62,6 +60,10 @@ libqos_srcs = files( 'x86_64_pc-machine.c', ) +if have_virtfs + libqos_srcs += files('virtio-9p.c', 'virtio-9p-client.c') +endif + libqos = static_library('qos', libqos_srcs + genh, name_suffix: 'fa', build_by_default: false) From patchwork Fri Oct 28 04:57:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 13023073 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 133A6C38A02 for ; Fri, 28 Oct 2022 05:06:23 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooHS0-0003o2-52; Fri, 28 Oct 2022 00:58:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHRy-0003nf-5e for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:34 -0400 Received: from mx0a-0064b401.pphosted.com ([205.220.166.238]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHRw-000295-BL for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:33 -0400 Received: from pps.filterd (m0250809.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 29S4wVwv018028; Thu, 27 Oct 2022 21:58:31 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=PPS06212021; bh=pupwfqANM6SYjHJ+RxVx1vpyVHI+kjVmJpVUPBItn4I=; b=JXN8EqfMQzd5A3kX3TQi5hl4xkEudAWvMl1RHTZxde7K4xur6uzNCGwhQG79Kvi0yvKq b3+0P7cdhLZFXJR+GbVbrZXlErWWsO10U5Ln37tQ7RZHuujcpxbK28o5WyMNINpe+28H b35u0gx2ZemRCPKyDePN26qTXQkt2fp81q0dH9Cwj3DTndtX4140qQwadneHt+eIsXuB 0S3sMYr5xKirc9GNqDQ3zn4uWFrdeH5lOWvCHKkf6i57EqsvdNiWXWP7r/acWBv85t1b u0HUNo9e9YQ403CHRI2EjL9lS34J0/YbDT9pD4leWq/Wr8EVAUhHYQ2MvdBeasNMiIH6 Vg== Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2171.outbound.protection.outlook.com [104.47.55.171]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 3kfg3gs4ty-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Oct 2022 21:58:31 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iD/w7C+TUeYJM17UTzZhdNl6WNFXWw2jksO15Bprm7r8Q1WEVZmemPpvXEfzon+SDMWXifOfUeVk/OfcnEYeWNg+R00hwC2Y+uuN4WF7ytaV8iA1lM/Azj0Nba1xybGvxP0ABqBzMscukSrqc1QkaealLNnKIsNT8HLPNGMjGo/DR64axI+wxUpqgK5oGexUHA5QajJAHgGgtRKEsxZ9rbWUsF7mKiWNMFZswi1RyVtFdShlW2gzVLq5t+pm2boow/KfWELBbYQz2nqUCn+P2KKQQHiULbz8LqPBOjcCyepIkshQTQkXQMFrE8GZHI5kRmHsyVo+iNIgbH9A3qDS2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pupwfqANM6SYjHJ+RxVx1vpyVHI+kjVmJpVUPBItn4I=; b=SVASMpZ4oYX16qZKXczVTPtBIH1ZKWkzIjhbFLkLf7i4IAnhryhYXLfN4VJ1d8h+Q66MFb2dRGpY0jJFsptoUkxAlAsgzZDa6mM/57ib5aXmBsUYCxBiFdnuvp78taOXCN6CzqnjMoSfy6tPByWsKmgUf1aSPSWhIlWN24qgnjIxroVKgO+PjlBVIhKckjlVuscHuC1qUBoB/S03hudrJY69jshFUUW/zLbl94BS2OzHMNluGF3rDbniuFGpGnmGW6amiH7Hi45gtQNho/4trynK4hkk9jz1GW74LE0n+DRaasIt88F9krNGrzsfw8/jUtrNVSqQncTzu7FQc1qCDg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) by MN2PR11MB4632.namprd11.prod.outlook.com (2603:10b6:208:24f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Fri, 28 Oct 2022 04:58:29 +0000 Received: from BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201]) by BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201%9]) with mapi id 15.20.5746.026; Fri, 28 Oct 2022 04:58:29 +0000 From: Bin Meng To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Laurent Vivier , Paolo Bonzini , Thomas Huth Subject: [PATCH v6 09/11] tests/qtest: libqtest: Correct the timeout unit of blocking receive calls for win32 Date: Fri, 28 Oct 2022 12:57:34 +0800 Message-Id: <20221028045736.679903-10-bin.meng@windriver.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221028045736.679903-1-bin.meng@windriver.com> References: <20221028045736.679903-1-bin.meng@windriver.com> X-ClientProxiedBy: SL2PR04CA0009.apcprd04.prod.outlook.com (2603:1096:100:2d::21) To BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR11MB5351:EE_|MN2PR11MB4632:EE_ X-MS-Office365-Filtering-Correlation-Id: 9bc926f4-1e5f-4b4c-1b67-08dab8a10df0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZzxpbHVuvG2baJRc1xwmGWYZY/749d1+4cuBQylEZYS3M5kp3jRUGGGaSN/agOMo7csF31SL0ohdNYWgZpCnu9fKDGh2iXyJ+YUnv5BAm2qrAzP/hxg2c8mjndHQ5qclXYT/4zfz7DD9FjCNoSLDQWFHljF0AnY9Y1nsjRKAU6TFo3P/y1EbbPXw2RRofcM07fR390TkJb3r4aObz3Ep0gNE5Qs/uWDYTsewKKlTirJXhIU1T5jMmI4czHt7+0CMvTVnq8fI+2XdbnojbJ4rPOPHEpdTmY1qcV64sI/AcjhjTXDu3zsuQi75TT9SEIcHQye2IDFtHsZLjcM1oDU0YF2ClGX/mjFKe1+dLfOFgcB5XAWHvTTGRkYIBOz9gclRE5hyy5qJlPPXiFxO6KA1ETLig+KxqdRxfGlLOsz2BWMX7yYoFhCq2dzwMvke9iWttMQ+JAamyfyEz3j+FzCV5J7DPXukxnuWikjGYFIuNRF1DK+7GROEWfZl7ShN+C6MyMCd50UJzaocyUIdQ1EWtcgx0KAtzthpplFTnhKM+sFu6EYty7VdcvCiWviYGvWq2Yr53FDnUJWTzkN4VGRBnlU3ziPfjc12vJsuvecDuqR6+x2rGjvcUcwhsDTAXEs4D+PgHEhHQ192SbXFLyKt6XXzmTu5UZ9LLLHjTwx1OlIynVvq3sV7FM+pSXcRC1he1zZCko4uvvRpc0ca86P1G+J1ICfQzOusNu238nXqS+9AhgglHoaIec+StBrheK5hw4KVzDiBKCbQN1FORnPTKA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL1PR11MB5351.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(39850400004)(346002)(366004)(396003)(451199015)(478600001)(26005)(6486002)(6506007)(36756003)(2906002)(83380400001)(52116002)(6666004)(86362001)(5660300002)(38100700002)(38350700002)(2616005)(316002)(186003)(1076003)(6512007)(66476007)(8676002)(54906003)(4326008)(6916009)(41300700001)(66946007)(66556008)(44832011)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?2IeMCefFr6tUdqrveSYArn7W0XCp?= =?utf-8?q?CM0O5iF1bGTOqBDz2OFjwGiWjVW0V64snzd0mLQ+WgtJhBBC8TI8sd7osNjuowWKQ?= =?utf-8?q?6DwN9+4JtkUJ/9lVdmHoQK+4xGtj1iN3sSC5Njs/R5S7F6MOcCRtBr9658WjVn5tO?= =?utf-8?q?I1g83qvgQKXWfICkoAvTgLyXKe9ns6rnX+ebC2tfqaSC1qp6ifRfLVw1jKv5z4kgV?= =?utf-8?q?o8AqWzPR72JUG3aPa4nY4PPeB0XXxZ6koBuwne7T1JlMmnOuhZUV8xlhuCdXZVnbZ?= =?utf-8?q?FoK1pTwoPkG4mN1QNbLylkiKBiJA40j0XslmvvK91b3+JOAv5tRN+Oa0YHbSJhw3a?= =?utf-8?q?kyZ/Ula9br2fhoD2bqVAoVVVQ7Rkl2YaynTgETA4KivsC34Qrccat2HUPw7eSWIu4?= =?utf-8?q?LE93NfbNydrrA10zkVU/Fz0tiPEWVyzlUPJRYJEtxzQa8FMmcI96okgR4P+FX+940?= =?utf-8?q?+Y5lLuAO9LsBV4DOC71nqbSeBuYoXu5hKzp9s+xAPuidOv5G24mTHbVjvW78X23r7?= =?utf-8?q?cz5RLsHJ/b/Fx/8ffgpAjTOgRtr5yiIe6LqiV9Ratue5naUsUHRmL7uVXSVcvDQUB?= =?utf-8?q?6CX8K0a02qc5QkeSy+z78yBSJzCYmQsJAuOPFPZtthupMzpBSnZ51burWh3diL8id?= =?utf-8?q?d5TcA4PZgmfG7kq+KO7j2Sq/MuxQtezMe7wWLh5ZEi2YiEN4yG204FXllPZs0I8k2?= =?utf-8?q?OLPXXwefcUSXqJOp0FRxFl+YbaOZhaOCcl4lVQxvyszeLJFXj9RTiZtj0oc7vWZPA?= =?utf-8?q?KlBZsU2QzEUfMjjypOSVk9GVGfGFi4mjCQtC6XM7w+KexdwgFtG5JWpNE2S5H6Ql3?= =?utf-8?q?OS4BkVohArwV5QZQLIuIMDpN2dsHB4G/RXTs4K5n9xdq2GMb1vUHyhN3+y52A46GU?= =?utf-8?q?rV1kLnqybPMnX8L0nxfJugGInbFIsOJrJKAsu5C6hKmTMapQesuXseD4yO/t1AUBH?= =?utf-8?q?+7027j8/nM4PGltLUnWGc/3n3MNcTC8vjNwpoG2b/GToh1CQ/n7xhTLxZplRqb1zc?= =?utf-8?q?Pg0xeEoMInpiCqfmkeAjhf7J2eUsBEub0IlxZrL0nFJZZxcIp1UMih834hs3COavz?= =?utf-8?q?yU13FL8fN29xfATvB35XQSwSYLRALMnmucBBU5e0Bwl+F0mJI6IS+AfkqD/4SP1Jh?= =?utf-8?q?0YqQvcLkw1lkQPNqPRW4HCLRtgDKqJ4L/igJHB08UJgTLCYwh0G9ciF4L8SC6uh6z?= =?utf-8?q?CZbCIKCO7zVGo7iXes+p8wRECx/J10rHNRP/nv6Q0R+dc82HluouvpAbPPsBaj7kc?= =?utf-8?q?7lc9/PGe++owViGloCkock/YE7pK7xwYsLIc9oYqdyBkYXktR1pDTXju2+sDpzkwp?= =?utf-8?q?6lrgyuL2/YJsa3/MGLMgZtTOxxF7gx45wTiyTyLZLGI76PWFE9bN2EijikVB62S/Q?= =?utf-8?q?16kONBiM3e0fNL52JunEhP0VobyH1Yy6zJphxQDEtCsobSmDLCJNYBjRBBQXam5wh?= =?utf-8?q?MC2rvOnmrbthpsaYc95MCEfnPeGy7i/GgxgX8/jogLvA04Mpz8UmlxQGBe6myHlhL?= =?utf-8?q?/9PEuLZOBFjD?= X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9bc926f4-1e5f-4b4c-1b67-08dab8a10df0 X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5351.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 04:58:29.1774 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: nkfrn8S+5EY8dQqkh/ynNaOyM4PGW0hbAy91a50RpQrB3ZXHLy7KagL/B/z/9ZB0iZ8P7SfYmQdrsAjD5Ypq0g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4632 X-Proofpoint-GUID: 23ABmq3cRudYVfdxBp8YTpqCif35qgsU X-Proofpoint-ORIG-GUID: 23ABmq3cRudYVfdxBp8YTpqCif35qgsU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-28_02,2022-10-27_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 suspectscore=0 spamscore=0 bulkscore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 mlxscore=0 impostorscore=0 malwarescore=0 priorityscore=1501 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2210280030 Received-SPF: pass client-ip=205.220.166.238; envelope-from=prvs=7300ee25fa=bin.meng@windriver.com; helo=mx0a-0064b401.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Some qtest cases don't get response from the QEMU executable under test in time on Windows. It turns out that the socket receive call got timeout before it receive the complete response. The timeout value is supposed to be set to 50 seconds via the setsockopt() call, but there is a difference among platforms. The timeout unit of blocking receive calls is measured in seconds on non-Windows platforms but milliseconds on Windows. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau --- (no changes since v1) tests/qtest/libqtest.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index e1e2d39a6e..2fbc3b88f3 100644 --- a/tests/qtest/libqtest.c +++ b/tests/qtest/libqtest.c @@ -36,13 +36,14 @@ #include "qapi/qmp/qstring.h" #define MAX_IRQ 256 -#define SOCKET_TIMEOUT 50 #ifndef _WIN32 +# define SOCKET_TIMEOUT 50 # define CMD_EXEC "exec " # define DEV_STDERR "/dev/fd/2" # define DEV_NULL "/dev/null" #else +# define SOCKET_TIMEOUT 50000 # define CMD_EXEC "" # define DEV_STDERR "2" # define DEV_NULL "nul" @@ -106,8 +107,16 @@ static int socket_accept(int sock) struct sockaddr_un addr; socklen_t addrlen; int ret; + /* + * timeout unit of blocking receive calls is different among platfoms. + * It's in seconds on non-Windows platforms but milliseconds on Windows. + */ +#ifndef _WIN32 struct timeval timeout = { .tv_sec = SOCKET_TIMEOUT, .tv_usec = 0 }; +#else + DWORD timeout = SOCKET_TIMEOUT; +#endif if (setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, (void *)&timeout, sizeof(timeout))) { From patchwork Fri Oct 28 04:57:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 13023067 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 1D7ACECAAA1 for ; Fri, 28 Oct 2022 05:02:42 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooHS4-0003op-O4; Fri, 28 Oct 2022 00:58:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHS2-0003oP-6V for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:38 -0400 Received: from mx0b-0064b401.pphosted.com ([205.220.178.238]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHRz-00029F-89 for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:37 -0400 Received: from pps.filterd (m0250811.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 29S4wYlv031901; Fri, 28 Oct 2022 04:58:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=PPS06212021; bh=IE2+Kskl72A7NBUYFPuy73OT6go3GGDQv97QEBEsIXs=; b=E6qBlPQQkElJlrw3wdtP5fA1RoDzYADHveSR7cv3MLASezNnmXzNS90kVkP0NqFVW2yl z9Odjhp6Ha6ldcvqTGlmDy1j0Y4PN4CXD3pNTDLdCzPK2RDSbRxZuDUvT/zZM/SC7vXO 2/dFDCjmJrhtAWkq+qwrfgmqETTLoGPbXtjRU/B7bpoTOFekjks+Lzs3wHA3dx+IT84X A5nh0KBDFms7d9BmlrWpEZd1F6PWafJWQFNwgZ7as9pzlgZPBsvgDcPIqL/MWWbJXyEf +D81hu5XXYHoG06meAgJ283W0+JHJE+1iqp3j7anXW8OfC7IjlS0tkbpI4SaFydeOs9J 4g== Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2169.outbound.protection.outlook.com [104.47.55.169]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 3kfg3xh310-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Oct 2022 04:58:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BZ/kyHhZeYSU34dhJ9ygudQAnP2f1mwMZYMGJaGSIr9yxIe4I2ePwcvUF+p9T9KVzi0cTEgcrwW8qexOzLFIXgZEWKdZiJ5hXEgxi/12JsrzbnrbaZw7ixlb5hSxpUKPcHG4vklC6ZxMyNj4SVB+OnPjW4hmbFOc3NUPt4pS0mYHtVQ6ycHtzAS51WkHRxLpuLyGdoPWUu+ETtiNxC68bkEhC2yrpfusal3wWaU0t5LYgfLPczqiGLMSsyk5Lf8/2ULtuJbWosfMgeeIslHwmF1tdiChQjWW/8m6LshABJb5pGBpI81jewGClbOwT+qu7hJxzGovfUi0OzO1JyPlhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IE2+Kskl72A7NBUYFPuy73OT6go3GGDQv97QEBEsIXs=; b=ErG168AeI4qvjQG6C9zjqcshZagqw+Pad+MOpoFkXGKuiUMiAqBjHQRt+lnWcvRt3KyOYN6TPvB/cVggRraecoQopfoGIcqS7PHLLVodiIwS8JR3EhmoNlczqnx9fev9qZIxK55mpLLWUVSpwW+RxNqJ5fS3WyDEPd4QOgUH4D2z4QpFg0m7THQAdsu1VgLZydTc31LmjkwAqdvvBpdv3zq9V1Pwfd+hNOA+G/J4FbzrmQ9VTPGBZJpAhhAgx1Fey9avzKBOWA7G25uWvrn8ASVQKckwtywchDrAsZL3vmIM9Ochs0TkN+yQKf3JVa5OQxnZn1pu5XwS1ZkUGwtCgA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) by MN2PR11MB4632.namprd11.prod.outlook.com (2603:10b6:208:24f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Fri, 28 Oct 2022 04:58:32 +0000 Received: from BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201]) by BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201%9]) with mapi id 15.20.5746.026; Fri, 28 Oct 2022 04:58:32 +0000 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 , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta Subject: [PATCH v6 10/11] .gitlab-ci.d/windows.yml: Increase the timeout to 90 minutes Date: Fri, 28 Oct 2022 12:57:35 +0800 Message-Id: <20221028045736.679903-11-bin.meng@windriver.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221028045736.679903-1-bin.meng@windriver.com> References: <20221028045736.679903-1-bin.meng@windriver.com> X-ClientProxiedBy: SL2PR04CA0009.apcprd04.prod.outlook.com (2603:1096:100:2d::21) To BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR11MB5351:EE_|MN2PR11MB4632:EE_ X-MS-Office365-Filtering-Correlation-Id: 5cd20d82-729e-4b9c-4cd9-08dab8a10fd6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5GSUpr18mNcjcgNm4xMkF/6ZhCFhgyz+zezNn7Ax3lyjV4tIwnnh/ZEAv+/19zMch/R2B6xmjnean4IoehUwgvBFG/oTx8Dsn3DL8nI3kJRbbX2bgofBlcMVqgVeoEQSUQmaBMqcESgpA8iCpfDmwg7IRvjn5f6F1+LjdUlGcSutoERF5CuqY6g02z85qJFzFukwV0ZTBe1+ceHjyybf1mEPRprxXIeEkt6iRenLlaZZfdRxtWoX0LXpwQT4GWXFoO4aJUFlkvUFiP6yxg/JwKotlet2nOS4MOFIcqO4S2RIQcvHvZeCGwWlkl3xPteMM2192dbQP38CLSJvY4iCRMS/0LGOCSEofDcD9st23If7HdubjA3IpQISIRjfNilh3FyQ74NGDGP91ckQjF5TAo9UJTXhA1Z3V7QOUZ7IiiKt6HTwGxX5PKszUrSl7J4G7d8Hdtn6KZW8Rep5JKlkg2ejELyTapIvjXiecWJU+RiOUw7YMW5/j3XV0JOjWbj13rve4rtY8f8BcAAQX4iy4djXZeWat1SM5e3JW8Zs4HsDn4YWR6HNIiN7Ai43AuAmNrnBsk+DHGS1vI/qzVcer5kOPdeg0dhYfcNI0PyevSfzZZM4L9OiX+kBqPioDpbf/FQ9duW9Kxgqs+nxRiK3seatzi1i83aia7gXE6mWzARViYYvDGywoyMCfw7r3LSgJL3IapwZEA4qkrYGGhEIF80bcKVjpMOvtg3tTZj3FNhznegqW/uLSLtLg0b5VG5WGEBXBpchPp7Ofj3rWzfIUw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL1PR11MB5351.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(39850400004)(346002)(366004)(396003)(451199015)(478600001)(26005)(6486002)(6506007)(36756003)(2906002)(83380400001)(52116002)(86362001)(5660300002)(38100700002)(38350700002)(2616005)(316002)(186003)(1076003)(6512007)(66476007)(8676002)(54906003)(4326008)(6916009)(41300700001)(66946007)(66556008)(44832011)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5cupVAsokwEfHDs6LJmmsV7Mp34tRTUVzt3f9J2kGE2T4X9GjF/zF+YfCU/oSpXo4Acd81mYKZZYKvt2U7Co8FxqsWyy6ChRpo1KIZS/qkptj7QvCm1RDeAola706vb/P0LhkhEqWwswUGydg8S8BvUzhqz07YTrTrs2AwEdzkXvoQFeW1kBFFIjV2ed+ToiZrwvYeqZQmXNj9eCXtd3lWreiur1eP239I4XCuq2eOgD6PkbnxRxV7bNwCuX1Qr5dL1T0+ktv+vyATjmbFCk48Q1TjLMLTHyzmWHEzuQ6ESawoLLcGLoS5kvDo9HnjaSy+7G4YcoD5YI3m189Z+wHg4tVZ+zrPpj6yIflTq1lQzbBpmkEKe7D0S92wuDJhZLv2783F2Y+XFXwSzTVF2O1pKLalholvy40BB2AMIrO4aoKvR/FRsnIzKF3DFG/Nt/3b+TmFcX4nH9Qd3gp+pR6GNDdW8jI9//TY2Iolk3UjHNtOa5y3bjTUVI6J6XWDMonDlFCn9kmkiOefS3X5R66fvhnajN6A9UanUNGXPrdfoR6WELBL4T/Dac7sJqA+ORhbU8rTQPqsu2FP+n7wRE7mBSAZ3C2T3OnpySud7GNhvv/GN9el0oLTYULWN+5FHESp8MjJH6DhYhjxhuZQ4yBls6kjlHUUoaOZYkjrPERYzLr4fuHkbWkkmb4d3R57Kszymm/jUyz1bT3cVK95iJahTZqkg8eA+CW2iMPOuiA85m3vw9ZaR+l0E19xV8gCZfG+A0xSiXSkntRLRwEwFcMkjv69iKku3TfmWYOp+dwdIZ7Sljwz72zX6rqok/bS5IhQBj9earuodsqEXPa12O3ngWCdj5WWH7RAmkJHTS8cSTp4dQR/RaXS7EGqn7V5+MuapFh4cLA3Lq42CqyzyeUJlkZ7cJZLekOylrHfY0Bl8m2A18veyAbfQJZW+OITrAH3pBXDjFh9TPfBBBn7eRcBBPljw7lluYzDiYUSzNDdxj0s6TH/StwZ1pZeFlh2kgVzOX075O7CO5hDaYEyaAXO7ainjGf4sMZg7iFQSC2eJmyz6lIHGVbfbsquJalC+BdEKFj3pNdX0e9e8uzy8ZbzqJOL3Bkvgmyt9hsibs5g9mvYw5XFnlqgabTACzmyjt8ymFtlZfPHS+IUMJS6pOw2JbYSPfSUCG43WR1HXVr8KTtmI2OwUmny5IJgC6TPjIAWBHSGNXA+68Auix7yrwdOWIGUCOU8fyDTioaz7QipM09Shj9s0yTfvlZpAGgfQWOajfIgdw+eTIVBnGWgNsUPXgiT43QkWPIE0I+GeGFwX2LaUPiqLiT7XJImVu5/Ap2I3EFIJEaPSaYdSr/F96DAE4tdi5zRaMyUTJGgYklRn8WytQhNyVfgVcqtz5YLTAlwYs6xJnMNdLI4PTAaLRfiDgW/0JRf+FwNdqZ9GPQmCJWLvaRfBi7Vr8zYRz81yS5b/lY5/PZ40dR/+w2zoJitjtTfV7JvCoI7IdykfkxEPQ9EGkA4ZQ+yxzqG2ITUneTV4LBkKkMQvWG23IwULbv3AufQmHkQqkcha8cRBhQwUD5NJgw1Mh1G9dBe2HkJs6 X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5cd20d82-729e-4b9c-4cd9-08dab8a10fd6 X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5351.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 04:58:32.5824 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Q6B9VjPOPD2maWnRPDCr5QZHcyQE848SneqeeSHSSDQTc3h2RqPtorNPctBES9XNUIN0CTxeEbZdl0aCIe6P2Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4632 X-Proofpoint-GUID: NKYTTOPutp5LdxCks51iYqGiuy_1hOIJ X-Proofpoint-ORIG-GUID: NKYTTOPutp5LdxCks51iYqGiuy_1hOIJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-28_02,2022-10-27_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 adultscore=0 spamscore=0 clxscore=1015 suspectscore=0 lowpriorityscore=0 impostorscore=0 phishscore=0 malwarescore=0 priorityscore=1501 mlxlogscore=847 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2210280030 Received-SPF: pass client-ip=205.220.178.238; envelope-from=prvs=7300ee25fa=bin.meng@windriver.com; helo=mx0b-0064b401.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org commit 9f8e6cad65a6 ("gitlab-ci: Speed up the msys2-64bit job by using --without-default-devices" changed to compile QEMU with the --without-default-devices switch for the msys2-64bit job, due to the build could not complete within the project timeout (1h), and also mentioned that a bigger timeout was getting ignored on the shared Gitlab-CI Windows runners. However as of today it seems the shared Gitlab-CI Windows runners does honor the job timeout, and the runner has the timeout limit of 2h, so let's increase the timeout to 90 minutes and drop the configure switch "--without-default-devices" to get a larger build coverage. Signed-off-by: Bin Meng --- (no changes since v2) Changes in v2: - Change the timeout limit to 90 minutes .gitlab-ci.d/windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.d/windows.yml b/.gitlab-ci.d/windows.yml index a3e7a37022..093276ddbc 100644 --- a/.gitlab-ci.d/windows.yml +++ b/.gitlab-ci.d/windows.yml @@ -10,7 +10,7 @@ - ${CI_PROJECT_DIR}/msys64/var/cache needs: [] stage: build - timeout: 70m + timeout: 90m before_script: - If ( !(Test-Path -Path msys64\var\cache ) ) { mkdir msys64\var\cache @@ -60,7 +60,7 @@ msys2-64bit: - $env:MSYSTEM = 'MINGW64' # Start a 64 bit Mingw environment - $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink - .\msys64\usr\bin\bash -lc './configure --target-list=x86_64-softmmu - --enable-capstone --without-default-devices' + --enable-capstone' - .\msys64\usr\bin\bash -lc 'make' - .\msys64\usr\bin\bash -lc 'make check || { cat build/meson-logs/testlog.txt; exit 1; } ;' From patchwork Fri Oct 28 04:57:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 13023068 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 417B9C38A02 for ; Fri, 28 Oct 2022 05:02:56 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooHS6-0003p5-AZ; Fri, 28 Oct 2022 00:58:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHS5-0003or-F2 for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:41 -0400 Received: from mx0b-0064b401.pphosted.com ([205.220.178.238]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooHS3-00029S-W3 for qemu-devel@nongnu.org; Fri, 28 Oct 2022 00:58:41 -0400 Received: from pps.filterd (m0250812.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 29S4uPEU030878; Fri, 28 Oct 2022 04:58:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=PPS06212021; bh=gWw0+PU5hEXzF8auXwQ3XTg/muhTSyMmCUtjf3h99Us=; b=i6fyQReeP0vXEaLeKCsPx4LD9XYEX6Tbs5+UzZSj1yXuHLGpeunoGDD6cYfyh+a1IjFe wZhI2gG3/OM2DS6VE+iRubfQkP7dpVB84Mfsu7kYqNpGLqwuq7rFZVuEoGDrIzavZxIS oKZdRlKE9ZSL5b9pB+pseqdyM6+OUV5G3JR7UhZSmynf1p0cKs9w9lHHeHRO1vL/d7n5 LO4bQELdLuov8KSHvMslkksbTSXxrtd+Qol/CslDhrt8MBEmpFHT0a4q00L0XNSQg4S3 dKfeu6bXqG5VkEE9nf1w+xFIvg+ftHYlymtpjuT+YaQooMp4vbCHizVa59BykpR8bt2L dg== Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2168.outbound.protection.outlook.com [104.47.55.168]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 3kfg56h342-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Oct 2022 04:58:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Up/8P78GfcwuySVgsaMqB9XGQE2AhZjM39UBKUyVxY6APdGQpu5+QbX8b8eOsP9+2P1vFhS6s56sqIJmYakEtoFxHkkDIdgmQX0FDi5uvI5IHzhGFFdFrOZqaA0bRXLHq9cmJrwvgD3fbC3HnE82WMp3++vGuczP1302SqOPTXbRWEKtlmptJMyzlQUlT6b+YMWfWk2k5T0RxkLwZ8moeAjwuQ+vMqfGlxZ4pj4GC3BNGgQcUt4DWhC0xzY4Y2v4OyTPG+05Oi6bKmPuL/e+h0kqMqw59TESPHu+HSTuPPVdaBt4wrIGWS2gY4gYCgXcawvUbTGIvMXNB6nO0nUGMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gWw0+PU5hEXzF8auXwQ3XTg/muhTSyMmCUtjf3h99Us=; b=L/GjoESCQiHDbFruQk93jWCUsNH+OmRXIMDpBoFmVVpJCb5+4XjJ+Uvupo656WwqhAxOlL9PvsaZsagNV9lA7vri/iZBAax+QIh3DgK4wr1CblARjlF3XICSQrw/EeTpag6xejSXUJ3S4HNwiZBlfmn+8YAuXaFZTTlRZPDX58B5safaI4ma3aRwUdGjI0c6t6t1i/Huj7p/pKHluk2LY+ravkfmef5Ht9rWlSpZoFPxgL4hDnSHsQIGi8L9o4HXLakODDDtY4hoJIu+EJdSovRd6nwG5FkRUHiFVZbITisiezS4kxPLZBt9ENwQFRqEB8jO5IW7QHQ6X79LYW8ygA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) by MN2PR11MB4632.namprd11.prod.outlook.com (2603:10b6:208:24f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Fri, 28 Oct 2022 04:58:36 +0000 Received: from BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201]) by BL1PR11MB5351.namprd11.prod.outlook.com ([fe80::9a11:fa81:cdd8:b201%9]) with mapi id 15.20.5746.026; Fri, 28 Oct 2022 04:58:36 +0000 From: Bin Meng To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Thomas Huth , Laurent Vivier , Paolo Bonzini Subject: [PATCH v6 11/11] tests/qtest: Enable qtest build on Windows Date: Fri, 28 Oct 2022 12:57:36 +0800 Message-Id: <20221028045736.679903-12-bin.meng@windriver.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221028045736.679903-1-bin.meng@windriver.com> References: <20221028045736.679903-1-bin.meng@windriver.com> X-ClientProxiedBy: SL2PR04CA0009.apcprd04.prod.outlook.com (2603:1096:100:2d::21) To BL1PR11MB5351.namprd11.prod.outlook.com (2603:10b6:208:318::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR11MB5351:EE_|MN2PR11MB4632:EE_ X-MS-Office365-Filtering-Correlation-Id: 86a417a6-072c-4bb0-7891-08dab8a111f1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hyOVeal98dFkgECNwZ8/+9C5FNbjmzB9rNrk0r+WD8ZHw1IA0hvNVfKZnNiqYGXrF4bzBO5vy2UvEFkDCmY94JqNxQi5aZJcxZnklrCD2zpCc2x/yOzQESdvVxG3/cqZ5zj2yPqK9B3JenEI2fehhjctR1bvFyi31wZ1K3OvcwWYYMmqm5wcRqbehziPZ7NPVh/ORB4/phxlb5+dy4gsquMs5JAjK3C9YsfFxwlCKym9FYpMCR0iSt5RFrGdku1ae30xWmb+d+hWKdi/XxntaGULSiSXYkw4edrAQzH+J3Hk21RGaHi8i+3mHxGBbDLixyLX8jrDtsVUZKJMsgRGGM3b3H2+ZOR7POjuUNXpKboAVkg4UEQWk5MutRzPKzfD2R2SUowuZAlPHOpr/+2G3TktJkbGZBA6/cVwn1YQ+DKSo05LWyp+xaMnj+usLQ39QZPGKtmM2ziP6z9wKpyF+XNUUQk8/uhWEkApG19aOVA9VJcSr3psliMj4Z1jtMU8W2TLpFA5+DZ1A1bcG477fYGGij8AyrFrkynC6gIZq9lG8sWcREIIBjwHCEuQh2aRykz032v2qdtWTb8J4AoCw5bXqGJLlPjZcoEonW6glI1Epzr3hN20vBEFsrejYPbqdgKQoO7RGMrxUtWPPHKw6C11/yYyuq0KeZlqfjPdCLcng7VEMI7Kf58TiQbtO8HPEbcaK5TzMNlnwsZLxvtGzdKJ142RMd2Tv67o6F2t+J9oAp8GIdCRZ6BGU1DdGLtXNzrQZkOjvfNrG5aXtiVFWw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL1PR11MB5351.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(39850400004)(346002)(366004)(396003)(451199015)(478600001)(26005)(6486002)(6506007)(36756003)(2906002)(83380400001)(52116002)(86362001)(5660300002)(38100700002)(38350700002)(2616005)(316002)(186003)(1076003)(6512007)(66476007)(8676002)(54906003)(4326008)(6916009)(41300700001)(4744005)(66946007)(66556008)(44832011)(8936002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?OhOJA5c1XE8itWGnduvTOIuIJtYF?= =?utf-8?q?eD2YWEJ5/6VP7X8Son6wuSdbuOSb9ZAxGY4U4nWI6VFPagCTsq84Pv032cswwcA95?= =?utf-8?q?pbX7ZwL39yjuK8aUfuRi2puCjFjKMCZWTkWyFx8AVVNn+fbk4pSAc7Gc/slosaK6j?= =?utf-8?q?By1qLJOKJyMUCVXro2JY7Dyi4OCy0KMWjvRTPHiQ12e62Yosb+c8xjHIjNtrN6eyN?= =?utf-8?q?v1O8kUaRIUaJWgrsYirZgT/pa94EvXdGb2JNDsQbUUXjUmu08M6ebKFluUFGsLc55?= =?utf-8?q?/3eje42LqjnqKlnBl06Il68z0ikkgErNBzc8UWQ2mHalJC24lpDPVkoGY8lMR7F83?= =?utf-8?q?JAtOay4y4NvRLEGLdke8zKnBHpeP0d4DSOSV7jenfd2ydT/0VKJGgY6giIn6yENoD?= =?utf-8?q?fW7GBURx+f2RrtfbzNgUNym/etpSYkIapZucsi9pzMdRZdfdc3nlE7DuaEQy5R7fj?= =?utf-8?q?TB7qFHw1pQwaGpHReIM0gYKjjds+2OqHjQ29mMMtygXqm1F6KWZb3g2FcxybOGgr2?= =?utf-8?q?CY0yVr1RbOY0VNBFGgREF6IsEF3AAi4KRTAX0Ae3YRJGe4IAg4AyYogheT9MvkzBJ?= =?utf-8?q?W6XJl0kjL7SQWClH98axTRpIDw2pxxf92SuIpymKw8a0lHXrqEJrDfXGNRYR75ezY?= =?utf-8?q?wrpceG4SL+RBmpqpo/XIFninEMsP7wPrH0wrZiolA7B6S/iy6GJIn5SWH/hQzE2EE?= =?utf-8?q?J1hB0pZ3ZuIzeF+F9qwDU5Xi+BG0M29u4B9Nln5QJ+eP+tCNjs3+nltbpvT8nuuZw?= =?utf-8?q?uq9Q3Qt7ZlRO9LTXIOKf+z60at6VV9M79GI2Oyhecipca4FJ+m8RXyNInLLjLm2VY?= =?utf-8?q?2xcLeUoVpjOol88e4JtUzi8k5CBY1kfZTojoPnsgBsfw6qokron+xHzdrgf4AOcgx?= =?utf-8?q?dE3Ybz9C/zMHog/FFRf/hq4Uk6n3l0+I4tyTBmPKO+Y//4f48fJFhF2KolPn8FevF?= =?utf-8?q?4obLSxnWJGRczurdHY5n8DgsmiMArgffdjKrqrVCDH/Am1w+tPJHgI7d4iNMfnaaL?= =?utf-8?q?AMDr72udDQKVs/69DRA/w6Fo/VZtevbccRKGzRVFjMBzgcg8qK9TpK7M09s6ZG468?= =?utf-8?q?WE3dkc6r+gQ/gIDvVgIDuAY+JQLjeccGaUlre5jH8cYUjvVVrUeVfo2CAGBL9ci4f?= =?utf-8?q?1o2Y/xYnfV+sw7xvv5W8f8sgLHMhv4zjyNLvbhWHo0F/W6VUxr8R4HDCuE7IAYF45?= =?utf-8?q?DdYczeaLknxgeyXGfW9bk4Gj7CHQ7qMqOV2sITCnCVJQdtpz/0o9CRfuUl1ul3vz2?= =?utf-8?q?3UYy5/mKb8ZpPj+yebH4+QuN7p6PUZrzpT3KTvhFQ3Mggmcw8fEjH7rf1hyRZQ2JV?= =?utf-8?q?x+OG9IaGSRq+Ll5zAy28+io4fGn4xDJcg05Lxn8QSR1Y2vq2QPbS6I5KuOwBeRE0M?= =?utf-8?q?OrCPekhKDF6zwRaMgiEQw0ZRdQODVOYpasU7zYJxmceKOYnr0hRgS4UuxgvIO2Bt6?= =?utf-8?q?C3OBcqLz8Nob+53NqrmagrmyRaGHtOyMk9Is4Q33e3anRXdfgLy1UWiIYFsgVN4mB?= =?utf-8?q?sonpKyxO681A?= X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 86a417a6-072c-4bb0-7891-08dab8a111f1 X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5351.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 04:58:36.1159 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +BIGA/pFWqU7mQGsGELZCzHzYoGlAjneL2geT74a9S1Rhbv0daDPSb8fFvgnvnzDWI/LHxiSNBqP7KbeFBkjIA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4632 X-Proofpoint-GUID: I33LnYdFN_fcfssCvfGVUMreRjaBzKt- X-Proofpoint-ORIG-GUID: I33LnYdFN_fcfssCvfGVUMreRjaBzKt- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-28_02,2022-10-27_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 adultscore=0 bulkscore=0 lowpriorityscore=0 mlxscore=0 suspectscore=0 mlxlogscore=620 impostorscore=0 phishscore=0 malwarescore=0 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2210280030 Received-SPF: pass client-ip=205.220.178.238; envelope-from=prvs=7300ee25fa=bin.meng@windriver.com; helo=mx0b-0064b401.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Now that we have fixed various test case issues as seen when running on Windows, let's enable the qtest build on Windows. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth --- Changes in v5: - Drop patches that are already merged Changes in v3: - Drop the host test Changes in v2: - new patch: "tests/qtest: Enable qtest build on Windows" tests/qtest/meson.build | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index c07a5b1a5f..f0ebb5fac6 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -1,9 +1,3 @@ -# All QTests for now are POSIX-only, but the dependencies are -# really in libqtest, not in the testcases themselves. -if not config_host.has_key('CONFIG_POSIX') - subdir_done() -endif - slow_qtests = { 'ahci-test' : 60, 'bios-tables-test' : 120,