Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp114244img; Thu, 21 Mar 2019 15:29:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqyYkmSkHKPlQIDEvTwwGwaIKoIAE0GXosgJztzNy5UcEmjX5FrLfBk7dJJX4Ut/C4Pw3San X-Received: by 2002:a65:41ca:: with SMTP id b10mr5690496pgq.146.1553207353305; Thu, 21 Mar 2019 15:29:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553207353; cv=none; d=google.com; s=arc-20160816; b=cwqmavM4VMysFpmNJT9OUIz12ARxXyv+w7ZOX+RC8lauwhfcEE+//lEPXDKoC9LGOk o6Y5RuH3G1DxvVFCL7RfBbUTLPSiEh3Iuf5WFDo/jIhzBXKkkaQ19rL9XR8VEqzoqhq5 ixLiL6oJRiydMSkfjO0EXSeG+38QWYZbsfezVd4T7AsfHY2JfJ8j7CudcPKUzPltYeEc vzwqXCFI3JLUgWPAx72fK0XLbx3Rw65WL62G4mWJZVvvptL4RKOxD+n3WRmnXbGZHrbd 9phwlmzs1GrFZCc/PAyatqdRV3xDwyQpsVSbGAdB0qNUJGF/tupd0yWpuEe4iRHtHnn3 Z7kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to; bh=SCQ3SgtUlzghHXXBxdi680KnvTRI/c//1CeolDR2PqU=; b=xxxBEMovEIALoQLedhU5Bx8URaqZRE17Rz1sVqHdRd2NXtJneFe92mxMZ5jgNMqfC0 aUs/1zxuPBUoR2aVJXY5DloqXeTU25qq2MZ/dSIr1VQZ5rpvyeAWQGy1cYKuhtQNbyMf ZnbRSHlLbcJLoSRNWdYd9KNeVStq55ofvgznn5bbnjANjsVIf7R9eh9hHTLCvOeWL3Ti SMsnwT43vgj/8QRmK9NN9fsZSJ6aoMMJ9SnGvSMTakBW8HGLdc/KDUqju3anR7A1zVkH brQZ2uMVqGovAZmBHTw4Uk82af/beUjW/zKsAlQW2D7uceGhX4IazNLZz4YRfiu7FHHJ R1rA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f131si5291175pfc.92.2019.03.21.15.28.57; Thu, 21 Mar 2019 15:29:13 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727054AbfCUW1I (ORCPT + 99 others); Thu, 21 Mar 2019 18:27:08 -0400 Received: from ale.deltatee.com ([207.54.116.67]:54168 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726370AbfCUW1H (ORCPT ); Thu, 21 Mar 2019 18:27:07 -0400 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1h769I-0001B1-70; Thu, 21 Mar 2019 16:26:57 -0600 To: Brendan Higgins 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 References: <20190214213729.21702-1-brendanhiggins@google.com> <6d9b3b21-1179-3a45-7545-30aa15306cb4@deltatee.com> From: Logan Gunthorpe Message-ID: <3bdbe44c-5bd8-db37-89f9-a518cd5a21a8@deltatee.com> Date: Thu, 21 Mar 2019 16:26:45 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: wfg@linux.intel.com, dan.carpenter@oracle.com, amir73il@gmail.com, Alexander.Levin@microsoft.com, pmladek@suse.com, devicetree@vger.kernel.org, knut.omang@oracle.com, linux-nvdimm@lists.01.org, dan.j.williams@intel.com, dri-devel@lists.freedesktop.org, daniel@ffwll.ch, linux-um@lists.infradead.org, richard@nod.at, jdike@addtoit.com, linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, julia.lawall@lip6.fr, khilman@baylibre.com, Tim.Bird@sony.com, rostedt@goodmis.org, brakmo@fb.com, joe@perches.com, mpe@ellerman.id.au, joel@jms.id.au, gregkh@linuxfoundation.org, frowand.list@gmail.com, kieran.bingham@ideasonboard.com, robh@kernel.org, shuah@kernel.org, mcgrof@kernel.org, keescook@google.com, brendanhiggins@google.com X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [RFC v4 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > 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. 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! Logan