Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3658776img; Mon, 25 Mar 2019 15:06:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgdt7tonRf4+UgUyIBQZR1XTqKEVkJ+hEFiFuVebuEclDFSE7D9zGJSG6l31BPOjECJ/X1 X-Received: by 2002:a17:902:76c1:: with SMTP id j1mr25216230plt.224.1553551597428; Mon, 25 Mar 2019 15:06:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553551597; cv=none; d=google.com; s=arc-20160816; b=c+Vub51uUaX5v16a8D/m5GfZnidBhDS9vLbe9jHPewlW+Nfjhq6/oxvCOIna0i1LNN 2CdnxfxgFHzalqZxB4Kx7AUvjQWTWcxWkjtUo1XzGX6tbtd7DMEPgB3Sv4Og2SdlJ1kr JXbBLHuL4W9drO4ALk38kV2+GjrIY0sPR8+g+P+5r7gtSdNe6MNHSznn583gHJWvrawa jqp7qPu3u8jn1qF6PQcoWCn/UHbSt8wQHNYfpl7ym1rHBPJprprg1lGxq3kntP5TLgAQ Co6s0GhFBW3r1xNGY9iAGJhhv1gvKS1rhweQThl5pyPqWyYTTJx6ccEhvdFvLeFLKyK9 93tw== 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=sEWPRD5Aa5d9Ny7EzwCXE1Cjcq7X2kWdASCbzdkOZZc=; b=XoNY4AbbtQHcHLkZWT/IJgewgoQwmi86psu8PHqW7/jqvdhueuKT8PxSMJBQI/In55 MVr2MdHEqb7+G0wl4v93QymOJZsTHAg4PmiXcGpbhSXbcBJmth03ESKsxXopkHFklbEu PNUNklDai7TK2oAw3X6rjgul8jR3SO72D+z+7xVvxW1Xw4Cr4SUPtSa1X6H5L5fpIjQ2 0WH8HIr6CiAot3FdqvKOuKtUaNcO+UKSgCY4oVgPjRZt/9eP/esUaIsPG+5CpHXhKncU xWIrulfRQSsLKLLgaArvyTcVJ6LYTVV98IXdREJ+F70g2bidbb94uaVpsKfZu3xCcoyL IlZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=hHeTmBH4; 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 139si14286947pga.219.2019.03.25.15.06.22; Mon, 25 Mar 2019 15:06:37 -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=hHeTmBH4; 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 S1730273AbfCYWEV (ORCPT + 99 others); Mon, 25 Mar 2019 18:04:21 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:36816 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729610AbfCYWEU (ORCPT ); Mon, 25 Mar 2019 18:04:20 -0400 Received: by mail-ot1-f66.google.com with SMTP id o74so9597797ota.3 for ; Mon, 25 Mar 2019 15:04:20 -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=sEWPRD5Aa5d9Ny7EzwCXE1Cjcq7X2kWdASCbzdkOZZc=; b=hHeTmBH4OSzIv3iWl8xRBWuSB+Ynn5hsNiWVDy35qNfohB0WsCbGEkuF4wUOUXANDe 6lg8+Gnku9TYjQOFkkYUBRHaIBWnE6wq9RN/KkQB8PHx+ZtsS/ZMTqE0ndvOI1Pia28r ZSFG1K7Bub+jv+yfEfgYwYx5lTd5unFHEJQkE7o/kDDQ2gcRVVQ3Mq8IXIbHoFOy3Cap B8rPOE4PClLtpR8G3ToGE1rDyaV6syJWvqtMVpr6iqu9zLNfNpdUtrqeU3muHj6ZgBEK kF8ZAzB4rcUttOTDmGzgF0r5lRBK8yB4GsN89Xi/1IzFflobLmlPG94lMlEi5R25uzDE lpfg== 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=sEWPRD5Aa5d9Ny7EzwCXE1Cjcq7X2kWdASCbzdkOZZc=; b=P5Ljo0AU+syciw8+vbT0lWv8bhg3FdDpXsiQO5mq6FoJcmONuz+x50lm1fN8QcqKS2 75+20YDFVndN+/BMu2eznri55lQGALbE6qPtk+VE1PURPJUNu5WGwVeEEzmeDEEDwAEP qO3tatakFfCiQs74qlF/vB3DmJ3PP9noGDje3xoLjglaHQcNSjvTiAZVATrn7u87HMDC z54hTpUaxv8KaPu3pv8H8EXupMEqpGXFWw7Q5/wNjjULTxfg7OzmB84zd+y2pl1llR2P yRgz9Nz16qC2rJFaXCMh0nzDDabqGMO4LRGpxlaw32WDdKqQZ6FtHsqk+W9Af2+wit7l Y0Kw== X-Gm-Message-State: APjAAAVXvWfTrkf85FRN/7cMRjtGhWHa+6ogAF+RNNFjtz3pPQ34r05e /rnWAKKsjRJRoijGddXYCdTodtXF9ONhWA/jt1E6OA== X-Received: by 2002:a9d:6b97:: with SMTP id b23mr288915otq.113.1553551459629; Mon, 25 Mar 2019 15:04:19 -0700 (PDT) MIME-Version: 1.0 References: <20181128193636.254378-1-brendanhiggins@google.com> In-Reply-To: From: Brendan Higgins Date: Mon, 25 Mar 2019 15:04:08 -0700 Message-ID: Subject: Re: [RFC v3 00/19] kunit: introduce KUnit, the Linux kernel unit testing framework To: Frank Rowand Cc: Rob Herring , Greg KH , Kees Cook , Luis Chamberlain , shuah@kernel.org, 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 , Kieran Bingham , Knut Omang 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 5:28 PM Frank Rowand wrote: > > On 12/5/18 3:10 PM, Brendan Higgins wrote: > > On Tue, Dec 4, 2018 at 5:49 AM Rob Herring wrote: > >> > >> On Tue, Dec 4, 2018 at 5:40 AM Frank Rowand wrote: > >>> > >>> Hi Brendan, Rob, > >>> > >>> Pulling a comment from way back in the v1 patch thread: > >>> > >>> On 10/17/18 3:22 PM, Brendan Higgins wrote: > >>>> On Wed, Oct 17, 2018 at 10:49 AM wrote: > >>> > >>> < snip > > >>> > >>>> The test and the code under test are linked together in the same > >>>> binary and are compiled under Kbuild. Right now I am linking > >>>> everything into a UML kernel, but I would ultimately like to make > >>>> tests compile into completely independent test binaries. So each test > >>>> file would get compiled into its own test binary and would link > >>>> against only the code needed to run the test, but we are a bit of a > >>>> ways off from that. > >>> > >>> I have never used UML, so you should expect naive questions from me, > >>> exhibiting my lack of understanding. > >>> > >>> Does this mean that I have to build a UML architecture kernel to run > >>> the KUnit tests? > >> > >> In this version of the patch series, yes. > >> > >>> *** Rob, if the answer is yes, then it seems like for my workflow, > >>> which is to build for real ARM hardware, my work is doubled (or > >>> worse), because for every patch/commit that I apply, I not only have > >>> to build the ARM kernel and boot on the real hardware to test, I also > >>> have to build the UML kernel and boot in UML. If that is correct > >>> then I see this as a major problem for me. > >> > >> I've already raised this issue elsewhere in the series. Restricting > >> the DT tests to UML is a non-starter. > > > > > I have already stated my position elsewhere on the matter, but in > > summary: Ensuring most tests can run without external dependencies > > (hardware, VM, etc) has a lot of benefits and should be supported in > > nearly all cases, but such tests should also work when compiled to run > > on real hardware/VM; the tooling might not be as good in the latter > > case, but I understand that there are good reasons to support it > > nonetheless. > > And my needs are the exact opposite. My tests must run on real hardware, > in the context of the real operating system subsystems and drivers > potentially causing issues. Right, Rob pointed this out, and I fixed this in v4. To be clear, as of RFC v4 you can run KUnit tests on non-UML architectures, we tested it on x86 and ARM. > > It is useful if the tests can also run without that dependency. This, of course, is still the main intended use case, but there is nothing to stop you from using it on real hardware.