From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.3 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A0FAC73C6D for ; Wed, 10 Jul 2019 07:19:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4276220838 for ; Wed, 10 Jul 2019 07:19:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="l6WF16GV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726391AbfGJHTU (ORCPT ); Wed, 10 Jul 2019 03:19:20 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:39112 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726245AbfGJHTT (ORCPT ); Wed, 10 Jul 2019 03:19:19 -0400 Received: by mail-pg1-f194.google.com with SMTP id u17so777477pgi.6 for ; Wed, 10 Jul 2019 00:19:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jfz7M1UfeMHHXZWoXYgXDdb2h4DdykfBMsEUwpNEPMQ=; b=l6WF16GVYe5eCc/5x8O8KdIpdGxyu4cFn2VT370ERVLkliFZoRrSfvp79LhBQiNSIN Fc3VEBYfnK22TfTFupWFCOy7wIIOmCBSmWzp151VVHjXiu08YEAd1cUyMwfMhn+dU/bF UHlZhZc0wk0wQTnNlXcS52uWXZ0GmfQuDPOS9e4OHx48QXa6/or/tZHQSVGwKXE40j8J tydITPKv4HnEgptGj8+2KN4wvn2CgD7bTL5YD2VkAUKcTMoyzgx29qn2jFdugUlBv9P8 +GIsXjY1xdI2IPhRGGizyMRas0HBWbQ4T3n7MZP9ykXTcG22rpDfaxe6v7izwrk4jBVj l8OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jfz7M1UfeMHHXZWoXYgXDdb2h4DdykfBMsEUwpNEPMQ=; b=gw7g16E8jzXunjnMhOnufDvFhzu3F2Lf3OPglYqWEpxQmvE1XI/l4CzzjfwM9rwhWH YfP2frZk6cb0Us3+jB/v/3yUXsM1S9DMsjQXTz7pFhyGhQiN7hZCDBRSbcUQiYVz+2hx MsmFAdAZrN+qmZ/aH4Klm+mcQ8ELlL+fxs/9kZ5N4V0mZEjbPizAItogH4Cp9tByrMMF 5d+nXlM3xO+yuy9G8qSIclWvLYdC6SfOH8hULJrezd2oCtDndv/A+DsdQYbD4+Yj3p0j Gme7yqG3NnSLFskPGgDFWj9GsWeKpmACdrFqqhKmxv7mW/M+d9iscn95PhDAcD1sT/UX z76w== X-Gm-Message-State: APjAAAVzUKScfh6YesRzyny3L1M5qT1cNwBIY/8oT0i9IxtndE6uCxtI qNFDhWSnri1oRRQ+v2gECX5yFEg6L7WycY2FYxmn4A== X-Google-Smtp-Source: APXvYqxygjuZUTtP3o1i+spSO/ODX76iUOPUnBSEPfKtnKohaqyGP7q59QAPXICI+tZgCfUcyvNAo+y5G+f5zV4sog8= X-Received: by 2002:a17:90a:ab0d:: with SMTP id m13mr4975325pjq.84.1562743158492; Wed, 10 Jul 2019 00:19:18 -0700 (PDT) MIME-Version: 1.0 References: <20190709063023.251446-1-brendanhiggins@google.com> <20190709063023.251446-7-brendanhiggins@google.com> In-Reply-To: From: Brendan Higgins Date: Wed, 10 Jul 2019 00:19:06 -0700 Message-ID: Subject: Re: [PATCH v7 06/18] kbuild: enable building KUnit To: Masahiro Yamada Cc: Frank Rowand , Greg Kroah-Hartman , Josh Poimboeuf , Kees Cook , Kieran Bingham , "Luis R. Rodriguez" , "Peter Zijlstra (Intel)" , Rob Herring , Stephen Boyd , "Cc: Shuah Khan" , "Theodore Ts'o" , DTML , dri-devel , kunit-dev@googlegroups.com, "open list:DOCUMENTATION" , linux-fsdevel@vger.kernel.org, Linux Kbuild mailing list , Linux Kernel Mailing List , "open list:KERNEL SELFTEST FRAMEWORK" , linux-nvdimm , linux-um@lists.infradead.org, Sasha Levin , Tim Bird , Amir Goldstein , Dan Carpenter , Daniel Vetter , Jeff Dike , Joel Stanley , Julia Lawall , Kevin Hilman , Knut Omang , Logan Gunthorpe , Michael Ellerman , Petr Mladek , Randy Dunlap , Richard Weinberger , David Rientjes , Steven Rostedt , wfg@linux.intel.com, Michal Marek Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Tue, Jul 9, 2019 at 9:00 PM Masahiro Yamada wrote: > > On Tue, Jul 9, 2019 at 3:34 PM Brendan Higgins > wrote: > > > > KUnit is a new unit testing framework for the kernel and when used is > > built into the kernel as a part of it. Add KUnit to the root Kconfig and > > Makefile to allow it to be actually built. > > > > Signed-off-by: Brendan Higgins > > Cc: Masahiro Yamada > > Cc: Michal Marek > > Reviewed-by: Greg Kroah-Hartman > > Reviewed-by: Logan Gunthorpe > > --- > > Kconfig | 2 ++ > > Makefile | 2 +- > > 2 files changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/Kconfig b/Kconfig > > index 48a80beab6853..10428501edb78 100644 > > --- a/Kconfig > > +++ b/Kconfig > > @@ -30,3 +30,5 @@ source "crypto/Kconfig" > > source "lib/Kconfig" > > > > source "lib/Kconfig.debug" > > + > > +source "kunit/Kconfig" > > diff --git a/Makefile b/Makefile > > index 3e4868a6498b2..60cf4f0813e0d 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -991,7 +991,7 @@ endif > > PHONY += prepare0 > > > > ifeq ($(KBUILD_EXTMOD),) > > -core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/ > > +core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/ kunit/ > > > > vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ > > $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ > > -- > > 2.22.0.410.gd8fdbe21b5-goog > > > This is so trivial, and do not need to get ack from me. Oh, sorry about that. > Just a nit. > > > When CONFIG_KUNIT is disable, is there any point in descending into kunit/ ? > > core-$(CONFIG_KUNIT) += kunit/ > > ... might be useful to skip kunit/ entirely. Makes sense. I just sent out a new change that does this. Thanks! > If you look at the top-level Makefile, some entries are doing this: > > > init-y := init/ > drivers-y := drivers/ sound/ > drivers-$(CONFIG_SAMPLES) += samples/ > drivers-$(CONFIG_KERNEL_HEADER_TEST) += include/ > net-y := net/ > libs-y := lib/ > core-y := usr/ > > > > > > -- > Best Regards > Masahiro Yamada