Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp155319img; Thu, 21 Mar 2019 16:35:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqyaoWavsySyHsnGz00+4Jw8qABiXfDwnLWPcLhmStE1N1B7tOXtqGMrr90GDp3h8w3VSe0L X-Received: by 2002:a63:83:: with SMTP id 125mr5914308pga.403.1553211331242; Thu, 21 Mar 2019 16:35:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553211331; cv=none; d=google.com; s=arc-20160816; b=mc0PdV8yn+MIvQo/lcKY4JrnpjbxZzvuX/STTrwRvZKVEgGtgOZ4wg+gtzSQiOExXa mu6KItu5/+fCK0iRAjsOYhqkzH4a/qRfLPJJUKsuiljTB64ZFgakPM/n2SszTRHo+h8M GX4RavFisrbzj+/CFE21gRaUWlYlSibVbCdVvsOnGRkzJwG6LeIcygvK6XUhjDDWCnWl 2S5QkACir8K7xpugj8Ijxt81sTiTZu/D8Xhof2Dz8zDhljIT0nfnr8akD7E+31WLGwQW tiaFCcZwiPIidnlgi8m4CfLhW4TGHDvTH6zyPj9Pv0/ZyVXgfTUA/XU459DvpC9Z42NM Gj+g== 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=tFgfChHR3rCbGCzUFjYG6e3UOwQNYwymTbMi5H8aX2k=; b=zmMXzXt2O9lIEol5V1wXAQ+aJtNMdb24fC0Cd1cHSNUIgDq41lwRMY7rUn8pI8RCZp Bx2IDKiBAmdZ2MkW7qGqGpxQqxuFZHauIfa1ln+hKuJ2SeZRTm1eOcxjjZNzCWliEczr 4fIzRoIsVATmGxAcZtt0NLzGasqo9AEcRY0GudwL34gsnOeSe9ptvwBuL6lN0U2fCckn lEwrepHsO0ecJYlZmIRaN7iGhD0BNV5+bxmZkuMu1HAWuDSvfZ9wovK62IbOCeRzBHCP THu/a5mLy/U+es6ZJjwVr9r4st1rA5zWmELK49H48uOOSC8wp/h44Ng1I3vyPQEdcaZB +lFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=evtnxhtr; 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 r13si5299933pgr.213.2019.03.21.16.35.13; Thu, 21 Mar 2019 16:35:31 -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=evtnxhtr; 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 S1727328AbfCUXeA (ORCPT + 99 others); Thu, 21 Mar 2019 19:34:00 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:35894 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727000AbfCUXeA (ORCPT ); Thu, 21 Mar 2019 19:34:00 -0400 Received: by mail-oi1-f196.google.com with SMTP id t206so392956oib.3 for ; Thu, 21 Mar 2019 16:33:59 -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=tFgfChHR3rCbGCzUFjYG6e3UOwQNYwymTbMi5H8aX2k=; b=evtnxhtrWshSFQGY4sIPRVf5qPwktIkkciD5ssoe/FqubujjuCqumzjVIi6dKDmF7O 0IZWCtTYtJgyVqguB1LQ65NvAc5qIQKJEHKG1nM616lGxvJtcUAruVhZwAV3/wJXolYG Pm71iLs6plM7/D3QJctZlMS4kto33h0rC4dr1j6Ze1uSne7u40WsoazwlDooe8SLZl66 /zzvFjYKhTZu0Ki9G4uf+9XlZYtaNgiY19KYgo42TrigYeJLNSmKTWn3a3cziJqEq3Rb WgYuwZcyEH4dhokEtDFBckQ0LVR4NBhnrIFAW3jMml3pCy1JhplPzVg6txqe9Wq1Z4wx JzFA== 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=tFgfChHR3rCbGCzUFjYG6e3UOwQNYwymTbMi5H8aX2k=; b=oaED2Kehe9W0fbO07nI/xdl5Bj6A991SSHLxO5qJcAT9IQonfGYwZehZSpzYZfZSe/ JFXbomz3lqsG4qLOSTIp7saBahPGNwhKFkadum+MR25ZvgrxCRepL5Tnmi7fDC3aWJJ4 vMeVBt5aTWF3jYuUNDK8ENziBZEnP8fKXd0KZoevBMVwThgFLMkKf+5TSWwXYj+d2R/j HG8IX3mEE76A6cjjGamn/SHw7CP5pd+1gkgs6g7aHif4QdEDn51wm5RWoCtg8aibfZ4s IvjmoLe837SsgQXjuQyEpeElcAx462CB1GiPrpJ9ummsGOoqf8sTMamytB0IUuYFmdFD ZHhw== X-Gm-Message-State: APjAAAWBNiQuJ7eodn3glZkdoJB/ikdcH+Vz8zemz6T3DnXrUng1wAMw ijV6SEiHzAidRXfOhOwEjzi7ZzPBglGUO/FNaossNQ== X-Received: by 2002:aca:4a90:: with SMTP id x138mr1371154oia.137.1553211238537; Thu, 21 Mar 2019 16:33:58 -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: <3bdbe44c-5bd8-db37-89f9-a518cd5a21a8@deltatee.com> From: Brendan Higgins Date: Thu, 21 Mar 2019 16:33:46 -0700 Message-ID: Subject: Re: [RFC v4 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework To: Logan Gunthorpe Cc: Kees Cook , Luis Chamberlain , shuah@kernel.org, Rob Herring , Kieran Bingham , Frank Rowand , 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 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 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