Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3665003img; Mon, 25 Mar 2019 15:15:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwEWcf8F33kArKuwlJy6orx79J/ay21T+nRdPUzAVsFNR6RJsl1zW3kaTRH23uhVmSUr9Uf X-Received: by 2002:a63:f707:: with SMTP id x7mr17658409pgh.343.1553552104251; Mon, 25 Mar 2019 15:15:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553552104; cv=none; d=google.com; s=arc-20160816; b=j1nKDiEwl8TAM8jPp4G8kcAWM82eSzfviiWDqCBUUi0ixqST3auefFKfp+sYS3DdfC tUAs8E+gpcALRR9w+T9byCk0CDRVdJabT5+uHRpGN0aniLwdqU4MwBi38Q5ZL1DnTt0L D9zmU1PFM7I4wTueCL6e9LFOoKQSDblPkGZ7lYK8DsHGes3DANkFe0bdvAmL0cuH4W7F mY7BMaDfXaWPVe4QN5JxGfDxHPbm+b1XoSKM0dzR8nlndioVLIJb8VPx8d08dRQrnixA oh25Ef/OsRe/bHUWz6v6ONBSKWV3hVje+wpH83cg+NXs3zz6NTiWk9yA7LMY/U4PaYqF okRw== 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=/9DdkqyJUdYHxW/iZvrRk/lgc4wfAXWDYK7qOhybAoM=; b=s8H5HpuTTcM9rr+86UazrxZLBlhL6TGQQictASoiY6hdx6X+K2jq5zbVJFVPaHDLQG lgZqpW++HtMiJRzokf+JGb1jL5Z57VupDhTQhuXdGHzzmGesnKHt0EIjO69MOLSa7VhM 3OSbYyS9+TZH0BpbjtOOe8HXqmic45yyG3dZ4NcKXOFXo/BK58ORVaDwz/nak1B7jSqp 2mCODAfC0uimMblqYt6h/FcQhpZRdFo79XT3s/Rmr29PywlGEldorBDWfij6Yu6GQ+Gf J5vy6w3R3/AWECzlnJzme+oYod6ucm1JO4LIyO4MNUH5HZ7p3N0qOaYUbkEkD+gTy/5f t/Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=eTiSqGe7; 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 m10si14508133pgk.386.2019.03.25.15.14.49; Mon, 25 Mar 2019 15:15:04 -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=eTiSqGe7; 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 S1730842AbfCYWMT (ORCPT + 99 others); Mon, 25 Mar 2019 18:12:19 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:33716 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730745AbfCYWMS (ORCPT ); Mon, 25 Mar 2019 18:12:18 -0400 Received: by mail-ot1-f66.google.com with SMTP id j10so3134932otq.0 for ; Mon, 25 Mar 2019 15:12:17 -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=/9DdkqyJUdYHxW/iZvrRk/lgc4wfAXWDYK7qOhybAoM=; b=eTiSqGe7TbvdWusyTEXsyiaKCfR9/R+FDSjCNBWGz1+636l9v1679hiQUwZWFSiEXA uSeHr91Dy9MDtARILGNjkKOvxsZi6u+2ss+BnqXsMQ0S6VdYbGHR0t7yVa6t8kuZLg+B 4xLeg3fJWv+aBq+k1Th/Gk9HIvsxRe6nteRdCZyOe0n6gRW86oSAT4UlCfzzU1qyxVXs j2tkA3Qp8KPaTElkMiLEuqGR/zWPFzhmBldSCygAH14yhSaAxIIvMuxr0ejJSwUKvX6X uHLue7wXb/3/0wUKSdVzyXsgN00AfTxh976LU2tS20kxE30AfRewyLj72/zgEJBnpRp5 GdKA== 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=/9DdkqyJUdYHxW/iZvrRk/lgc4wfAXWDYK7qOhybAoM=; b=Kcrl4e0eZTfC+EU9tmwGFBdJlxWNTbf6LkdAr4PLYreKJAxb4/iF2mG91pnz6cvnI/ iDN9FMnUsiWVGjbSCkz7ocXtxkh8Z+KgmvfFFkRuvjy+1yIoigiexT0vNt6LIFudF57i CdFeObFsAt3jKlVfTCHGSqVY0wxf0KLCFO2BIQ3iRVOENpv8Y8WkwlBfqKeD4cWQSXyU o7hB1W3JsrWMAqfGxX8IoRpWTjSB/Y0f3U+eCI12fTjGmExYJ7Ixn3GVSE0V6n4s4HJR va6zdjLJvsrYxfPUEmK11o/sFOm1nvc/5weyn8EYBRI1/oYClpHVEXwDcNogchVcn/Cu 1DKA== X-Gm-Message-State: APjAAAX4SJW/3fNq38RmckKd1VOK1BreI3ZOLnrt6r2osFO4niernf77 n0EQ3c0INwJPMkV9iguqyV1oqApnByua5XhfLu/EHg== X-Received: by 2002:a9d:d66:: with SMTP id 93mr19460567oti.25.1553551936866; Mon, 25 Mar 2019 15:12:16 -0700 (PDT) MIME-Version: 1.0 References: <20190214213729.21702-1-brendanhiggins@google.com> <6d9b3b21-1179-3a45-7545-30aa15306cb4@deltatee.com> <3bdbe44c-5bd8-db37-89f9-a518cd5a21a8@deltatee.com> In-Reply-To: From: Brendan Higgins Date: Mon, 25 Mar 2019 15:12:05 -0700 Message-ID: Subject: Re: [RFC v4 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework To: Frank Rowand Cc: Logan Gunthorpe , Kees Cook , Luis Chamberlain , shuah@kernel.org, Rob Herring , Kieran Bingham , Greg KH , Joel Stanley , Michael Ellerman , Joe Perches , brakmo@fb.com, Steven Rostedt , "Bird, Timothy" , Kevin Hilman , Julia Lawall , linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, Linux Kernel Mailing List , Jeff Dike , Richard Weinberger , linux-um@lists.infradead.org, Daniel Vetter , dri-devel , Dan Williams , linux-nvdimm , Knut Omang , devicetree , Petr Mladek , Sasha Levin , Amir Goldstein , Dan Carpenter , wfg@linux.intel.com, Frank Rowand-real 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, Mar 21, 2019 at 6:12 PM Frank Rowand wrote: > > On 3/21/19 4:33 PM, Brendan Higgins wrote: > > On Thu, Mar 21, 2019 at 3:27 PM Logan Gunthorpe wrote: > >> > >> > >> > >> On 2019-03-21 4:07 p.m., Brendan Higgins wrote: > >>> A couple of points, as for needing CONFIG_PCI; my plan to deal with > >>> that type of thing has been that we would add support for a KUnit/UML > >>> version that is just for KUnit. It would mock out the necessary bits > >>> to provide a fake hardware implementation for anything that might > >>> depend on it. I wrote a prototype for mocking/faking MMIO that I > >>> presented to the list here[1]; it is not part of the current patchset > >>> because we decided it would be best to focus on getting an MVP in, but > >>> I plan on bringing it back up at some point. Anyway, what do you > >>> generally think of this approach? > >> > >> Yes, I was wondering if that might be possible. I think that's a great > >> approach but it will unfortunately take a lot of work before larger > >> swaths of the kernel are testable in Kunit with UML. Having more common > >> mocked infrastructure will be great by-product of it though. > > > > Yeah, it's unfortunate that the best way to do something often takes > > so much longer. > > > >> > >>> Awesome, I looked at the code you posted and it doesn't look like you > >>> have had too many troubles. One thing that stood out to me, why did > >>> you need to put it in the kunit/ dir? > >> > >> Yeah, writing the code was super easy. Only after, did I realized I > >> couldn't get it to easily build. > > > > Yeah, we really need to fix that; unfortunately, broadly addressing > > that problem is really hard and will most likely take a long time. > > > >> > >> Putting it in the kunit directory was necessary because nothing in the > >> NTB tree builds unless CONFIG_NTB is set (see drivers/Makefile) and > >> CONFIG_NTB depends on CONFIG_PCI. I didn't experiment to see how hard it > >> would be to set CONFIG_NTB without CONFIG_PCI; I assumed it would be tricky. > >> > >>> I am looking forward to see what you think! > >> > >> Generally, I'm impressed and want to see this work in upstream as soon > >> as possible so I can start to make use of it! > > > > Great to hear! I was trying to get the next revision out this week, > > but addressing some of the comments is taking a little longer than > > expected. I should have something together fairly soon though > > (hopefully next week). Good news is that next revision will be > > non-RFC; most of the feedback has settled down and I think we are > > ready to start figuring out how to merge it. Fingers crossed :-) > > > > Cheers > > I'll be out of the office next week and will not be able to review. > Please hold off on any devicetree related files until after I review. Will do.