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 C4729C433FE for ; Thu, 20 Oct 2022 16:22:17 +0000 (UTC) Received: from localhost ([::1]:33488 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olYJE-0003a1-Il for qemu-devel@archiver.kernel.org; Thu, 20 Oct 2022 12:22:16 -0400 Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olYG9-0005eD-2Y for qemu-devel@archiver.kernel.org; Thu, 20 Oct 2022 12:19:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olXmV-0000lo-Do for qemu-devel@nongnu.org; Thu, 20 Oct 2022 11:48:28 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:36712) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1olXmI-0002GC-TX for qemu-devel@nongnu.org; Thu, 20 Oct 2022 11:48:27 -0400 Received: by mail-wr1-x432.google.com with SMTP id j7so35267504wrr.3 for ; Thu, 20 Oct 2022 08:48:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=pXdeu0rNzyTxJ6PupfrI5sVHtzJmKm5Gr+NXqfmXtSs=; b=xTaE/h1VKEUhkt69rKCq6xEzjrhSSSUqsn/DHkdLZ+pjlb5eYqNeorZD1ecQGcHiuO WxGuWa0QLiAwvimWiLJqErkD+87KE5iUj+VKmbx5/jubsMyVPdinfMhUMqdcBVRtfp+a Yh00RuipB2QdrR6MSlEVc8RHjKaC+HQ/MaMg3KP84lIqO/XplczJCk9p4QISuZSPlV57 MV5Hy5gXpJIkMXc1v6lT9fHrD2VqjzouWGfIFVIKztMj9/PUKQRZ4n7toBStmLpYj7iO 032F8fHwVdUM3wX/Y50rOuuWDSnLWhZKTTSQ/wtK3qTLGNDk6uQ817+7mFK9B1O3xOOe SQVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pXdeu0rNzyTxJ6PupfrI5sVHtzJmKm5Gr+NXqfmXtSs=; b=cOcP62Jf1R7YO7d50iEfP+miXBjG2OtNWqH2RjQRkzhWIKa6W0F8R1a/M9gQKfsS9U pIVunhfGij6guoWdBB0GgWlJBrtRAu5JnPVKZY6VpFia+X8mVa7lBwQb89Fqu8dEC4/I Sas6QAMgmB3Do6+rygtTysT+80u1u18A7ijppdfr4iNFGgQjPyFfJoFu+eAuQAsoI1Hb Sf45F98Hz3ZahPvI2KTUPmE9PpF5qKYw6aqGNmwxJ/oSi+6bUoS5+9Rm0vDjEkuXVqei d5l8yJeoQpiMABxXtObJMkpZK/Sx0031P+cm4QpC4LcYvLepdX5XGovN20eWz3NkJZSV tVQA== X-Gm-Message-State: ACrzQf1E1MgZR9xvzuBCdLMvGUS8NdxV3YVpVcBE+/mnLCLl9/KXm2Eq 8LLPkVsRQyZUjHG1aK6608XOkg== X-Google-Smtp-Source: AMsMyM7NZ3YTReFCjz77C5xqc/xKwLh04k3sTn0oo7lPIQ1pCJVNtY4Oitco2Tuy5uC+QLWFvxxpdg== X-Received: by 2002:a5d:4143:0:b0:236:4b40:bbd1 with SMTP id c3-20020a5d4143000000b002364b40bbd1mr1265063wrq.26.1666280892631; Thu, 20 Oct 2022 08:48:12 -0700 (PDT) Received: from [10.50.0.10] (ec2-54-194-108-71.eu-west-1.compute.amazonaws.com. [54.194.108.71]) by smtp.gmail.com with ESMTPSA id l35-20020a05600c1d2300b003b477532e66sm6908621wms.2.2022.10.20.08.48.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Oct 2022 08:48:11 -0700 (PDT) Message-ID: <75252ca2-e0b9-1234-46d1-e75a08ebe2c3@linaro.org> Date: Thu, 20 Oct 2022 17:48:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: [PATCH v3 19/26] tests/avocado: raspi2_initrd: Wait for guest shutdown message before stopping Content-Language: en-US To: =?UTF-8?Q?Alex_Benn=c3=a9e?= , qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, Peter Maydell , Wainer dos Santos Moschetta , Beraldo Leal References: <20221020115209.1761864-1-alex.bennee@linaro.org> <20221020115209.1761864-20-alex.bennee@linaro.org> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= In-Reply-To: <20221020115209.1761864-20-alex.bennee@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.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, NICE_REPLY_A=-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" On 20/10/22 13:52, Alex Bennée wrote: > From: Peter Maydell > > The avocado test > tests/avocado/boot_linux_console.py:BootLinuxConsole.test_arm_raspi2_initrd > finishes wiith Typo "with". > > exec_command(self, 'halt') > # Wait for VM to shut down gracefully > self.vm.wait() > > In theory this should be fine. In practice it runs into two bugs: > > * when the test calls self.vm.wait() Avocado closes the socket > connection to the guest serial console immediately, so the > avocado logs don't have the last part of the guest output: > https://gitlab.com/qemu-project/qemu/-/issues/1265 > * when the socket is closed, a bug in the QEMU socket chardev > means that it loses any data that the guest UART has not > yet consumed. This means that the guest doesn't always read > the full 'halt' command string, so the test intermittently > fails with a timeout: > https://gitlab.com/qemu-project/qemu/-/issues/1264 > > Work around both of these by waiting for the guest to print the > string that means it has completed the shutdown process. This fixes > a very long standing intermittent failure in this test. > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/636 > Signed-off-by: Peter Maydell > Signed-off-by: Alex Bennée > Message-Id: <20221020102012.3015662-1-peter.maydell@linaro.org> > --- > tests/avocado/boot_linux_console.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson