Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp7547726yba; Thu, 2 May 2019 11:48:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDXiI53tjOJKLz2iiY6eVLtf/eH9Mmao9FXnbPow5+lHfVmzP+IhcOfxLv//IIa6y8zdMR X-Received: by 2002:a17:902:b617:: with SMTP id b23mr5146239pls.73.1556822894279; Thu, 02 May 2019 11:48:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556822894; cv=none; d=google.com; s=arc-20160816; b=JQ9G2MQUZWKpfeJPKu/U+X2WFEBXyxNzcta84FEzwCGjdXj8FtH2ykdUV0GqLU9DzO 4w+cYnK5JRd4iHzpUvniwAyEwtpirfNQt62m69PggPxsMkayc4HZKksFyz8b6m8x+dgW oN4Q0ExyJNUa8IfNuMzQVt/RvW7HC8dShrla41nVeYhgsqTa2zbGoPqSXCJhRfGUuUaE u/Rrmm4lcarzLX7ZB2mR06ajtQyu1XGXWtjnsA6fIe+81Nr4ZzN5t/WdVm4yzhxPqRXB l+DtNGZpVaOwc3IwzjlLTJi03Nb5jT3h+OJZSEzfxmdyl5EdRuGBBDEUKJZMHNrkhIVs dD5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=17OVt5sF62dgswwCTgJsxP7RAt3WsAf5VJ4Ut9AHOnQ=; b=0HqfyAS0SOXcO4O1rFv6v70Cq8hW3WzU/DKspLKkS5CFz0FaULgAvBwcueE9u0TL2/ KZg1EuYUrg20ovqwaleFfLOt5ElsPeipVIEsynDhMGaxhypiZTru/DDzB2LAqm20D/0R aTuDC1HvAgZq7/yazXLwRjK5JQDyH2oxmxVjTrzze5z+RlhxXkwM5NERfNOeO+Rqr007 HQgSI/XJvCCloC9+zpp13aQuBGEWsHi7g46hYUhh3nOJHZkU//PmilLs7+ekTTaj760U rcO9atFXO8//RmQo9Kmxnwr8YrOawLpVdRVYL7LcGqAKEpxfj4w4X+55gUBMrkLPovsz PBDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=P9mmkEct; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m86si45387945pfi.235.2019.05.02.11.47.58; Thu, 02 May 2019 11:48:14 -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=@google.com header.s=20161025 header.b=P9mmkEct; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726463AbfEBSp4 (ORCPT + 99 others); Thu, 2 May 2019 14:45:56 -0400 Received: from mail-oi1-f193.google.com ([209.85.167.193]:40763 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726360AbfEBSpz (ORCPT ); Thu, 2 May 2019 14:45:55 -0400 Received: by mail-oi1-f193.google.com with SMTP id y64so2547485oia.7 for ; Thu, 02 May 2019 11:45:55 -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=17OVt5sF62dgswwCTgJsxP7RAt3WsAf5VJ4Ut9AHOnQ=; b=P9mmkEctGFviK6NgZSHwMcUWXoaX/YoeIAK9bJMcE3Lx9wj9ioBeHG7azUaTRvfMEz TY2RHOx0ThWPnz2RyK/JeVea8tpHo/vQkabwSgIPQaucOPCDrRgdtpJvHIeyfXSXZIdh EEpMDUWFYZWhjIh9jDc8FJvMTlSL8vQ8VfgY4koM+if0RzgjLUM+G7N96Iar9oJO2RWW y2bZo1FvLirTsbvZcF5UvfSKsfdjWdxyGHNZOdT8DOFyQvGPVysWQaUTlUo3hkMnOD0e RSC2W/FJE39vCVMCViynhllAgBlnR6+D6q04cTiRfgx2IG0+4k0zkzJ9Spq984jh3G9l lWjw== 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=17OVt5sF62dgswwCTgJsxP7RAt3WsAf5VJ4Ut9AHOnQ=; b=NckCsoKRVIQhHmOV35GbUcvctQKNsyxH1Gd5Gxq/gYFwYX5LBlxVSqoEaZG6u4xVN+ UvXXJGpNHj1a9fyMgCAD+P1xCKiYtMpR7OaCJ5ay7N1aQ0W65ftBRrJEpcSiXkwiCN83 XeLGxL4bMt5VPpJ8hzFtRHb81vkgYkRRVrhV4TswjqNz2dR1XGvlGURVziwdwJXGlhKz 6ljres2i3e/wa1PxKu90N0uqEjy/Xr+sJQlIzbsr6E/FTBVnfYAjOO6Hv1GuQjEgaFSa FdL/1FN4rzVjs00r5L30cMFGlSNCmMJe4A0OUU66ol3pHtxu+DilZeH6b57CBpWZwwLt oA5Q== X-Gm-Message-State: APjAAAXfbCJBGexwVTzJmwKmCuqF6VaMnEnoxgogw9hoqsNJLw5cy3Ya gh1BEaLwlhXtuJUqgFecgrdK9jqF2rfJczDgWm9/sA== X-Received: by 2002:aca:4586:: with SMTP id s128mr3264542oia.148.1556822754511; Thu, 02 May 2019 11:45:54 -0700 (PDT) MIME-Version: 1.0 References: <20190501230126.229218-1-brendanhiggins@google.com> <20190501230126.229218-17-brendanhiggins@google.com> <20190502110347.GE12416@kroah.com> In-Reply-To: From: Brendan Higgins Date: Thu, 2 May 2019 11:45:43 -0700 Message-ID: Subject: Re: [PATCH v2 16/17] kernel/sysctl-test: Add null pointer test for sysctl.c:proc_dointvec() To: "Bird, Timothy" Cc: Greg KH , Frank Rowand , Kees Cook , Kieran Bingham , Luis Chamberlain , Rob Herring , Stephen Boyd , shuah@kernel.org, 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Cheers