Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp448417yba; Sat, 4 May 2019 05:53:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrpU1v2uRemcARaLp6J2vXwGKm0G1ayIn0dLh2x4w00mktJkett3n3xeKxww+PfM86/5n9 X-Received: by 2002:a63:fb58:: with SMTP id w24mr18524875pgj.444.1556974436899; Sat, 04 May 2019 05:53:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556974436; cv=none; d=google.com; s=arc-20160816; b=x3yHX8Q7wEN+BKv1llg4nMkMLsT7KGtNgfQsBwzs5cQ/QdSNkm1SH96NdRzFv85r1L 7GgmuKR1URGdnbh95/rVz3JN3ie/byMY6RRMfauHAbNwcFT0alkwVvi2zzIawD3s8I9d lUSvEzUZqYl9e2+s9JwEDalgRAcXXPhaY6RMEnvug+l8pYJ3ZgA5IGjp+MNvDr5xtnuT 3d6D6ZekNnhCU5GQdo4ApOFrVCcLirBbWWC42rlHYmdSTIr/lVP/ucwTbZCyb6LghwbE VFR2Kz/UBAZqWnwAz9+1RDIlQ/aC6nnWYgF3Iznfy1KSrhVA9yqy27z4+UXr2/00W412 1YnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=CTM+LWu3C1ukDtFeRqXCh1ib+XgP9jOZ1NL0Svt7cfw=; b=JA7vceC00ei9BGuFxi8mGQvLgso1Cp7xA2O+GrodXnd4r2u030+Y1UHaHWsg9aqqks Ce9X6j/Kq/QE8+IhO3sYxajy4k+JeZ3JgJM3be+JDfzI53//0wsuDERrvlxGBqRlV1G2 TyCTfNO85RT0iiJJ4PaofxAnATWmWfxzw3GY/WqkhTOKEPpmuKs1f0YDfrpaqmD60XMF 2DjDHpUG/4mHZBTstEb4hKhRs7Hg0EGZ82DORHDMVQFXoKqctIWPNSmEuees/YpZiWRG JafJu+po+Y42yUEKeDqLsRa0TuP6FsPrGVQHHDm5fh59yHrFwyaNKrPzt4YsF8LhWAvq cBRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RMn5lzZL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n59si7222077plb.176.2019.05.04.05.53.11; Sat, 04 May 2019 05:53:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RMn5lzZL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727327AbfEDKkQ (ORCPT + 99 others); Sat, 4 May 2019 06:40:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:44018 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725981AbfEDKkP (ORCPT ); Sat, 4 May 2019 06:40:15 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 21B9B206DF; Sat, 4 May 2019 10:40:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556966414; bh=ZtaXllWS1pW5iu83jiogyXoGhA2z0cHfZWqL2iOl0tk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RMn5lzZLL3HFn059n+mYYbCZCfCFSbJL0BubXf+7IIzwGpN3fTwhTfeyIKdjim/HM zSpglcbIOjRyWHBccdUctPLb1/x4vk8bwpbvSIIaVSe3FuovZlhDX5c5EOmjT62X7z PNcd1lmo3U/hgtHtLZnjopNCJ8osmB6ssQVrxqhc= Date: Sat, 4 May 2019 12:40:12 +0200 From: Greg KH To: Brendan Higgins Cc: "Bird, Timothy" , Frank Rowand , Kees Cook , Kieran Bingham , Luis Chamberlain , Rob Herring , Stephen Boyd , shuah , devicetree , dri-devel , kunit-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kbuild@vger.kernel.org, Linux Kernel Mailing List , linux-kselftest@vger.kernel.org, linux-nvdimm , linux-um@lists.infradead.org, Sasha Levin , Amir Goldstein , Dan Carpenter , Dan Williams , Daniel Vetter , Jeff Dike , Joel Stanley , Julia Lawall , Kevin Hilman , Knut Omang , Logan Gunthorpe , Michael Ellerman , Petr Mladek , Richard Weinberger , David Rientjes , Steven Rostedt , wfg@linux.intel.com, Iurii Zaikin Subject: Re: [PATCH v2 16/17] kernel/sysctl-test: Add null pointer test for sysctl.c:proc_dointvec() Message-ID: <20190504104012.GA1478@kroah.com> References: <20190501230126.229218-1-brendanhiggins@google.com> <20190501230126.229218-17-brendanhiggins@google.com> <20190502110347.GE12416@kroah.com> <20190503064241.GC20723@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 03, 2019 at 04:41:10PM -0700, Brendan Higgins wrote: > > On Thu, May 02, 2019 at 11:45:43AM -0700, Brendan Higgins wrote: > > > On Thu, May 2, 2019 at 11:15 AM wrote: > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Greg KH > > > > > > > > > > On Wed, May 01, 2019 at 04:01:25PM -0700, Brendan Higgins wrote: > > > > > > From: Iurii Zaikin > > > > > > > > > > > > KUnit tests for initialized data behavior of proc_dointvec that is > > > > > > explicitly checked in the code. Includes basic parsing tests including > > > > > > int min/max overflow. > > > > > > > > > > > > Signed-off-by: Iurii Zaikin > > > > > > Signed-off-by: Brendan Higgins > > > > > > --- > > > > > > kernel/Makefile | 2 + > > > > > > kernel/sysctl-test.c | 292 > > > > > +++++++++++++++++++++++++++++++++++++++++++ > > > > > > lib/Kconfig.debug | 6 + > > > > > > 3 files changed, 300 insertions(+) > > > > > > create mode 100644 kernel/sysctl-test.c > > > > > > > > > > > > diff --git a/kernel/Makefile b/kernel/Makefile > > > > > > index 6c57e78817dad..c81a8976b6a4b 100644 > > > > > > --- a/kernel/Makefile > > > > > > +++ b/kernel/Makefile > > > > > > @@ -112,6 +112,8 @@ obj-$(CONFIG_HAS_IOMEM) += iomem.o > > > > > > obj-$(CONFIG_ZONE_DEVICE) += memremap.o > > > > > > obj-$(CONFIG_RSEQ) += rseq.o > > > > > > > > > > > > +obj-$(CONFIG_SYSCTL_KUNIT_TEST) += sysctl-test.o > > > > > > > > > > You are going to have to have a "standard" naming scheme for test > > > > > modules, are you going to recommend "foo-test" over "test-foo"? If so, > > > > > that's fine, we should just be consistant and document it somewhere. > > > > > > > > > > Personally, I'd prefer "test-foo", but that's just me, naming is hard... > > > > > > > > My preference would be "test-foo" as well. Just my 2 cents. > > > > > > I definitely agree we should be consistent. My personal bias > > > (unsurprisingly) is "foo-test," but this is just because that is the > > > convention I am used to in other projects I have worked on. > > > > > > On an unbiased note, we are currently almost evenly split between the > > > two conventions with *slight* preference for "foo-test": I ran the two > > > following grep commands on v5.1-rc7: > > > > > > grep -Hrn --exclude-dir="build" -e "config [a-zA-Z_0-9]\+_TEST$" | wc -l > > > grep -Hrn --exclude-dir="build" -e "config TEST_[a-zA-Z_0-9]\+" | wc -l > > > > > > "foo-test" has 36 occurrences. > > > "test-foo" has 33 occurrences. > > > > > > The things I am more concerned about is how this would affect file > > > naming. If we have a unit test for foo.c, I think foo_test.c is more > > > consistent with our namespacing conventions. The other thing, is if we > > > already have a Kconfig symbol called FOO_TEST (or TEST_FOO) what > > > should we name the KUnit test in this case? FOO_UNIT_TEST? > > > FOO_KUNIT_TEST, like I did above? > > > > Ok, I can live with "foo-test", as you are right, in a directory listing > > and config option, it makes more sense to add it as a suffix. > > Cool, so just for future reference, if we already have a Kconfig > symbol called FOO_TEST (or TEST_FOO) what should we name the KUnit > test in this case? FOO_UNIT_TEST? FOO_KUNIT_TEST, like I did above? FOO_KUNIT_TEST is fine, I doubt that's going to come up very often. thanks, greg k-h