From nobody Fri Dec 19 07:46:18 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A8B7C4167B for ; Thu, 7 Dec 2023 12:22:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379243AbjLGMWn (ORCPT ); Thu, 7 Dec 2023 07:22:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232482AbjLGMWj (ORCPT ); Thu, 7 Dec 2023 07:22:39 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B06810CA for ; Thu, 7 Dec 2023 04:22:45 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB499C433C8; Thu, 7 Dec 2023 12:22:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701951764; bh=epH6N4HOQY9d/F5eZFuiUiKcD6erclTqiNFuoeHNibM=; h=From:Date:Subject:To:Cc:From; b=ZRuAepFhfUG/d4JUckztQmMS323WJgPb0oGVjoiVT16Sw9k3gd2mcP1s2X+UCQhvm TTX8vLZ/lNjgv68XatsoQiJNDp2Kmmq9H854ivI9VPmVLP9p70meAooJGYxI1LJTgL QT/RAmD1b14G3rSJqRc4372ZDLz6i5nKmz2lsxe4xSDv12Y2ByD3xiexVsFxncGrDS TOt/qKsUYnZ/laPTjMCTRn0sqo0B84C9zuiZ566wL1mJ04fGJnN8aY5gdcLCG56hkV 9aevdE7LoYOLkHTHMomf0iLxG91JcLifQyl1l9vrt/8PZHvaTouWNw3vypYTYqvEE0 ss+Dg2q8YUkIQ== From: Benjamin Tissoires Date: Thu, 07 Dec 2023 13:22:39 +0100 Subject: [PATCH] selftests/hid: fix failing tablet button tests MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20231207-b4-wip-selftests-v1-1-c4e13fe04a70@kernel.org> X-B4-Tracking: v=1; b=H4sIAA65cWUC/x3MQQ5AMBBA0avIrE2i1SKuIha0g0kE6QiSxt01l m/xfwShwCTQZhECXSy8bwkqz8AtwzYTsk8GXehS6aLG0eDNBwqt00lyCjplK+uNN7ZuIGVHoIm ff9n17/sBuP0ArGIAAAA= To: Jiri Kosina , Benjamin Tissoires , Shuah Khan , Peter Hutterer Cc: Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1701951762; l=1894; i=bentiss@kernel.org; s=20230215; h=from:subject:message-id; bh=epH6N4HOQY9d/F5eZFuiUiKcD6erclTqiNFuoeHNibM=; b=n/90PDIVzBVYmex40erDeyr8UfBLYJJvGN2LIAvfkl2wkUtPc4ZONsXa4LXWuHGuUhRNjEr3t S29RzIxWhgoCbx0SJBI78CjhJjrx8MqBr1/El5ybpfDF2e1WRSpLa54 X-Developer-Key: i=bentiss@kernel.org; a=ed25519; pk=7D1DyAVh6ajCkuUTudt/chMuXWIJHlv2qCsRkIizvFw= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org An overlook from commit 74452d6329be ("selftests/hid: tablets: add variants of states with buttons"), where I don't use the Enum... Fixes: 74452d6329be ("selftests/hid: tablets: add variants of states with b= uttons") Signed-off-by: Benjamin Tissoires Acked-by: Jiri Kosina --- Not sure what happened, but I mustn't have run the tests before sending the series, and they fail blatently. I'm deeply sorry for that, I thought these failures were fixed. Cheers, Benjamin --- tools/testing/selftests/hid/tests/test_tablet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/hid/tests/test_tablet.py b/tools/testi= ng/selftests/hid/tests/test_tablet.py index dc8b0fe9e7f3..903f19f7cbe9 100644 --- a/tools/testing/selftests/hid/tests/test_tablet.py +++ b/tools/testing/selftests/hid/tests/test_tablet.py @@ -115,7 +115,7 @@ class PenState(Enum): # we take only the highest button in account for b in [libevdev.EV_KEY.BTN_STYLUS, libevdev.EV_KEY.BTN_STYLUS2]: if bool(evdev.value[b]): - button =3D b + button =3D BtnPressed(b) =20 # the kernel tends to insert an EV_SYN once removing the tool, so # the button will be released after @@ -155,7 +155,7 @@ class PenState(Enum): if button_found: raise ValueError(f"duplicated BTN_STYLUS* in {events}") button_found =3D True - button =3D ev.code if ev.value else None + button =3D BtnPressed(ev.code) if ev.value else None =20 # the kernel tends to insert an EV_SYN once removing the tool, so # the button will be released after --- base-commit: f556aa957df8cb3e98af0f54bf1fa65f59ae47a3 change-id: 20231207-b4-wip-selftests-c1565d4d4578 Best regards, --=20 Benjamin Tissoires