Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1275494ybi; Fri, 21 Jun 2019 18:01:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxT+URQSL2DpEBDOPQ2q7wuH+iNT87CLK622HV+z8TTzxclzw4T6bZZ/+8Jy0Cd65FAVmmm X-Received: by 2002:a17:902:7887:: with SMTP id q7mr49227931pll.129.1561165293128; Fri, 21 Jun 2019 18:01:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561165293; cv=none; d=google.com; s=arc-20160816; b=LE0TUMUqA/Nof7UhS02Eg19u333fPjz/pjckOVFKfmN2nT3H2ozOaSJFwDCkk+DVbx 5bG2W4pJltAUX/3k9vsJ6w/0kZhbiVQvJPbHEi/kdNZ1HwRekIqMpbErjWieJqAXE3Yb RwMIDnNcge0mGrt8jFSXMCSbhgDqJb3nkSxuSRMDVhSTanEZfsQq4cEXyJ/sQU5e45VD q2QkRQMLtWusKQBxAftJHvFOR84gW+haPSfLd/5Lz10F61JBHhSREJqSbjelnYsZv/js uURoLTPpKsbjaM+Prv9v/jXGp+28IUrq7NcodYZ3Q3Ci+yhdv0Y0xtPzr1Niy2GM01s5 /MLg== 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=pn4/IgcE/a3A9HRsf8YysVQmDOFkLMRirlv4eJOCAEY=; b=D/KV68MDng3aaK36muetxX1BuVPdrlAOy1SXfGUS6G/W3Hejurg+Tn6rKnXerujxFS JY2QDTUai1iFO1y6VXLwCId1AlFY67O66yvwteRK6dseH+HWNA6id5Cb7QGrNd3wNT5J SFo257cbz0PTtLg3WAnhScwoaIykGQVfi/WuXcseZBXyheqjW4uY6ep3PRRYyUm684xJ l7/ubzgOo26u/ZKjtvPQM44UwvUwIJeHsv8cHny3A3Y05Ok3kDPzuA6gYiDGf5Cf9jig tHCiLCOtKxP9jZx5UIjfRQON9TYfQua3Yc2I13M82BfgY+00QbLjnIzH61AFR7150s0r eDKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=r0d0D49h; 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 i17si4335974pju.96.2019.06.21.18.01.17; Fri, 21 Jun 2019 18:01:33 -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=r0d0D49h; 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 S1726383AbfFVBAz (ORCPT + 99 others); Fri, 21 Jun 2019 21:00:55 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:40855 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726052AbfFVBAx (ORCPT ); Fri, 21 Jun 2019 21:00:53 -0400 Received: by mail-pf1-f193.google.com with SMTP id p184so4404123pfp.7 for ; Fri, 21 Jun 2019 18:00:53 -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=pn4/IgcE/a3A9HRsf8YysVQmDOFkLMRirlv4eJOCAEY=; b=r0d0D49hNJck2jmBOZ7hKq1EyIQm5VIsrCLXNfWA/zqw7JUB/PFT9/TEg3f9m8Exka 4OB4CLnAA+t7ZyRfMqNWActJqwB4eElCzw9OwOGul12RrF6Xah0/adQB3rDPYCiKwGSb 1cQfwLiJupuJHVE6kDeqU7eCLKZrrozRyUdaq1BAJ5w/IyIufGa6roBqLtZxSQ3wQLl8 cBD+npmSvsH7CB96WJOcXSzHxVdpszLog3BtkM+9yhp75ZfrhE2bcktgSWTAXvuCSrTY kUvb5BfS0a52N4OmjgywAeDaICRhfTcMxYZ0cxZGqUP9umwcIynczzP5GVJDJnjw5aRm 2oGQ== 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=pn4/IgcE/a3A9HRsf8YysVQmDOFkLMRirlv4eJOCAEY=; b=QMGMQ3gG7PY+yUCNVTJE0X5gf5KHyPXuyyk8F9KYhdzOo3fmf3BI3Idu+f6cOxymOb 08pYrOKZogt6bZV6aPALK6KvfUE8FoX1U62ZuASQcGDpf68QZiay8k5R1KX5G+Q3J9G3 FULbEhJ/XYe5jgFjoYZpOYx1ZX9XKQXvWRtfejueQAqCSg491R3Gt6dPP2sprR5peuXm cv1YIwBn1KI0/i5dZaWc+Utr9rEllHHCxg3sLq+xot6K2ZiCdkRt4D4NNbf6kTsj56wE /ZT4EYV1oj0zfVRBfVxdxPxNf8cOF60zhUzQZBpiBImhTO8r1GcD/yr+p7vTyiqZHaTw M3gw== X-Gm-Message-State: APjAAAX2aEQSsQD7kUs1k8q0ausXDJp60TcYvhCV9PQ4UINqQEFDrGcn XzJG+V+n/eDYs5tuHgCoomuIVYsjyJmMJP8/3Eco+w== X-Received: by 2002:a17:90a:9382:: with SMTP id q2mr10190000pjo.131.1561164883594; Fri, 21 Jun 2019 17:54:43 -0700 (PDT) MIME-Version: 1.0 References: <20190617082613.109131-1-brendanhiggins@google.com> <10feac3e-7621-65e5-fbf0-9c63fcbe09c9@gmail.com> <69809117-dcda-160a-ee0a-d1d3b4c5cd8a@kernel.org> <20190621181342.GA17166@mit.edu> <6f3f5184-d14e-1b46-17f1-391ee67e699c@kernel.org> In-Reply-To: <6f3f5184-d14e-1b46-17f1-391ee67e699c@kernel.org> From: Brendan Higgins Date: Fri, 21 Jun 2019 17:54:31 -0700 Message-ID: Subject: Re: [PATCH v5 00/18] kunit: introduce KUnit, the Linux kernel unit testing framework To: shuah Cc: "Theodore Ts'o" , Frank Rowand , Greg KH , Josh Poimboeuf , Kees Cook , Kieran Bingham , Luis Chamberlain , Peter Zijlstra , Rob Herring , Stephen Boyd , Masahiro Yamada , devicetree , dri-devel , kunit-dev@googlegroups.com, "open list:DOCUMENTATION" , linux-fsdevel@vger.kernel.org, linux-kbuild , Linux Kernel Mailing List , "open list:KERNEL SELFTEST FRAMEWORK" , linux-nvdimm , linux-um@lists.infradead.org, Sasha Levin , "Bird, Timothy" , 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 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 Fri, Jun 21, 2019 at 12:21 PM shuah wrote: > > On 6/21/19 12:13 PM, Theodore Ts'o wrote: > > On Fri, Jun 21, 2019 at 08:59:48AM -0600, shuah wrote: > >>>> ### But wait! Doesn't kselftest support in kernel testing?! > >>>> > >>>> .... > >> > >> I think I commented on this before. I agree with the statement that > >> there is no overlap between Kselftest and KUnit. I would like see this > >> removed. Kselftest module support supports use-cases KUnit won't be able > >> to. I can build an kernel with Kselftest test modules and use it in the > >> filed to load and run tests if I need to debug a problem and get data > >> from a system. I can't do that with KUnit. Sure, I think this point has been brought up a number of times before. Maybe I didn't write this section well because, like Frank said, it comes across as being critical of the Kselftest module support; that wasn't my intention. I was speaking from the perspective that Kselftest module support is just a feature of Kselftest, and not a full framework like KUnit is (obviously Kselftest itself *is* a framework, but a very small part of it is not). It was obvious to me what Kselftest module support was intended for, and it is not intended to cover the use case that KUnit is targeting. > >> In my mind, I am not viewing this as which is better. Kselftest and > >> KUnit both have their place in the kernel development process. It isn't > >> productive and/or necessary to comparing Kselftest and KUnit without a > >> good understanding of the problem spaces for each of these. Again, I didn't mean to draw a comparison of which is better than the other. I was just trying to point out that Kselftest module support doesn't make sense as a stand alone unit testing framework, or really a framework of any kind, despite how it might actually be used. > >> I would strongly recommend not making reference to Kselftest and talk > >> about what KUnit offers. I can see your point. It seems that both you and Frank seem to think that I drew a comparison between Kselftest and KUnit, which was unintended. I probably should have spent more time editing this section, but I can see the point of drawing the comparison itself might invite this confusion. > > Shuah, > > > > Just to recall the history, this section of the FAQ was added to rebut > > the ***very*** strong statements that Frank made that there was > > overlap between Kselftest and Kunit, and that having too many ways for > > kernel developers to do the identical thing was harmful (he said it > > was too much of a burden on a kernel developer) --- and this was an > > argument for not including Kunit in the upstream kernel. I don't think he was actually advocating that we don't include KUnit, maybe playing devil's advocate; nevertheless, at the end, Frank seemed to agree that there were valuable things that KUnit offered. I thought he just wanted to make the point that I hadn't made the distinction sufficiently clear in the cover letter, and other reviewers might get confused in the future as well. Additionally, it does look like people were trying to use Kselftest module support to cover some things which really were trying to be unit tests. I know this isn't really intended - everything looks like a nail when you only have a hammer, which I think Frank was pointing out furthers the above confusion. In anycase, it sounds like I have, if anything, only made the discussion even more confusing by adding this section; sorry about that. > > If we're past that objection, then perhaps this section can be > > dropped, but there's a very good reason why it was there. I wouldn't > > Brendan to be accused of ignoring feedback from those who reviewed his > > patches. :-) > > > > Agreed. I understand that this FAQ probably was needed at one time and > Brendan added it to address the concerns. I don't want to speak for Frank, but I don't think it was an objection to KUnit itself, but rather an objection to not sufficiently addressing the point about how they differ. > I think at some point we do need to have a document that outlines when > to KUnit and when to use Kselftest modules. I think one concern people > have is that if KUnit is perceived as a replacement for Ksefltest > module, Kselftest module will be ignored leaving users without the > ability to build and run with Kselftest modules and load them on a need > basis to gather data on a systems that aren't dedicated strictly for > testing. I absolutely agree! I posed a suggestion here[1], which after I just now searched for a link, I realize for some reason it didn't seem like it reached a number of the mailing lists that I sent it to, so I should probably resend it. Anyway, a summary of what I suggested: We should start off by better organizing Documentation/dev-tools/ and create a landing page that groups the dev-tools by function according to what person is likely to use them and for what. Eventually and specifically for Kselftest and KUnit, I would like to have a testing guide for the kernel that explains what testing procedure should look like and what to use and when. > I am trying to move the conversation forward from KUnit vs. Kselftest > modules discussion to which problem areas each one addresses keeping > in mind that it is not about which is better. Kselftest and KUnit both > have their place in the kernel development process. We just have to be > clear on usage as we write tests for each. I think that is the right long term approach. I think a good place to start, like I suggested above, is cleaning up Documentation/dev-tools/, but I think that belongs in a (probably several) follow-up patchset. Frank, I believe your objection was mostly related to how KUnit is presented specifically in the cover letter, and doesn't necessarily deal with the intended use case. So I don't think that doing this, especially doing this later, really addresses your concern. I don't want to belabor the issue, but I would also rather not put words in your mouth, what are your thoughts on the above? I think my main concern moving forward on this point is that I am not sure that I can address the debate that this section covers in a way that is both sufficiently concise for a cover letter, but also doesn't invite more potential confusion. My inclination at this point is to drop it since I think the set of reviewers for this patchset has at this point become fixed, and it seems that it will likely cause more confusion rather than reduce it; also, I don't really think this will be an issue for end users, especially once we have proper documentation in place. Alternatively, I guess I could maybe address the point elsewhere and refer to it in the cover letter? Or maybe just put it at the end of the cover letter? [1] https://www.mail-archive.com/kgdb-bugreport@lists.sourceforge.net/msg05059.html