From patchwork Tue Sep 20 10:31:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 12982160 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 A9269C54EE9 for ; Tue, 20 Sep 2022 13:21:40 +0000 (UTC) Received: from localhost ([::1]:54754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oadBz-0005Pw-NV for qemu-devel@archiver.kernel.org; Tue, 20 Sep 2022 09:21:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaaZG-0001IL-2x for qemu-devel@nongnu.org; Tue, 20 Sep 2022 06:33:34 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:39743) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oaaZC-0004td-OF for qemu-devel@nongnu.org; Tue, 20 Sep 2022 06:33:28 -0400 Received: by mail-pl1-x62c.google.com with SMTP id f23so1913932plr.6 for ; Tue, 20 Sep 2022 03:33:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=5JX7sGU3bhekd0+rl8Pgr+ORxrbUqYd0iNFII92cHyo=; b=kr+z9l8g3SvLJBwnCGpAxOiAMYCgCZG4eh+lDcL4FkyqE6RAFIpzMBjP0ASS0i2XAj J19mSKiRsW13dokt34Z4iBbzJIkS+DwLn5CaxIRxy+rS26Kf4xZK3fbqfvHLjvW1bMFW neAuQ2tgiLg46ZRih29o4upOLzXsyReR1BTQGBHMG7Qp6GjSyAWl889Tc5bVqmqIWkQQ X934lzb5CODXuSwWPQIPpwtdpUgN9lHoCaewwUQuWzdgg0lx3NRefxKN3jIomhEcTDs1 p87Puwh0EJelZieKhVz/1DfRtEFp+BwOnOZZb3LN0vT2Ci8ZiSarCk3OrmxbibqxQpE8 c5Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=5JX7sGU3bhekd0+rl8Pgr+ORxrbUqYd0iNFII92cHyo=; b=CaYNxOkOFFWdBc1ZpN/FH0s7WVhc58YtDQNvm3kGIP+6MfoqhxGlAbCf8pBX3Q/pJC l1PMwx6pfxqx7IF4p7eqC/+nGAs7mS8zzqTnthkimq9iRHtKMO5eELJXZU6Qzsb6coqI Mgm3Kd89S0GP3AvwYf4Ax9/tIYF4xH7ZHJ00QOlpZsYCQDRjd2DAmQ10t9z70HjHIoGm aorjGtDSpjntG8qQt0L1PgrFK2oOfr8b9rO7kZm8JzsOn0Z+QzXyLjHYok+E1fM35yga X+A68LbjNtn0OKnIyO2Xczlo31Qil/YyIAwG0VxwvM2rkVlnweDtk7FCcnqJStlBm7MF Kh4A== X-Gm-Message-State: ACrzQf2tljysK2SRCLzCpFd/5o9gmQz+0uElPJvgmGh+vDiMnLiOK8mQ beCgPSgzw5zXuOG72hizGdSzId5CFrg= X-Google-Smtp-Source: AMsMyM4wrPWxE3W7DvLeomr/HDEMpAKL3E65agxKDiw/0zL7BDwbnotRl/uY9HdOOgIHpUMG1emIgw== X-Received: by 2002:a17:902:7c11:b0:178:a6ca:4850 with SMTP id x17-20020a1709027c1100b00178a6ca4850mr4264056pll.111.1663670004271; Tue, 20 Sep 2022 03:33:24 -0700 (PDT) Received: from ubuntu.. (144.168.56.201.16clouds.com. [144.168.56.201]) by smtp.gmail.com with ESMTPSA id n2-20020aa79842000000b00551fa0e2b2dsm699573pfq.206.2022.09.20.03.33.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 03:33:24 -0700 (PDT) From: Bin Meng To: qemu-devel@nongnu.org Cc: Xuzhou Cheng , Bin Meng , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , "Dr. David Alan Gilbert" , Juan Quintela , Laurent Vivier , Paolo Bonzini , Thomas Huth Subject: [PATCH v2 26/39] tests/qtest: migration-test: Make sure QEMU process "to" exited after migration is canceled Date: Tue, 20 Sep 2022 18:31:46 +0800 Message-Id: <20220920103159.1865256-27-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220920103159.1865256-1-bmeng.cn@gmail.com> References: <20220920103159.1865256-1-bmeng.cn@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=bmeng.cn@gmail.com; helo=mail-pl1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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: Marc-André Lureau --- 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 c87afad9e8..aedd9ddb72 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -2133,6 +2133,10 @@ static void test_multifd_tcp_cancel(void) wait_for_migration_pass(from); migrate_cancel(from); + /* Make sure QEMU process "to" exited */ + while (qtest_probe_child(to)) { + ; + } args = (MigrateStart){ .only_target = true,