Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1469428ybi; Wed, 3 Jul 2019 16:44:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqyUAV4jZesVg/iHe7sqsevYgcOuagJ3sjnuCx/N4CtlhENIewZAOS+TGGRCxOJDEzxyU8gw X-Received: by 2002:a17:902:be0a:: with SMTP id r10mr43003162pls.51.1562197446362; Wed, 03 Jul 2019 16:44:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562197446; cv=none; d=google.com; s=arc-20160816; b=VOWnchTEkTbOFU8mTqaHOdIDZPckmAZjV69ApInN9+ClLc7L5AOj/27Wz8LphNa646 pDk9QVms5jJzaGhRMcGZdpQ2ZI5wdXID3xI9AQOweR/shiTbJ95sXmPvg6T/e8h7X1AH n8ppuKChr2qVSoCpaDFl/qhb7jqZldMX2TNFQMY+mXrh08Oi2J5XU8SMELjWSrYNvjXk 2pT09/Vuv5Rbo3gGOYYuyFlySvf3ghZEnCszfwaeW6udqO1fmIbcXYqGFwroqRru5pF1 hURah5CQHe47ltVaXLv4Z7d4N1wG2QOMztRclFNiREiX3wEybAIF0r3tTyI+6HGIUvBH Swug== 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=cVKYoZ7M1neTWMWNkSfarm1kLLkAZh2a4u3Pqo3SzOU=; b=kcAS4lHUJiUGPYhqvh0UiX0AVkD7HXOa/sI2BQ8LYgQHVz3iZKq9K+Dqz142W6UrX2 znRlqM0BKe+dJutTTe/tXcO4uXQgAVfbp0nQY4l4mbdvtrzqLeaSPrFrnLOCsVsVrWFv ssCNmeUa0kYRhVRbT3cOWsI8RcX/pTX407D2J4GlOQpQB4jdCLrqRZ3Vz9N5pqfn6eWv 6r1IcOYGusTgZn7QFmcHwJk7swi4MSUmlx3JuwLgp5+7wINAbyOhAykQXYOwwgYxR5BH REbojGPgw4EcainozDFCTHQ0ARCD9KQHwT7dNRr/GJGETlYA6GE+ofeMeLqMNc/hA74N Br3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=OWhUfNT+; 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 r3si3620551pgo.247.2019.07.03.16.43.51; Wed, 03 Jul 2019 16:44:06 -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=OWhUfNT+; 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 S1727448AbfGCXlF (ORCPT + 99 others); Wed, 3 Jul 2019 19:41:05 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:43243 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726562AbfGCXlE (ORCPT ); Wed, 3 Jul 2019 19:41:04 -0400 Received: by mail-pf1-f195.google.com with SMTP id i189so2001586pfg.10 for ; Wed, 03 Jul 2019 16:41:03 -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=cVKYoZ7M1neTWMWNkSfarm1kLLkAZh2a4u3Pqo3SzOU=; b=OWhUfNT+x+l9tKNcHcOr8kuP2qdhGyE+B0e411zUg/nxqHy1v3vbklBPjWBIPWd1+X lw5aHflM74n2xt/OAAiQhlNPGrSQVQRa+4MjJybCNy2xt94ieU8axV/bh19o4WGfWzwW bc7SeBseK2dfjfJAMouw6pY81wBVOyVQijUmOr6rIyxetCcz2tD+r9Vrdt1IxtPYRepK Nbi/7inGd9MhBPjN3BDpD4xzbLxIX311D6atZ8neX7oEcRDtH4k/c+3mNfaUqCqIHwqh gffewpeSSQuFiFnvGzd3H0SEAPr2VegAZ8NlEv0Yl6KNzakq7kQ12TioJjvvu6bdkP5c sjAA== 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=cVKYoZ7M1neTWMWNkSfarm1kLLkAZh2a4u3Pqo3SzOU=; b=kQuqrT5HiIhueCxWHgBvidCm8meOxd9EhgbuBiyDQIZf3CpDx2M4TK6x0OZ4PTbXgI /+VvFmhSch7+xluWjgjJvK1jhbluwawFVk2D2L1Qy+xv1/dh+LEZk4+m5oBWfnIjvqAo qrX7CzS65FbTv39JAz8DBG0473qWMqD9fUonItlVcyBW7RNO3QPpoaaQi1GjWYz3du/f pDQA3Ww46XVDMDYdg3xtq8DM9B9quy9Yus3SO8yAtmybaPOcILP9aQv98OMauc1LZq3L 263Ovxi+ypCaCn2AiFIylveNzjc+zo5plw297zNvBw/rcmoRBCNG1YA2B7L9p7MOPaS6 1pIQ== X-Gm-Message-State: APjAAAVr8R6F+1cjaE/UIP8qqkYlAfw9MTzAUmBXKkR7MGmI9RedMuVS 5/WHN67zX0kXOAuxZXas1tFFTqu+g4cDal2h806y8Q== X-Received: by 2002:a63:b919:: with SMTP id z25mr39509300pge.201.1562197262480; Wed, 03 Jul 2019 16:41:02 -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: From: Brendan Higgins Date: Wed, 3 Jul 2019 16:40:50 -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 5:54 PM Brendan Higgins wrote: > > 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 Since no one has objected to dropping the "### But wait! Doesn't kselftest support in kernel testing?!" section in the past almost two weeks, I am just going to continue on without it. Cheers > 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