Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6283218yba; Tue, 14 May 2019 05:09:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqwYH8o+rL6AzgIGC5F20rQ18yjA3UD+OEY7D1+6rsPx0PglxeD7w3UufMxNN8kiImEnIWPN X-Received: by 2002:a63:4c45:: with SMTP id m5mr37127086pgl.78.1557835748268; Tue, 14 May 2019 05:09:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557835748; cv=none; d=google.com; s=arc-20160816; b=M8XGJU2e3hV9ohdSSqXR8p/M7Y4+o3pr3jGfJUkumCxVIkDPVjcavYilA7r3qfle6O nP0DpchIBE1jfIllepeV4FJIOY3xwXKEsvaQ/jRhl0tlQiQYagJDMec3Inz+bQQXBa07 4uSmzzCiXZO5Vhk3xOtPBKtqOx1xmAoajBXfKV3t/qm25YruTon3eH1pbCcGKY2/t6fm VJ5OtJCWcGti6s7KBl+LXw3tSf5Ai6x1hBTRfplLJPPMSrvNYsYFLy4IEj3QWI5pV8/t 3svmsbuoRj+iy5M/qOvDWSRBlwH8oHrKbT+u26SNJi4GCVdFZMnEKQdC/mJASrL7Z80C LHzQ== 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=3cCt7Fv9PrSN+POfdDA9BhvmV9/m6Z9B8cT0V9l7bcU=; b=NGux3rBaUzD12k07r+QhdsdLciJSVS+bt9v+u/EqDjL+WdG3fuIqIodXhe1kqPz0mF CHTt/aDAbEr4UivBPUy+fS7aHITe9ZUsfv+Xiff/0nmP07ojaEUEH7bOcRsP4vYgzDS5 glj6IO45Qo8vRT5BgxAm85NhtyDu37Ct+PjN9DhlrG9k/3RRBzfEe0tUQrEPTEeSRW26 aM+jyZ3JPZ+47xgOfEIdIrUgNmxodSoNR0beUhERCYt9JgK3hnokC1gkRAydNa21eyZU ypgDahPhKxRGh+qA3hgzXAT5cORTLBUmksMAv6fGu1yGJfz2UJ+n2HdehYEHlhWHRLnB um5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=a7BcpiAa; 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 a11si19867793pgv.157.2019.05.14.05.08.28; Tue, 14 May 2019 05:09:08 -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=@ffwll.ch header.s=google header.b=a7BcpiAa; 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 S1726513AbfENMFT (ORCPT + 99 others); Tue, 14 May 2019 08:05:19 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:39895 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726467AbfENMFT (ORCPT ); Tue, 14 May 2019 08:05:19 -0400 Received: by mail-io1-f67.google.com with SMTP id m7so12791950ioa.6 for ; Tue, 14 May 2019 05:05:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3cCt7Fv9PrSN+POfdDA9BhvmV9/m6Z9B8cT0V9l7bcU=; b=a7BcpiAa3cXS6NukeVFgCH7xf3ARmd8J6e/ULZ0a8xqTBwTNaq+N8QguChZh3uzW7f kWHSY7qQUZbeMlUwXYdXunYt1ZQd2SKBDUTXd3jKW+KmrJ1DqqIRVtLYOVb1f+tEQL2N W7DqiSEqrT+k9VDAEFt9iTN+c6I6bW1EG18JM= 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=3cCt7Fv9PrSN+POfdDA9BhvmV9/m6Z9B8cT0V9l7bcU=; b=TvrxZbGU8b4W9rd/tr6fQePn/7m+FWEYHr3+UQA1Oc3E0fONpzksK4cw10gQKV1/dg WIQKIMgNrK/shsAbtaMbiceiPKpXWITobW5ZJ4tKuxr2uRb6sXYU0ONONCSqJTmbqPsN nm+d4wss8kCgKYLncLnW0xsJziRBakFL5x2R1gDCFjmPm9/wgcuHOHC/PMebNYtIYGOU iw59yCD4w2V+qqW7Rjou1EwMdFHhWnGg1uy3vR2/4e6M+sn2cC0BE2TSAduaPawfF26p 3S26dr3rxdRYLAkPZR3iOOGM81W9iDmt98B6UyGi/3x+HpkI4h+uVvTeaOeROmUXPJX/ SyOQ== X-Gm-Message-State: APjAAAWLt9wmzZ5i3V7RukOYdm1s/BSp1/s5IwdF0JnL95QG568i6fGm Mg8aViWHrGP2MWeyFoMz3WugqLGnal4i4YLcRuT7Hw== X-Received: by 2002:a6b:b654:: with SMTP id g81mr3614153iof.34.1557835518050; Tue, 14 May 2019 05:05:18 -0700 (PDT) MIME-Version: 1.0 References: <580e092f-fa4e-eedc-9e9a-a57dd085f0a6@gmail.com> <20190509032017.GA29703@mit.edu> <7fd35df81c06f6eb319223a22e7b93f29926edb9.camel@oracle.com> <20190509133551.GD29703@mit.edu> <875c546d-9713-bb59-47e4-77a1d2c69a6d@gmail.com> <20190509214233.GA20877@mit.edu> <80c72e64-2665-bd51-f78c-97f50f9a53ba@gmail.com> <20190511173344.GA8507@mit.edu> <20190513144451.GQ17751@phenom.ffwll.local> <20190514060433.GA181462@google.com> In-Reply-To: <20190514060433.GA181462@google.com> From: Daniel Vetter Date: Tue, 14 May 2019 14:05:05 +0200 Message-ID: Subject: Re: [PATCH v2 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework To: Brendan Higgins Cc: "Theodore Ts'o" , Frank Rowand , Tim.Bird@sony.com, Knut Omang , Greg KH , Kees Cook , Kieran Bingham , "Luis R. Rodriguez" , Rob Herring , sboyd@kernel.org, Shuah Khan , devicetree , dri-devel , kunit-dev@googlegroups.com, Linux Doc Mailing List , linux-fsdevel@vger.kernel.org, linux-kbuild@vger.kernel.org, Linux Kernel Mailing List , "open list:KERNEL SELFTEST FRAMEWORK" , linux-nvdimm@lists.01.org, linux-um@lists.infradead.org, Sasha Levin , Amir Goldstein , Dan Carpenter , Dan Williams , jdike@addtoit.com, Joel Stanley , Julia Lawall , Kevin Hilman , Logan Gunthorpe , Michael Ellerman , Petr Mladek , Richard Weinberger , David Rientjes , Steven Rostedt , 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 Tue, May 14, 2019 at 8:04 AM Brendan Higgins wrote: > > On Mon, May 13, 2019 at 04:44:51PM +0200, Daniel Vetter wrote: > > On Sat, May 11, 2019 at 01:33:44PM -0400, Theodore Ts'o wrote: > > > On Fri, May 10, 2019 at 02:12:40PM -0700, Frank Rowand wrote: > > > > However, the reply is incorrect. Kselftest in-kernel tests (which > > > > is the context here) can be configured as built in instead of as > > > > a module, and built in a UML kernel. The UML kernel can boot, > > > > running the in-kernel tests before UML attempts to invoke the > > > > init process. > > > > > > Um, Citation needed? > > > > > > I don't see any evidence for this in the kselftest documentation, nor > > > do I see any evidence of this in the kselftest Makefiles. > > > > > > There exists test modules in the kernel that run before the init > > > scripts run --- but that's not strictly speaking part of kselftests, > > > and do not have any kind of infrastructure. As noted, the > > > kselftests_harness header file fundamentally assumes that you are > > > running test code in userspace. > > > > Yeah I really like the "no userspace required at all" design of kunit, > > while still collecting results in a well-defined way (unless the current > > self-test that just run when you load the module, with maybe some > > kselftest ad-hoc wrapper around to collect the results). > > > > What I want to do long-term is to run these kernel unit tests as part of > > the build-testing, most likely in gitlab (sooner or later, for drm.git > > Totally! This is part of the reason I have been insisting on a minimum > of UML compatibility for all unit tests. If you can suffiently constrain > the environment that is required for tests to run in, it makes it much > easier not only for a human to run your tests, but it also makes it a > lot easier for an automated service to be able to run your tests. > > I actually have a prototype presubmit already working on my > "stable/non-upstream" branch. You can checkout what presubmit results > look like here[1][2]. ug gerrit :-) > > only ofc). So that people get their pull requests (and patch series, we > > have some ideas to tie this into patchwork) automatically tested for this > > Might that be Snowpatch[3]? I talked to Russell, the creator of Snowpatch, > and he seemed pretty open to collaboration. > > Before I heard about Snowpatch, I had an intern write a translation > layer that made Prow (the presubmit service that I used in the prototype > above) work with LKML[4]. There's about 3-4 forks/clones of patchwork. snowpatch is one, we have a different one on freedesktop.org. It's a bit a mess :-/ > I am not married to either approach, but I think between the two of > them, most of the initial legwork has been done to make presubmit on > LKML a reality. We do have presubmit CI working already with our freedesktop.org patchwork. The missing glue is just tying that into gitlab CI somehow (since we want to unify build testing more and make it easier for contributors to adjust things). -Daniel > > super basic stuff. > > I am really excited to hear back on what you think! > > Cheers! > > [1] https://kunit-review.googlesource.com/c/linux/+/1509/10#message-7bfa40efb132e15c8388755c273837559911425c > [2] https://kunit-review.googlesource.com/c/linux/+/1509/10#message-a6784496eafff442ac98fb068bf1a0f36ee73509 > [3] https://developer.ibm.com/open/projects/snowpatch/ > [4] https://kunit.googlesource.com/prow-lkml/ > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch