From nobody Sun Nov 24 12:05:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1722900591; cv=none; d=zohomail.com; s=zohoarc; b=X7oulrPvOQRaujnwqq2XVI/fxh0Do+DfKOl/lSWZuqQYfYtyL+j7obKZjGTwo13pL+lOVe2g3IwvgCLa0jAz6Agm1eus7YQi9dhdwccMZ08BgAreq8mTPwL+Ry3QDgmEz5JkZK64ZKVFdLw3nLWG6qL+Pw+6kufBgv0GSqkFjJs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722900591; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=865ipMsfnPjqevXUhuNC1hjLcECXbBAzIH19t+juWX8=; b=fbZ21zFAtenzukda8Z8nyG93nULs1ew+418HBFM5uzKGjNO5wWwEzpcCoSMFLTxOt9DHxvunJwZVHooGJw3sYPqMYodTCkWG/pbjHzhbd/4UK/MRzkyoVgvjbwl9xUSd124OevvNFPB7UpB0JI2jbFe+GwFrBfXBTiBE81MiBlA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1722900591971159.94511023394546; Mon, 5 Aug 2024 16:29:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sb780-0003eZ-1z; Mon, 05 Aug 2024 19:28: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 1sb77y-0003dd-Ij; Mon, 05 Aug 2024 19:28:34 -0400 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sb77w-0001Nf-5W; Mon, 05 Aug 2024 19:28:33 -0400 Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-2cb5789297eso7131854a91.3; Mon, 05 Aug 2024 16:28:31 -0700 (PDT) Received: from wheely.local0.net ([1.145.206.202]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2cffb390be6sm7659100a91.51.2024.08.05.16.28.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 16:28:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722900509; x=1723505309; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=865ipMsfnPjqevXUhuNC1hjLcECXbBAzIH19t+juWX8=; b=PVh/5S5+qutUwz63BWDwdc18mqUDXkbq8is0ofYIPgKCs0UmV7GlVsD2GFK/qcELkm XsI3Eo3jePBQc5FqPGOrb6+bJPJAzzne7pmSLDgr6LtuWqUhUzefGzOpkhwBlt3iYuND Mzqg0yNQXBukN7wSw7ELEorZ9qamludz1Ddf+O39huVSNNyJpd70ofWz2b4F07c/dFUK 1tNYjW6ImkCH2/JYKaxwLY7/pcsAjQZ9o7B7UTYKt3nduy4/Drsju3BJT8k27hDPfMnY YwoET7GS+TwJABV0VlEk3575UTmpQpJtwogTfSuBW74lF8dU5nZidr9ZyBBjjhfCuwGE oKJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722900509; x=1723505309; 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:message-id:reply-to; bh=865ipMsfnPjqevXUhuNC1hjLcECXbBAzIH19t+juWX8=; b=r/FQaMtPyPSuZcz/Yx50jnKRjQEu52ElNGMTY4ss6RxMICq8PYtP3Gm3fCtjgUaMHO KklBHeik/jnPISy6HGZiOMhymcBKZphOo6569dZzgGPXleKRw/kyEJ2F45r931F6FO2u l2YCwGkQLzqGMWmaKxZROxoxWkEBFVfQ5T4RDTOezFQY0qIHJWUrTNeZBGz/c258tujb 9U64fRqytL4NSA7OmqjmVIslfQHik8sBoDm1wMrZH7nKume7mlcrxgwC7HUw0S5Ym36l ND7k7ii+OnQYdhBzOgvCAaWy/hl30G3aLyOHzxiKTGgvPHZ+/dPzYF369DDhLUAsybHw Z6qw== X-Forwarded-Encrypted: i=1; AJvYcCXldQSvvoJsvY+voxnQAWFa1y4U/kAuVJev/wlxY3fjmKAyytUHeVmSPte1ZIEWvWr+4jeMadd18nUm6JAVEJXnOukm X-Gm-Message-State: AOJu0YzAUSZ3znyFZJ4elSChpC4ewxtFWe+73AXWdBLpkRN99XfTtR42 aRR2hqf/DNCLOmFCCmZ8vn6UVg2Hl/2GQXkGznBe4gKX8HGp3VZgQTGKkw== X-Google-Smtp-Source: AGHT+IHeyx8Reax/Kx5/pMzlzcTkQymdBtooJ6suwFvh3pAEapv44zYVZLeqXV4Ara8yVFVovFD0cw== X-Received: by 2002:a17:90b:1e4c:b0:2c9:57a4:a8c4 with SMTP id 98e67ed59e1d1-2cff955901dmr11301565a91.42.1722900509438; Mon, 05 Aug 2024 16:28:29 -0700 (PDT) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Fabiano Rosas , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , John Snow , qemu-ppc@nongnu.org, Richard Henderson , Ani Sinha , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth Subject: [PATCH 1/2] tests/avocado: exec_command should not consume console output Date: Tue, 6 Aug 2024 09:28:12 +1000 Message-ID: <20240805232814.267843-2-npiggin@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805232814.267843-1-npiggin@gmail.com> References: <20240805232814.267843-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=npiggin@gmail.com; helo=mail-pj1-x1036.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1722900592341116600 Content-Type: text/plain; charset="utf-8" _console_interaction reads data from the console even when there is only an input string to send, and no output data to wait on. This can cause lines to be missed by wait_for_console_pattern calls that follows an exec_command. Fix this by not reading the console if there is no pattern to wait for. This solves occasional hangs in ppc_hv_tests.py, usually when run on KVM hosts that are fast enough to output important lines quickly enough to be consumed by exec_command, so they get missed by subsequent wait for pattern calls. Signed-off-by: Nicholas Piggin Reviewed-by: Thomas Huth --- tests/avocado/avocado_qemu/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado= _qemu/__init__.py index a3da2a96bb..ef935614cf 100644 --- a/tests/avocado/avocado_qemu/__init__.py +++ b/tests/avocado/avocado_qemu/__init__.py @@ -135,6 +135,13 @@ def _console_interaction(test, success_message, failur= e_message, vm.console_socket.sendall(send_string.encode()) if not keep_sending: send_string =3D None # send only once + + # Only consume console output if waiting for something + if success_message is None and failure_message is None: + if send_string is None: + break + continue + try: msg =3D console.readline().decode().strip() except UnicodeDecodeError: --=20 2.45.2 From nobody Sun Nov 24 12:05:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1722900588; cv=none; d=zohomail.com; s=zohoarc; b=PjUMgHJ54120hrVnjRuj3DI2e61pK6M/V/O2kUei/lwY4TXl6diS1tMdkTaXBNcQi8a2p3D8F88FpvXZfNTSAWMO96Ja4GQlAnoagzU0v8RO/9XzcNda+6fv8DUqNQ8JUcReQqD9zJTiF3mY7AXTuFtotBGW2MOV08/KgrN1xGw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722900588; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=teGqMchYARnIAhasEwslauOJTM1BGvTJjBuj5K3TcCc=; b=Jt1pbsLiSNPxSVmm/v80Wo7/SP32ejIojrCvy+l+bTRRS+0c9PXDY2D0P+8qfsa4BprCmQZdnlA0ZAyWxcxS9o3j1GVHIH78V7ZSE1Ezesl+wdiee55enmiy70bW6wFLNj6hcBriGmsW6JZf4uMvB4c603gANf2O6MPznlWJ9wg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1722900588368946.7968590415803; Mon, 5 Aug 2024 16:29:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sb785-0003uD-JU; Mon, 05 Aug 2024 19:28:41 -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 1sb783-0003qW-Fd; Mon, 05 Aug 2024 19:28:39 -0400 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sb782-0001OV-0f; Mon, 05 Aug 2024 19:28:39 -0400 Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-2cb81c0ecb4so4379145a91.0; Mon, 05 Aug 2024 16:28:37 -0700 (PDT) Received: from wheely.local0.net ([1.145.206.202]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2cffb390be6sm7659100a91.51.2024.08.05.16.28.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Aug 2024 16:28:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722900515; x=1723505315; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=teGqMchYARnIAhasEwslauOJTM1BGvTJjBuj5K3TcCc=; b=OPiQfqmdEPBq6pCvLcWFHfaFV26kXiSNzQfh4m62R4en7ZG6pkExB8kRQwHz6Aj0XY 9kLyLKG1yiGuE37z92suc7at6wQtOd5rhySJ+s1J7x81xAdvsbCo7KTT3gqT8KHx/dIi Bs7OVsde6xOaFfDVMMkzhhIwAFOaNGDL4y/g4Hu18HQhqpr4/q7WJ0nHTXmn/sjgGqK0 LhyfqXTHnoQX3VtG5z1j3L6RaBsQSMjVnJ4rI85bq0DeZZK1Y1BOal1w89B0fzjssDw2 9X5XG/B+z9NSRfhq+vcrLwH5tN20JyhRa+sb6+NGCaMyWd3FmfngmnRasY58T2rklU9F gkWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722900515; x=1723505315; 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:message-id:reply-to; bh=teGqMchYARnIAhasEwslauOJTM1BGvTJjBuj5K3TcCc=; b=Lzd4mjCPKCVC54QucR4IYCXAaPZZv3Hh6Hz+ZxMcO/LNLz0sz195BeVsTvb6hN3Xn5 YkWqQgH1wpVSY0VlR5h9MBBAN+bfSAxuNlHidaYmvKS/FiTPJ21l6pzCv7LjGSvB72SO TBPmtYIKV2CFPl01aXBD4CYGD9gTabasQqjohfBdXUxCbzSI+j2EEcIivou1+OMf6+aP VMd6OaVPrSyGkL0WAy82x5tBQx+5gEV7cUlpsHg2IWX2QqeEnlWN8i9tLApnr45v02wb rjuG/I1qW0HcvqjT5NeX2SnyVk1MpvzhwA9I7C08xjj1N13Ua+6BDQEf04/So3EXh3N7 ZtfA== X-Forwarded-Encrypted: i=1; AJvYcCXyhWmJNUQPpGGBbm0JhoQ68/P4LhoUkq4In4t2qF04Exc2L+5PW2jF15/bdWIjxuD7brWWDKbzshP/bAVKlgUS4hnw X-Gm-Message-State: AOJu0YyBBwQB5DxfjFy9SZrOI5RSBKxb8czD6SO6x/rmfmRil+k0OWzF 7y3p4HbO/iG8wkS9vkqfLysBp6llWQKDLJs6W0Cr/m1XB2WYftJPDt7udg== X-Google-Smtp-Source: AGHT+IFAu5Zw9i0YLM9AcxI4U8+QhSUYZrYOXLED8D1P7g41N8yhJm2VVMy5CAk7rZ8PoELdpmyRGw== X-Received: by 2002:a17:90b:4a8b:b0:2c7:49b4:7e3a with SMTP id 98e67ed59e1d1-2cff09346a1mr22359425a91.7.1722900515310; Mon, 05 Aug 2024 16:28:35 -0700 (PDT) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Fabiano Rosas , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , John Snow , qemu-ppc@nongnu.org, Richard Henderson , Ani Sinha , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth Subject: [PATCH 2/2] tests/avocado: Mark ppc_hv_tests.py as non-flaky after fixed console interaction Date: Tue, 6 Aug 2024 09:28:13 +1000 Message-ID: <20240805232814.267843-3-npiggin@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240805232814.267843-1-npiggin@gmail.com> References: <20240805232814.267843-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=npiggin@gmail.com; helo=mail-pj1-x102c.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1722900590530116600 Content-Type: text/plain; charset="utf-8" Now that exec_command doesn't incorrectly consume console output, and guest time is set correctly, ppc_hv_tests.py is working more reliably. Try marking it non-flaky. Signed-off-by: Nicholas Piggin --- tests/avocado/ppc_hv_tests.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/avocado/ppc_hv_tests.py b/tests/avocado/ppc_hv_tests.py index bf8822bb97..0e83bbac71 100644 --- a/tests/avocado/ppc_hv_tests.py +++ b/tests/avocado/ppc_hv_tests.py @@ -45,7 +45,6 @@ def missing_deps(): # QEMU already installed and use that. # XXX: The order of these tests seems to matter, see git blame. @skipIf(missing_deps(), 'dependencies (%s) not installed' % ','.join(deps)) -@skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test sometimes gets stuck= due to console handling problem') @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited') @skipUnless(os.getenv('SPEED') =3D=3D 'slow', 'runtime limited') class HypervisorTest(QemuSystemTest): --=20 2.45.2