Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18885304rwd; Wed, 28 Jun 2023 01:56:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5bGYN5ZUfdI/nQb3Q7anmIJawvylIAwy8SZ8FlYCxi2PV34bPB4hSAymn7GXf75+aVPO+2 X-Received: by 2002:a17:907:3fa3:b0:988:d841:7f90 with SMTP id hr35-20020a1709073fa300b00988d8417f90mr741322ejc.27.1687942602785; Wed, 28 Jun 2023 01:56:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687942602; cv=none; d=google.com; s=arc-20160816; b=U9W6Xtfj8Q1AZ1GJXhNLDgtnvLnRdljctC2uv3TfJ1qZB+6dt8nt/mFBoxZeJZjqv6 1xlS15orS8YrZEKZxo/PB9pyPCvRvafaHQnnTX40iVTRTNDIwBo27fn/oP9HdZoJDkLG YSsrbDaObe56ft1isbCQIER5Y3RSxg7YuFawvx9xjdX0lXxJfiSwYIvq9C8AT5LkY/K9 /apUSB1Zrp7NA444gP907L+Gu5wg/ETOTLbZfAPkUFXhSQuF6R/t0n/h1zXKUcFuIJNC JUn2Is8Y+jbZ1xiXfKOoQBhhnwpTueEe4m+EeJ1XiTEzKxJO1VS442f4jMKbOyejZS7P k4yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Db2b1drcKZ8bYZGtiVSlYoLfHEvPC00Fe2KRsKbkAow=; fh=IlIj3lK4o8wbwnO/zVJZLq95v96375T0j/kH+P2X+/g=; b=teqYxhdUnwBFhqBkN+8PihTANshLG5PfpiRRRZeX2UO5+8/2/xv+2vxBaba0O2G47v jKPWGxldXNsH4t5sJQZ7Yk1OPuuJ6LqU85k0ZS8YETdpdjcv96HnlNW8aN5zdPrjiKSA 9fdeIj6Hl17g/FOg7lO7SEav9QripW6wIn/52GzJo3RhF0jqtJsyWZRBQUxthEN77r7x 7E8VWXcRveW7Us7mLsSdBeeown7FPkB+s0UzU3JeSxEPGyrv4BO3OdTGJAJoXweL/qf1 PRM0OQWSM+HnPZoG2FpaONtAh99XH9WKo0SYFdLoE8myHR4FaRx0+vnZMlsCUvs/0uNp gl5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="oyHT/PBT"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bt24-20020a170906b15800b0098d9dfee9c7si5742405ejb.493.2023.06.28.01.56.16; Wed, 28 Jun 2023 01:56:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="oyHT/PBT"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232167AbjF1IcL (ORCPT + 99 others); Wed, 28 Jun 2023 04:32:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234842AbjF1I1z (ORCPT ); Wed, 28 Jun 2023 04:27:55 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02B201FE8; Wed, 28 Jun 2023 01:21:46 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-51d80c5c834so1258115a12.1; Wed, 28 Jun 2023 01:21:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687940504; x=1690532504; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Db2b1drcKZ8bYZGtiVSlYoLfHEvPC00Fe2KRsKbkAow=; b=oyHT/PBTrBJOWW9uSHX8JHLMxyniJfcZ20guKjWbvOGKzO07bjOzXZFrOhoYRgOruS C/w2IkHsAr1nqtgTbjtHhkWyaej1J1xS8vZxkZX0wDgwMXgSDevYNLuZfH2lHFMgwAUr 5Nzc4lHSRVNkKoS+pA1NqKw7PXagsxvmbmEG63Ctbwga4zmEbIbfDYc0nh9czC1NkU06 4EhUluL6BuFXB6HQlfcf7eq1k7WOsr+AOMp5s5W1J9Lvu7tloO4dwpj+IZjZDzS1ehEa H3g2f5DdpcsbS1m33wP1amtox5rbdWKvImLDo83w9bsxmTvUrYTn7aonknHD7f31dhot iPYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687940504; x=1690532504; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Db2b1drcKZ8bYZGtiVSlYoLfHEvPC00Fe2KRsKbkAow=; b=PxBey6orXJjXs+3eKKr1c1UzkJwwAXxCuh3kR0ZAotG9Yqt0sOJoKfGNJuFU7osS3G 3eqe1REeGqzNm3kLGA+DmiD/W2xHYmJZRyECvZha7dm6w5eet11by7Df3p8Me9qa9mpP NkrmAibBD1GIcWVFymOuMktttrFMUqKSXrgDZhtrVZUyphZRzyOqzx+uFFBAnBp5hsoR I/fljUpFV55vgi8QFJnBEB9/ad5vRHDMwD5ovdVYb1/mAxWzRBZW6k5LRt97ZZRpmNZ7 EUcde3cHqnNGsY4QbgvR2XAVj0HGmlCycGB5/BoLaNCTfkKKnZhpUWLZ2V8LbWK13b0j xc0w== X-Gm-Message-State: AC+VfDwyoVnXBgeJMD56tXDq6SmS7YMH4fi/lN2LLTghNnFGJJVYxMTc 10JQl9EpfCQOUfn+5vVUuzuQiMZBgGx8nYRQMJY= X-Received: by 2002:aa7:c388:0:b0:514:a21b:f137 with SMTP id k8-20020aa7c388000000b00514a21bf137mr643963edq.6.1687940504022; Wed, 28 Jun 2023 01:21:44 -0700 (PDT) MIME-Version: 1.0 References: <20230625123037.8384-1-dangel101@gmail.com> In-Reply-To: <20230625123037.8384-1-dangel101@gmail.com> From: Enric Balletbo Serra Date: Wed, 28 Jun 2023 10:21:31 +0200 Message-ID: Subject: Re: [PATCH v2] selftests/input: add tests for the EVIOCSABS ioctl To: Dana Elfassy Cc: shuah@kernel.org, eballetbo@kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Dana Elfassy Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dana, Thank you for the patch. Missatge de Dana Elfassy del dia dg., 25 de juny 2023 a les 14:31: > > This patch introduces two tests for the EVIOCSABS ioctl. The first one > checks that the ioctl fails when the EV_ABS bit was not set, and the > second one just checks that the normal workflow for this ioctl > succeeds. > > Signed-off-by: Dana Elfassy Using gcov i see that this covers the code path when an EVIOCSABS ioctl is called, so Reviewed-by: Enric Balletbo i Serra > --- > This patch depends on '[v3] selftests/input: Introduce basic tests for evdev ioctls' [1] sent to the ML. > [1] https://patchwork.kernel.org/project/linux-input/patch/20230607153214.15933-1-eballetbo@kernel.org/ > > tools/testing/selftests/input/evioc-test.c | 23 ++++++++++++++++++++++ > 1 file changed, 23 insertions(+) > > diff --git a/tools/testing/selftests/input/evioc-test.c b/tools/testing/selftests/input/evioc-test.c > index 4c0c8ebed378..7afd537f0b24 100644 > --- a/tools/testing/selftests/input/evioc-test.c > +++ b/tools/testing/selftests/input/evioc-test.c > @@ -279,4 +279,27 @@ TEST(eviocgrep_get_repeat_settings) > selftest_uinput_destroy(uidev); > } > > +TEST(eviocsabs_set_abs_value_limits) > +{ > + struct selftest_uinput *uidev; > + struct input_absinfo absinfo; > + int rc; > + > + // fail test on dev->absinfo > + rc = selftest_uinput_create_device(&uidev), -1; > + ASSERT_EQ(0, rc); > + ASSERT_NE(NULL, uidev); > + rc = ioctl(uidev->evdev_fd, EVIOCSABS(0), &absinfo); > + ASSERT_EQ(-1, rc); > + selftest_uinput_destroy(uidev); > + > + // ioctl normal flow > + rc = selftest_uinput_create_device(&uidev, EV_ABS, -1); > + ASSERT_EQ(0, rc); > + ASSERT_NE(NULL, uidev); > + rc = ioctl(uidev->evdev_fd, EVIOCSABS(0), &absinfo); > + ASSERT_EQ(0, rc); > + selftest_uinput_destroy(uidev); > +} > + > TEST_HARNESS_MAIN > -- > 2.41.0 >