Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4970895pxu; Tue, 13 Oct 2020 11:21:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtWzKoTRccdjFnE4zDPpo2wwKcwBIeYhe9EfmlMIKkbNgbDm+J/EcDYoGgixSiyGDXA+eK X-Received: by 2002:a05:6402:31ac:: with SMTP id dj12mr931748edb.20.1602613314909; Tue, 13 Oct 2020 11:21:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602613314; cv=none; d=google.com; s=arc-20160816; b=o5dfpjgm210BwCKfcWXA4tfzh4frkmztKMguQF2yaTImy/qW0MS+aGNxa2WeIGlgXj 77eW6z1buJxxUWrsbC9B5CTzT/4+Zx9RrPhagRbXUnmT9NcqWIV/CqKpHQPu4+fiB0ol TrCEJdPVB/7FVRbHLOJTqwtffNhQgS8+EjKh9xTJhInJ5hA+NGEY+eklAvie2YzIFuQf ZW94kqX1yujIFCYaik7BLQ2XkIJRmT60GX9e4Rk1HXCJurRSPlO2H1tvYdvFOUqQ5UdK BUqQD44d63SBYkyEhuwXjNnJ5nqFh4OK2lEodFYm3LJldBhEWjCzmvWTRy1peJ20mHEJ UP0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=aHrNIi6Spaa8PTVDo9sFuO7JRmGUmYOw/fAbYNNAQdY=; b=GKQatYjvdDtCLMt06LmASOsxfduIjqvtAI3jrBc7kb12SqlW4pD1B+MkI+6UQz+3+b Ju6T1fmXPTZwAp2LQ/L+uxDXhQiuVKsonisbm5i7YPngAvV61iPYUCWz346Tk7sK2jxx 8GKt0888QXJGHybxhZO8nxDabdOO3VGr5+lRTYw8uk/BuTAq1hGshvDpRjSYUp/8zyPc 17FL6YB9DYL5CvTrPdnE5cDJWBYR2+rtt2yJFWFUME1/nye0o4HFrhFfP4NpPX//tdSd K+jE5b4lNA6oI3orqCta6+Qnif0vgbjBIiiLF1bnMZagfqB8wn0t/lB/kpDszFLVbZEI 7uFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=RQfbt1qj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f15si413772edr.521.2020.10.13.11.21.00; Tue, 13 Oct 2020 11:21:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=RQfbt1qj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389588AbgJMGiP (ORCPT + 99 others); Tue, 13 Oct 2020 02:38:15 -0400 Received: from smtp-fw-9102.amazon.com ([207.171.184.29]:23530 "EHLO smtp-fw-9102.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389433AbgJMGiO (ORCPT ); Tue, 13 Oct 2020 02:38:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1602571094; x=1634107094; h=from:to:cc:subject:date:message-id:mime-version; bh=aHrNIi6Spaa8PTVDo9sFuO7JRmGUmYOw/fAbYNNAQdY=; b=RQfbt1qjlcVA+yuLRiiMBYMLENj2h/NK+eCtbXquvUBEsly8wpKyod1O qh/B6Pao7Y/HP1ToBels6fD5DQFhWi9yahTRVVCL8rcpLAtSqwGnl4nfi gJTmOxzxTHSbx1QYIB1KMMUw9gCBBWgq8g2ESer5uiM6O+97bX0XczAUp E=; X-IronPort-AV: E=Sophos;i="5.77,369,1596499200"; d="scan'208";a="83990110" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-1d-474bcd9f.us-east-1.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP; 13 Oct 2020 06:38:08 +0000 Received: from EX13D31EUB001.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan3.iad.amazon.com [10.40.163.38]) by email-inbound-relay-1d-474bcd9f.us-east-1.amazon.com (Postfix) with ESMTPS id 212CCA1ECF; Tue, 13 Oct 2020 06:38:04 +0000 (UTC) Received: from u3f2cd687b01c55.ant.amazon.com (10.43.160.27) by EX13D31EUB001.ant.amazon.com (10.43.166.210) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 13 Oct 2020 06:38:00 +0000 From: SeongJae Park To: CC: SeongJae Park , , , , , , Subject: [PATCH v2] Documentation: kunit: Update Kconfig parts for KUNIT's module support Date: Tue, 13 Oct 2020 08:37:43 +0200 Message-ID: <20201013063743.32179-1-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.160.27] X-ClientProxiedBy: EX13D50UWA004.ant.amazon.com (10.43.163.5) To EX13D31EUB001.ant.amazon.com (10.43.166.210) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: SeongJae Park If 'CONFIG_KUNIT=m', letting kunit tests that do not support loadable module build depends on 'KUNIT' instead of 'KUNIT=y' result in compile errors. This commit updates the document for this. Fixes: 9fe124bf1b77 ("kunit: allow kunit to be loaded as a module") Signed-off-by: SeongJae Park --- Changes from v1 (https://lore.kernel.org/linux-kselftest/20201012105420.5945-1-sjpark@amazon.com/): - Fix a typo (Marco Elver) --- Documentation/dev-tools/kunit/start.rst | 2 +- Documentation/dev-tools/kunit/usage.rst | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-tools/kunit/start.rst index d23385e3e159..454f307813ea 100644 --- a/Documentation/dev-tools/kunit/start.rst +++ b/Documentation/dev-tools/kunit/start.rst @@ -197,7 +197,7 @@ Now add the following to ``drivers/misc/Kconfig``: config MISC_EXAMPLE_TEST bool "Test for my example" - depends on MISC_EXAMPLE && KUNIT + depends on MISC_EXAMPLE && KUNIT=y and the following to ``drivers/misc/Makefile``: diff --git a/Documentation/dev-tools/kunit/usage.rst b/Documentation/dev-tools/kunit/usage.rst index 3c3fe8b5fecc..b331f5a5b0b9 100644 --- a/Documentation/dev-tools/kunit/usage.rst +++ b/Documentation/dev-tools/kunit/usage.rst @@ -556,6 +556,11 @@ Once the kernel is built and installed, a simple ...will run the tests. +.. note:: + Note that you should make your test depends on ``KUNIT=y`` in Kconfig if the + test does not support module build. Otherwise, it will trigger compile + errors if ``CONFIG_KUNIT`` is ``m``. + Writing new tests for other architectures ----------------------------------------- -- 2.17.1