From patchwork Tue Dec 12 08:07:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1874926 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=srpPdEV8; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=sipsolutions.net header.i=@sipsolutions.net header.a=rsa-sha256 header.s=mail header.b=YjdUyjRC; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SqB7g0Pp0z1ySd for ; Tue, 12 Dec 2023 19:08:14 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=3Un9d2Ur2HC3QhhwT6xekmN/TkVX/6Zur604/k7kK/M=; b=srpPdEV8g+1LNG w8NPJRpiotoagxe11OfZ1JpdxAy0h2Ybpnsl4MV/Q16/04Q3UKAHaXCAoJ2pU9NRkPYY+Z30xRZ5A /2tetyXS7toHEQYG7ODMYjZAz93Kyc325m/LIzIGiX02MgBRml6egfLKVoTn31YFKdL6R5qFYBPMD w0ANHU4Xn4B+Qy8EG6kMUIbP6M34lJ76vgSKjLjL6XPoTJ3TSJLfuuX08YoIQJLKBjLgnwY7ENQBd MnY6f4Hc2Dk58vRA/ZJAxjD3F4GQX/ar+mj7LlX7AErkMjImYMxNNRtc9UVuNK8bM65sk3Bcy26MQ A+XvWRX1aNeJM7qwh7hA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rCxnY-00B0Db-1N; Tue, 12 Dec 2023 08:07:24 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:242:246e::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rCxnS-00B0Cv-2m for hostap@lists.infradead.org; Tue, 12 Dec 2023 08:07:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-To:Resent-Cc: Resent-Message-ID:In-Reply-To:References; bh=uLq7GJWjyAG55wZN7/QORSk84PqZogm5tBmq0ulH0Hk=; t=1702368438; x=1703578038; b=YjdUyjRCBZ6+YAuVLoRXPJSNd2/IFHlzzWfZa/hOWBYgmCrChVTR/bkhDBt+3JvR80XHN+3TvcW itvbBCjZ8kTJQ5ar/mKkHopS2mB7914YNP0wqCCjcZzK0VB8AxA/hDiZhLA2e3VGB45FGHz9Ar2FM GcRceFOimzIIXnAvHurm+KSkvAyjOsGwrAw3U2IHusSkBAxxi6zuL7b7pEL8O6GTW1Qb8KlBr1ZqR zlQZXAtZICBPoJzM4W2Bixap8Cd2NUrumOGQUg9dtcaDrAzg+xq203rOb5bWndCqNyusxPBInr3nR Y7U9eH0TsgEDhBJFAiaoMSZEgVTDZ3JwORbw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rCxnQ-0000000818Q-27Pu; Tue, 12 Dec 2023 09:07:16 +0100 From: Johannes Berg To: hostap@lists.infradead.org Cc: Johannes Berg Subject: [PATCH] tests: reset WARN_ON_ONCE() state in the kernel Date: Tue, 12 Dec 2023 09:07:15 +0100 Message-ID: <20231212090714.717fa2663ceb.Ifcae9f7f54c2a68f95205714a7778c5b3888860a@changeid> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231212_000719_116224_55B34078 X-CRM114-Status: UNSURE ( 8.14 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Johannes Berg If a tests hits a WARN_ON_ONCE then the retriggering will make it appear to pass, since the warning will not happen again. Make this more reliable by resetting the states at the beginning of each test [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg If a tests hits a WARN_ON_ONCE then the retriggering will make it appear to pass, since the warning will not happen again. Make this more reliable by resetting the states at the beginning of each test. Signed-off-by: Johannes Berg --- tests/hwsim/run-tests.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/hwsim/run-tests.py b/tests/hwsim/run-tests.py index 0d69f303c103..30368a97ab96 100755 --- a/tests/hwsim/run-tests.py +++ b/tests/hwsim/run-tests.py @@ -487,6 +487,12 @@ def main(): log_handler.setFormatter(log_formatter) logger.addHandler(log_handler) + try: + with open('/sys/kernel/debug/clear_warn_once', 'w') as f: + f.write('1\n') + except FileNotFoundError: + pass + reset_ok = True with DataCollector(args.logdir, name, args): count = count + 1