Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3259335pxu; Tue, 8 Dec 2020 07:32:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJyje/5ZxJM24DZOawUlb0jNt1tzIs/wgyWn8mqRoApTCOKk59M+mXUjZ/2HGlPw5lqh5IgT X-Received: by 2002:a50:8b66:: with SMTP id l93mr12608210edl.384.1607441563174; Tue, 08 Dec 2020 07:32:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607441563; cv=none; d=google.com; s=arc-20160816; b=rnexdUkxTUZ1kSHOV9Rtv0q2bBLnZ1dPcH6nxutghB/vFgc1Pbpo70IJ7Vm24+f53R MycN2Kk3c9QtfrlrR2khsHf7M96c54TWDQKhEbhhx6pji2EMr7pFDAt4TUnyj1VvHkM0 MSqNK17r+EeynScxzHGlU8Xo3wwCc28tYKt9+DfS1wkJRzpW7++3xPRstEhiHVkzpI36 6DqL8cF5x4hXhVY69XyA1MEv0a8oLlE/CASlepErQApGLqlQHhdiae5XwoII/1CDCxJS cf1sPCS96lrluV05Eb/iS2VftJ6UAhMGpHz0yzkAZoX6xhC/E8hObQHEwg2e0uiVFWNQ 8szw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=XL4ec0XB6XSXvBGTyn+Z/xd5ScbQ55WsDd7vwhnmgSg=; b=GMek9kXUtSvOx1Ufd3oTWZO/lvVy6qd3KiJ8y4D1pBP6+7mGJCbJdakZLzj4lAxNMD I40Wn9T8ZJM7V3K6WFQiInrT4cMOt4NZLPpNiUaLjcsMxYbtDwQ350+2iJ+V2zER2YSA hdazBuPDtXJJjTAwnJXjr42gglZanCrOOLphFzPoEgXdpzyHNg38dmG/5XtRjkw6D9HF /ZSvtjxjS5TFi+FI4lIdtrbH6B1VN7I8e9KRSlBcb9kZoblqmFcRSpx+87wVj009xDz0 uGgcd8BQDuGFMSmvSZ7vw4GMwkFkrodQi4lvdtGQjtWS9OS6FnRSEFl0iJ2vFDo8ObbB OX0A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t3si10107729edt.474.2020.12.08.07.32.18; Tue, 08 Dec 2020 07:32:43 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730089AbgLHP3n (ORCPT + 99 others); Tue, 8 Dec 2020 10:29:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730016AbgLHP3n (ORCPT ); Tue, 8 Dec 2020 10:29:43 -0500 Received: from andre.telenet-ops.be (andre.telenet-ops.be [IPv6:2a02:1800:120:4::f00:15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41AADC061749 for ; Tue, 8 Dec 2020 07:29:02 -0800 (PST) Received: from ramsan.of.borg ([84.195.186.194]) by andre.telenet-ops.be with bizsmtp id 1rUy2400X4C55Sk01rUyDW; Tue, 08 Dec 2020 16:28:59 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kmevC-0090Gd-Jy; Tue, 08 Dec 2020 16:28:58 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1kmevC-0094TL-6w; Tue, 08 Dec 2020 16:28:58 +0100 From: Geert Uytterhoeven To: Greg Kroah-Hartman , Masahiro Yamada , Michal Marek , Jonathan Corbet , Arnd Bergmann Cc: linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Geert Uytterhoeven Subject: [PATCH 1/2] Documentation/kbuild: Document COMPILE_TEST dependencies Date: Tue, 8 Dec 2020 16:28:56 +0100 Message-Id: <20201208152857.2162093-2-geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201208152857.2162093-1-geert+renesas@glider.be> References: <20201208152857.2162093-1-geert+renesas@glider.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Document best practises for using COMPILE_TEST dependencies. Signed-off-by: Geert Uytterhoeven --- Documentation/kbuild/kconfig-language.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Documentation/kbuild/kconfig-language.rst b/Documentation/kbuild/kconfig-language.rst index 1cf1aebdd6cdf8fa..2b746332d8aa6bce 100644 --- a/Documentation/kbuild/kconfig-language.rst +++ b/Documentation/kbuild/kconfig-language.rst @@ -553,6 +553,17 @@ with "depends on m". E.g.:: limits FOO to module (=m) or disabled (=n). +Compile-testing +~~~~~~~~~~~~~~~ +If a config symbol has a dependency, but the code controlled by the config +symbol can still be compiled if the dependency is not met, it is encouraged to +increase build coverage by adding an "|| COMPILE_TEST" clause to the +dependency. This is especially useful for drivers for more exotic hardware, as +it allows continuous-integration systems to compile-test the code on a more +common system, and detect bugs that way. +Note that compile-tested code should avoid crashing when run on a system where +the dependency is not met. + Kconfig recursive dependency limitations ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- 2.25.1