Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4682498rdh; Wed, 29 Nov 2023 07:57:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IF3rxEcJMX085MlCRJxc8D1sux1UUonB9NJgnABFdk0K0JI8EN6N/S58nYFIZPYUBLnJ6/k X-Received: by 2002:a05:6820:160c:b0:58d:9b89:8b20 with SMTP id bb12-20020a056820160c00b0058d9b898b20mr10910901oob.7.1701273431871; Wed, 29 Nov 2023 07:57:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701273431; cv=none; d=google.com; s=arc-20160816; b=mhr973BnArXWepy1kF4Men6kU4y5gK/gO9AcDX84SjFjic5cfZi7rQw6Htm7/sEHDa HIq36qDiAD3Thf3BMI0Bvb5uBe22wTBjsOAzLHbLx4GzUN7FBy4exZSbx4nfLd2vFmnQ 5vfL62yeNd0G2ZJjAuysdzxSd9FBXiub4n9mt4qDwUfptKbviLuMAZ7l8f69YyAHQevW HKKcsHlZFcQi4zoMRN9aD0M75YJvB4VNgeqp6/EnsGv3lU4e+oama75W1SDhQ0crWXhw nFmS82H6KameNii6p07mExvfVaZM6jg//mG0qMVYx9ztuvfi9LuvgM/9MXGXGwdqdki6 KzLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=lp8xfGN4sctNDZ6CGyEl6Wlm8lolNidgh9E6dsRFev8=; fh=M/4CRKlsQR53kOvbvsHfGDOrpcvBUt/h3Rh4tB3zkdA=; b=lxhYKbHfOnbpMopRvPYFZ47nfaCPH/FzAfFbut6tigC6qX3P1rjfdmAdPbEUFFzS7a rNfCACDSem7DMMxDrBYuynUJopD06gU1vzmvDDpIrVgF3MzSAYYsQfoRXSOvVl9dRh+o KDGQ9JO3GGXsaKdCBjZLRSd548RSS+yabrVmeOwuu09bbcIXnkEsAEmOchAGGJXALDKw +r8sOa5+D/0QuJTUzBFjhTYh/UFbHJzsexpUzlH7Q/I7ybeQ213EeoQauWyYx2ol6YOs cJIVxdAurKdhkUBfAsanMHlm/+3sAtqQV0VdOvYlKFwPH5pLfAUK54ox5rVbq1d+yFUg BEGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NZpcLgMO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id u5-20020a6540c5000000b0059f0cebd04csi14502307pgp.722.2023.11.29.07.57.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 07:57:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NZpcLgMO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 642ED8035137; Wed, 29 Nov 2023 07:57:08 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235048AbjK2PZl (ORCPT + 99 others); Wed, 29 Nov 2023 10:25:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234997AbjK2PZR (ORCPT ); Wed, 29 Nov 2023 10:25:17 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E90A61719 for ; Wed, 29 Nov 2023 07:25:17 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8DBB9C433CA; Wed, 29 Nov 2023 15:25:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701271517; bh=XtPjsU5+IxLgDeg42cN6iOZ79VywBRfgVyknH2ur/4A=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=NZpcLgMO9RqQMQczNI7n38lEze9h5miaSq4hI89SWSIpk2HAhAo9CDwIqMy5O7lxt 5bfCuMKD9RpgIoLO6lEt4cOjT87ODQrApuUOHJ2XhKs7zcV1M83MJljjlVgwUFURj8 UdYKKMlThyzVjWYhbBbFDTsUIHhxLTCNw61Y++DDOzokm4mvuja1onzdvhkOcNADVb aq9kD4Tg9gHNQisSd0Vv9HyEa9YVbG3B/yen1428IcJxG5mUhp4eNLG3m+1mrrce+C LxzTK3uVtOx/BvCFBDyPJKsme4n9mf94OKvP2FY9LhuTaHRcpasx3gopkZu3ARvUn9 IRADik8d2NnIA== From: Benjamin Tissoires Date: Wed, 29 Nov 2023 16:24:33 +0100 Subject: [PATCH 08/12] selftests/hid: tablets: set initial data for tilt/twist MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231129-wip-selftests-v1-8-ba15a1fe1b0d@kernel.org> References: <20231129-wip-selftests-v1-0-ba15a1fe1b0d@kernel.org> In-Reply-To: <20231129-wip-selftests-v1-0-ba15a1fe1b0d@kernel.org> To: Jiri Kosina , Benjamin Tissoires , Shuah Khan , Peter Hutterer Cc: linux-input@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Tissoires X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1701271499; l=1586; i=bentiss@kernel.org; s=20230215; h=from:subject:message-id; bh=XtPjsU5+IxLgDeg42cN6iOZ79VywBRfgVyknH2ur/4A=; b=CPZpA+NacCCwdjXGsWjew6pe/NmSHolAtr5gZ0Tj4ZfJt7ZIeCAFk1zsMRYilllE3NU0JJ383 cvHqBfw/8PtAUGPbAOezZ4JgNTtWrxmh7JyiNl/HAScTMAnJQ5iLWgh X-Developer-Key: i=bentiss@kernel.org; a=ed25519; pk=7D1DyAVh6ajCkuUTudt/chMuXWIJHlv2qCsRkIizvFw= X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 29 Nov 2023 07:57:08 -0800 (PST) Avoids getting a null event when these usages are set Signed-off-by: Benjamin Tissoires --- tools/testing/selftests/hid/tests/test_tablet.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/testing/selftests/hid/tests/test_tablet.py b/tools/testing/selftests/hid/tests/test_tablet.py index f93dfbb2a3e5..83f6501fe984 100644 --- a/tools/testing/selftests/hid/tests/test_tablet.py +++ b/tools/testing/selftests/hid/tests/test_tablet.py @@ -276,9 +276,9 @@ class Pen(object): self.barrelswitch = False self.invert = False self.eraser = False - self.x_tilt = 0 - self.y_tilt = 0 - self.twist = 0 + self.xtilt = 1 + self.ytilt = 1 + self.twist = 1 self._old_values = None self.current_state = None @@ -292,8 +292,8 @@ class Pen(object): "width", "height", "twist", - "x_tilt", - "y_tilt", + "xtilt", + "ytilt", ]: setattr(self, i, getattr(self._old_values, i)) @@ -361,8 +361,8 @@ class PenDigitizer(base.UHIDTestDevice): pen.height = 0 pen.invert = False pen.eraser = False - pen.x_tilt = 0 - pen.y_tilt = 0 + pen.xtilt = 0 + pen.ytilt = 0 pen.twist = 0 elif state == PenState.PEN_IS_IN_RANGE: pen.tipswitch = False -- 2.41.0