Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp214911img; Thu, 21 Mar 2019 18:15:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzn/R5buPBwMnTU5Eu81/8RAOPsIsVGMWGULtXgbHMpGpxcJ5gylQX0aox9D15N7Ihdv6H2 X-Received: by 2002:a63:101c:: with SMTP id f28mr6125808pgl.224.1553217330007; Thu, 21 Mar 2019 18:15:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553217329; cv=none; d=google.com; s=arc-20160816; b=Vkl4J9wIU6BWdVVo/dWzRHDmeoZwb+Aj6qTxQPB4pyQ7pK18szoNVFxH7ap6/zkAqO 2Tz0FGvf/TQiGPNzZcDeHujXeYF/VIytsZELezGF2gLXyh1cUjap96Tk8fOnPab2nhUo NS6c6c8m31E57KmwKyWjRsrXWMxILNwfoPXcNr/ftGh1v3TXxxNe/sIc+9o6qRbLxNxQ dA2DG3g7EQle6wjG0jr2hoO0xq8NTt5O0CU7err1W3uo/lV3mXoPYm6RnjO5/fj7ky+u ZlkvOEXyhWHmB88uMzl6iXBQb1z9YL6BxCSmeGbZVzgYQSuDEEcn1+U+KPGspEP0ljNg gv0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=hn1l35il4CXqkv0le4BYOEd6w+xQ7Q2k3NTZIb1qvmc=; b=HrWqgT7HPvWDov/56Q/cDH4Pnlev2NtGJmccRIaPfbz0YOrsiOrEyxB5+KfvimM6ur oSKJ0/jd8mNMSPBKt/ReB5KGqTC1ZdJc0+U12nfDtDpV5kN5FkA98IhB8A2W3CFl8Mj9 QRn/Y89Ax7q7BBC7mrZuySdbF8rwJNF8CQTAv2N2iYsLSrdsBxybkIGzzmmzfyIOLEvf kXrE/q09VrbdZ6q1R1a3bynJUgHZj+Y23AU1HJ5oLkxNLkf4ZeHL6Mm+D/39oN35sHr3 tt1AD3+2oFEiMJjsFTtC3t7JNOVJOSJ1d6YwMzcqnA1XFstUdarqMnkobTGEv7IYhPBA tXyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="SO6/AIyz"; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1si4955373pfe.194.2019.03.21.18.15.12; Thu, 21 Mar 2019 18:15:29 -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=@gmail.com header.s=20161025 header.b="SO6/AIyz"; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727495AbfCVBMx (ORCPT + 99 others); Thu, 21 Mar 2019 21:12:53 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:45992 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726460AbfCVBMx (ORCPT ); Thu, 21 Mar 2019 21:12:53 -0400 Received: by mail-pf1-f193.google.com with SMTP id v21so300759pfm.12; Thu, 21 Mar 2019 18:12:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=hn1l35il4CXqkv0le4BYOEd6w+xQ7Q2k3NTZIb1qvmc=; b=SO6/AIyzLLQ1+4ycHWIqw+ndleOcRuEK4NaqUtbyMSBYxHneTTY7AQ4L9mJmQVtZvP FP8031StJ8pmbY4CPnJhYYMn34pnU1qDrQMe4gCm/qwmrvHfqZM/AWA5z3yY0TFR07ob xfsmuaX3YEUOPmz1WRybVLECsIUgqDftF6gGDsu5eqAbsEgcyQ3pm1tg7aVHLtgG9Ufr GRrTsD2JfZh12UaSOI6Lkp6udGEhscWbqhCbRaOj7sst0Cx6bvpnzp1D9jQVUhS9o7/A fDjo7n4GtEtvU1iSaqIq1b0lr8uQB/hlucHqSqf5gyjPvCoIs7QIYR/67LaDcxVLr8iv 85+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hn1l35il4CXqkv0le4BYOEd6w+xQ7Q2k3NTZIb1qvmc=; b=Io6WXn5yREAEpuLJOXSLhF85C9N2m6UwvkpA+ShfSf/HeLXCU9HZs98IQQOGtLpLoX LSTjFlOTDZPxDWGvO8kNU+zO2yLKXt7guBY8ngyB9pk/qrRs9WkRofMta3EXb0QaEb9+ qS9LXtAnAvnCYldhL5UZdA4PDGAt671cbhhLz/S6/I/l+cvONIftirPE92OTG19GxyaQ XLocPbCn3spKugwzy/fz2ntgeCjV+av00g1Y3aSUHZldBHLwt2n+dLOQTGH39D67n5XZ xqFuCPRcVkF2qPtZlVBlXwvxsJwA2fvcVbmODmh9NzYn7nv7dFddgUlFT5fTLzE9WJbG KHOg== X-Gm-Message-State: APjAAAXm2g5A/SJuyeKaAlbFqgBMGvjSQ40mURzwwWKd6enIH0cDUQJG ljO3WI2BA+/6D5zN45aMXUs= X-Received: by 2002:a62:ea0f:: with SMTP id t15mr6529957pfh.124.1553217172277; Thu, 21 Mar 2019 18:12:52 -0700 (PDT) Received: from [192.168.1.70] (c-24-6-192-50.hsd1.ca.comcast.net. [24.6.192.50]) by smtp.gmail.com with ESMTPSA id f7sm7044173pgf.48.2019.03.21.18.12.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Mar 2019 18:12:51 -0700 (PDT) Subject: Re: [RFC v4 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework To: Brendan Higgins , Logan Gunthorpe Cc: 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 References: <20190214213729.21702-1-brendanhiggins@google.com> <6d9b3b21-1179-3a45-7545-30aa15306cb4@deltatee.com> <3bdbe44c-5bd8-db37-89f9-a518cd5a21a8@deltatee.com> From: Frank Rowand Message-ID: Date: Thu, 21 Mar 2019 18:12:48 -0700 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-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks, Frank