From mboxrd@z Thu Jan 1 00:00:00 1970 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 EE1A4C19F2A for ; Thu, 11 Aug 2022 14:21:00 +0000 (UTC) Received: from localhost ([::1]:40738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oM93T-0000iU-On for qemu-devel@archiver.kernel.org; Thu, 11 Aug 2022 10:20:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56642) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oM90t-00087E-9l for qemu-devel@nongnu.org; Thu, 11 Aug 2022 10:18:21 -0400 Received: from 1.mo552.mail-out.ovh.net ([178.32.96.117]:56105) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oM90q-0005Bi-49 for qemu-devel@nongnu.org; Thu, 11 Aug 2022 10:18:18 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.109.146.41]) by mo552.mail-out.ovh.net (Postfix) with ESMTPS id 914BE24587; Thu, 11 Aug 2022 14:18:03 +0000 (UTC) Received: from kaod.org (37.59.142.99) by DAG4EX2.mxp5.local (172.16.2.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.9; Thu, 11 Aug 2022 16:18:02 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-99G0033497bc45-26da-4458-b692-d73b07837cf3, B18B381393FCCA734C2622819310E7EBE9D8D149) smtp.auth=clg@kaod.org X-OVh-ClientIp: 90.89.155.17 Message-ID: Date: Thu, 11 Aug 2022 16:18:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [RFC PATCH] tests/avocado: apply a band aid to aspeed-evb login Content-Language: en-US To: John Snow , =?UTF-8?Q?Alex_Benn=c3=a9e?= CC: , Cleber Rosa , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , Wainer dos Santos Moschetta , Beraldo Leal References: <20220811114315.3065951-1-alex.bennee@linaro.org> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [37.59.142.99] X-ClientProxiedBy: DAG3EX2.mxp5.local (172.16.2.22) To DAG4EX2.mxp5.local (172.16.2.32) X-Ovh-Tracer-GUID: cb52f079-78d3-4f7b-8a78-fb5d23961e69 X-Ovh-Tracer-Id: 1124492536055630697 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrvdeggedgjeehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgihesthekredttdefjeenucfhrhhomhepveorughrihgtpgfnvggpifhorghtvghruceotghlgheskhgrohgurdhorhhgqeenucggtffrrghtthgvrhhnpeekteejtdelkeejvdevffduhfetteelieefgeefffeugffhfeekheffueefledujeenucfkpheptddrtddrtddrtddpfeejrdehledrudegvddrleelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpohhuthdphhgvlhhopehmgihplhgrnhehrdhmrghilhdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomheptghlgheskhgrohgurdhorhhgpdhnsggprhgtphhtthhopedupdhrtghpthhtohepsghlvggrlhesrhgvughhrghtrdgtohhmpdfovfetjfhoshhtpehmohehhedv Received-SPF: pass client-ip=178.32.96.117; envelope-from=clg@kaod.org; helo=1.mo552.mail-out.ovh.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 8/11/22 16:08, John Snow wrote: > On Thu, Aug 11, 2022 at 7:43 AM Alex Bennée wrote: >> >> This is really a limitation of the underlying console code which >> doesn't allow us to detect the login: and following "#" prompts >> because it reads input line wise. By adding a small delay we ensure >> that the login prompt has appeared so we don't accidentally spaff the >> shell commands to a confused getty in the guest. >> >> Signed-off-by: Alex Bennée >> Cc: Cédric Le Goater >> Cc: John Snow >> --- >> tests/avocado/machine_aspeed.py | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py >> index c54da0fd8f..65d38f4efa 100644 >> --- a/tests/avocado/machine_aspeed.py >> +++ b/tests/avocado/machine_aspeed.py >> @@ -101,7 +101,9 @@ def do_test_arm_aspeed_buidroot_start(self, image, cpu_id): >> self.wait_for_console_pattern('Starting kernel ...') >> self.wait_for_console_pattern('Booting Linux on physical CPU ' + cpu_id) >> self.wait_for_console_pattern('lease of 10.0.2.15') >> + # the line before login: >> self.wait_for_console_pattern('Aspeed EVB') >> + time.sleep(0.1) >> exec_command(self, 'root') >> time.sleep(0.1) >> >> -- >> 2.30.2 >> > > Augh. Sorry my hunch was wrong. I wasn't aware of this problem. > > Is ... this 0.1 second sleep really sufficient? I guess it's better > than not having it, and I can't reasonably ask for something more > thorough. tests/avocado/machine_aarch64_virt.py has a few of these for the same reason I guess. C.