Message ID | 36ddf432f0f46530875fa15f002012c921a380a3.1683022021.git.geert+renesas@glider.be |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp505700vqo; Tue, 2 May 2023 03:40:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5tMmnzaf5grOlLVcWBza+pFARFC0CoDGDeOH4ak/V5DQq/jg6+VJyxhJfLtQoO67x/3OUr X-Received: by 2002:a17:90b:384d:b0:24b:7618:2d16 with SMTP id nl13-20020a17090b384d00b0024b76182d16mr17804733pjb.31.1683024001122; Tue, 02 May 2023 03:40:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683024001; cv=none; d=google.com; s=arc-20160816; b=glRsgOL79mWPpljssMhIDChWTyECafNMMJOmNgWIfAkIDVJlEG2rnWBmELJ3b2njti HffNJIZUwZKvoXNJGSxELdZH7KWc4fKpouR7ysn9TF4uXe7p+F3kocaTJ74nmr/u5Pof ZUFuu7+2D7AtCtKFV0xu2mIYHZxqLB+71lhSt8tzYXuwYjA4OGbC+PR3FSPb9SxFnbVl LSziz8A180cqOACyfukLsCYMoViNs5qqq8/9gycux9Bm0HDFpea5KPHZ+hSLhlUqBS+K NY2H6Wl+X0B+dyrI7jIZ9od/k24ZhIA/VgJPsQTKsuW9k05zsveNYL7DHEF5iy9Vf4Xj 3wJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=66LRaqKW1K34XDh6Kl4pTd/V1jtm0hj4Ww5GAuVA1u0=; b=czXFF+/vOGxX6rJwdPNslMlSVV77NvE1g24jGc5iqJmBBPxO9melcVxWLWhsyQcnsX Af2U0+tu0dtpFU4Po8qegIsnh7Sl/8+IYaDsTYYjHfbL3BjsPBoV9+ggqk5TtitEz0jV d0+n6rYJGttUakOCnGQmpty9MJLr2e0EufbnIHINBrq4O7sYv/ys3CgUrQqWNpV6kdDu C0JIVEVT8jPcTpMiSHBVvkO3wEN9Nf2bMeXfvbGwDCGAeYSYpfTjzbCx6Je/u+O/toud soaoMViXEw+dZQPoc6AVzIvML9Cr7BCGbza6zOJQ4ek57qJ0LUstTUl+MQs4Uhe5NuO8 +FYQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u19-20020a656713000000b0051f349be47csi30289683pgf.255.2023.05.02.03.39.48; Tue, 02 May 2023 03:40:01 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233719AbjEBKJS (ORCPT <rfc822;rbbytesnap@gmail.com> + 99 others); Tue, 2 May 2023 06:09:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229601AbjEBKJR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 2 May 2023 06:09:17 -0400 Received: from laurent.telenet-ops.be (laurent.telenet-ops.be [IPv6:2a02:1800:110:4::f00:19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D5B51BC7 for <linux-kernel@vger.kernel.org>; Tue, 2 May 2023 03:09:16 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed30:f07a:92a2:297:162b]) by laurent.telenet-ops.be with bizsmtp id rm9D2900A5FQxRj01m9Dcf; Tue, 02 May 2023 12:09:14 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from <geert@linux-m68k.org>) id 1ptmwX-000ylh-Ag; Tue, 02 May 2023 12:09:13 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from <geert@linux-m68k.org>) id 1ptmwb-00AtKF-Ao; Tue, 02 May 2023 12:09:13 +0200 From: Geert Uytterhoeven <geert+renesas@glider.be> To: Jiri Kosina <jikos@kernel.org>, Benjamin Tissoires <benjamin.tissoires@redhat.com>, Daniel Latypov <dlatypov@google.com>, =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= <jose.exposito89@gmail.com>, Brendan Higgins <brendan.higgins@linux.dev>, David Gow <davidgow@google.com> Cc: linux-input@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, Geert Uytterhoeven <geert+renesas@glider.be> Subject: [PATCH] HID: uclogic: Modular KUnit tests should not depend on KUNIT=y Date: Tue, 2 May 2023 12:08:59 +0200 Message-Id: <36ddf432f0f46530875fa15f002012c921a380a3.1683022021.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764778575392004221?= X-GMAIL-MSGID: =?utf-8?q?1764778575392004221?= |
Series |
HID: uclogic: Modular KUnit tests should not depend on KUNIT=y
|
|
Commit Message
Geert Uytterhoeven
May 2, 2023, 10:08 a.m. UTC
While KUnit tests that cannot be built as a loadable module must depend
on "KUNIT=y", this is not true for modular tests, where it adds an
unnecessary limitation.
Fix this by relaxing the dependency to "KUNIT".
Fixes: 08809e482a1c44d9 ("HID: uclogic: KUnit best practices and naming conventions")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/hid/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Tue, 2 May 2023 at 18:09, Geert Uytterhoeven <geert+renesas@glider.be> wrote: > > While KUnit tests that cannot be built as a loadable module must depend > on "KUNIT=y", this is not true for modular tests, where it adds an > unnecessary limitation. > > Fix this by relaxing the dependency to "KUNIT". > > Fixes: 08809e482a1c44d9 ("HID: uclogic: KUnit best practices and naming conventions") > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> > --- This works here, and I definitely agree we should get rid of these unnecessary constraints. Let me know if this should go in via the kselftest/kunit tree, or if it makes sense to take this via input? Reviewed-by: David Gow <davidgow@google.com> Cheers, -- David > drivers/hid/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig > index 4ce012f83253ec9f..b977450cac75265d 100644 > --- a/drivers/hid/Kconfig > +++ b/drivers/hid/Kconfig > @@ -1285,7 +1285,7 @@ config HID_MCP2221 > > config HID_KUNIT_TEST > tristate "KUnit tests for HID" if !KUNIT_ALL_TESTS > - depends on KUNIT=y > + depends on KUNIT > depends on HID_BATTERY_STRENGTH > depends on HID_UCLOGIC > default KUNIT_ALL_TESTS > -- > 2.34.1 >
On Thu, May 04, 2023 at 02:04:18PM +0800, David Gow wrote: > On Tue, 2 May 2023 at 18:09, Geert Uytterhoeven <geert+renesas@glider.be> wrote: > > > > While KUnit tests that cannot be built as a loadable module must depend > > on "KUNIT=y", this is not true for modular tests, where it adds an > > unnecessary limitation. > > > > Fix this by relaxing the dependency to "KUNIT". > > > > Fixes: 08809e482a1c44d9 ("HID: uclogic: KUnit best practices and naming conventions") > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> > > --- > > This works here, and I definitely agree we should get rid of these > unnecessary constraints. > > Let me know if this should go in via the kselftest/kunit tree, or if > it makes sense to take this via input? > > Reviewed-by: David Gow <davidgow@google.com> > > Cheers, > -- David > > > drivers/hid/Kconfig | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig > > index 4ce012f83253ec9f..b977450cac75265d 100644 > > --- a/drivers/hid/Kconfig > > +++ b/drivers/hid/Kconfig > > @@ -1285,7 +1285,7 @@ config HID_MCP2221 > > > > config HID_KUNIT_TEST > > tristate "KUnit tests for HID" if !KUNIT_ALL_TESTS > > - depends on KUNIT=y > > + depends on KUNIT Tested here as well with different configurations for the UCLogic driver and it is working. Reviewed-by: José Expósito <jose.exposito89@gmail.com>
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 4ce012f83253ec9f..b977450cac75265d 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig @@ -1285,7 +1285,7 @@ config HID_MCP2221 config HID_KUNIT_TEST tristate "KUnit tests for HID" if !KUNIT_ALL_TESTS - depends on KUNIT=y + depends on KUNIT depends on HID_BATTERY_STRENGTH depends on HID_UCLOGIC default KUNIT_ALL_TESTS