Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1779256ybg; Sat, 19 Oct 2019 02:19:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqznKl3CEdBr9+6JRCD6NDdk+N+LBzrD1yl0RfuHgae8in+d+d2tYLQJ5oG8V/f9NHVsTChU X-Received: by 2002:a50:a227:: with SMTP id 36mr2223206edl.262.1571476794811; Sat, 19 Oct 2019 02:19:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571476794; cv=none; d=google.com; s=arc-20160816; b=vZ3slhKuob2YwfA6yPoQIq4LenApqhb5nwkFhC1JDYWD6P7wyLhKxpnYTbChG/PBfo f7hGPPQVr8WlssRzSYtf07kVM4eY25V5SP+LMmvkamGJ2t4G0JswqLMuEhFvorGbTin1 IdALQc9BqQplJbPr+IhlH2CWIPOIGD+CB0WuodBOI35OJreh3h5OHZvMIIqi3AhBs0jt ckjC8aVpj2ptqNO6UU3ttePZMyPr6+i9vf88NNG1/E2hRV6yNh2oCBycJpYXAQD9EFXJ 3JzM+6aswP+Oe4dDesJ7uX5KXIhTi5pioQ+7/rmc7PDi/fm+tlD4jbxuKjnuiOT8gm0t t7lA== 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=hB675E64nw6z0mCcKC5XdWKWFq2jH+IHeB9Onr50eJk=; b=KVSu4ujWgE0huqVorEnQnUjEAQWa5Yl9OS1XcHxo2dJ6fh2k617+J0aY9zYxewBjqh OjVbEgiIbwXuCRrpTiVjTo/OAieq6EzSp+nhmuPvP/c4c7oRFEftc26u4CAzhEbiXWeL RRcq4fuV9Dzl9Iv0bLWp4n6rzCpEvzzURoD1ykr8FvvIEk6qot9XutWUi0p68lW8GN3L 4SuvNoZ+y+vKMnINyPVkDsQz5cTfyrcmMjglSHdVoWveoTeNYzeqrig3Y6NvmEGtzKqT vz+OJzlra2FyYQo82i/FmkqWCZl7ZECeEq4luRddQI+xB+lz4QT5ms0vZCFSgnhHyLG8 1LBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Dv4zsmRJ; 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 r2si4753006ejj.90.2019.10.19.02.19.30; Sat, 19 Oct 2019 02:19:54 -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=Dv4zsmRJ; 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 S2506210AbfJRVly (ORCPT + 99 others); Fri, 18 Oct 2019 17:41:54 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:36136 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2506198AbfJRVly (ORCPT ); Fri, 18 Oct 2019 17:41:54 -0400 Received: by mail-pf1-f195.google.com with SMTP id y22so4650958pfr.3 for ; Fri, 18 Oct 2019 14:41:53 -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=hB675E64nw6z0mCcKC5XdWKWFq2jH+IHeB9Onr50eJk=; b=Dv4zsmRJo2A3OUBuY3Se6GL3N3SOEpmUZ9N5EEC2m1ZUOL2Wy9W45/J/RaJ0t9C/ql edyVPXSWSlYxIzlvngP0j3G6pVOFnbQau6NDqujV1HzqnEF5CJjRChCSB145wMp7y6RR 8OHvE8LaxyDLyjUqLcdNDf243o/lSFax4zrSQ0+c4rOO4tcEHM9933OIZqoHufz3Ldq7 SgkUu+ur1967uOV3zKASFWF4Ptb3EBcruZWfxuK/fwTpuoH4KuvW1R0OJOEShhb+oawu T8f6Qemur5xLLarXVuOsR+J39wgmHEx107Z9O3sQd8qYw5RC8DqjoV54RebL6Qn4Lf8l zL0A== 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=hB675E64nw6z0mCcKC5XdWKWFq2jH+IHeB9Onr50eJk=; b=XBGnlVfoGOUviN800YbGSsyJoPw2qggGdkLSaFlYl2AwydL1QN94F1RflV3ZwAxIjW 0xpy/BHqi3fEwI7bSyjmY14JrNh0HnLDysVWDG6IewKffplqeaVVMfblDi5qd2dJS2vS GNn4qxenzHxVzmWLjgwY8Uy8HGQRQs6VwO4UevkTDkLXSnTgQfdGiZZ9KMCoq0wHLPPG nsHRMgqeg6ROLkdmNRRd3C+x2WCN79zuFo49YKK63K+2d4akSU2qrzmZLZY1dmzZszSD XCbjMjq/4OoxFYidXH38xCjYnXpF0nb7JePEAHPgN7P8gmX4TKfVP97WkDm+ePF1mmoe mOtg== X-Gm-Message-State: APjAAAXK8TXLXxQIx8XNf/L3oYU7mR9sVQIZdaFpmu05fpcBjLuMAGDp vPBqOpF7MwwVELYl5Quk8K6KCmmE0T/yktTyB94nGw== X-Received: by 2002:a17:90a:f495:: with SMTP id bx21mr13128557pjb.84.1571434912732; Fri, 18 Oct 2019 14:41:52 -0700 (PDT) MIME-Version: 1.0 References: <20191018001816.94460-1-brendanhiggins@google.com> <20191018004307.GA95597@google.com> <20191018162519.GH21137@mit.edu> In-Reply-To: <20191018162519.GH21137@mit.edu> From: Brendan Higgins Date: Fri, 18 Oct 2019 14:41:38 -0700 Message-ID: Subject: Re: [PATCH linux-kselftest/test v1] apparmor: add AppArmor KUnit tests for policy unpack To: "Theodore Y. Ts'o" Cc: shuah , John Johansen , jmorris@namei.org, serge@hallyn.com, Kees Cook , Alan Maguire , Iurii Zaikin , David Gow , Luis Chamberlain , Linux Kernel Mailing List , linux-security-module@vger.kernel.org, KUnit Development , "open list:KERNEL SELFTEST FRAMEWORK" , Mike Salvatore 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 Fri, Oct 18, 2019 at 9:25 AM Theodore Y. Ts'o wrote: > > On Thu, Oct 17, 2019 at 05:43:07PM -0700, Brendan Higgins wrote: > > > +config SECURITY_APPARMOR_TEST > > > + bool "Build KUnit tests for policy_unpack.c" > > > + default n > > > + depends on KUNIT && SECURITY_APPARMOR > > > > Ted, here is an example where doing select on direct dependencies is > > tricky because SECURITY_APPARMOR has a number of indirect dependencies. > > Well, that could be solved by adding a select on all of the indirect > dependencies. I did get your point about the fact that we could have In this particular case that would work. > cases where the indirect dependencies might conflict with one another. > That's going to be a tough situation regardless of whether we have a > sat-solver or a human who has to struggle with that situation. But yeah, that's the real problem. > It's also going to be a bit sad because it means that we won't be able > to create a single config that could be used to run all the kunit > tests when a user pushes a change to a Gerrit server for review. :-/ Yeah...well, we can do the next best thing and generate a set of kunitconfigs that in sum will run all the tests. Not nearly as nice, but it's the next best thing, right? If you think about it, it's really not all that different from the eventual goal of having many independent test binaries. > I suppose that if we use a strict definition of "unit tests", and we > assume that all of the tests impacted by a change in foo/bar/baz.c > will be found in foo/bar/baz-test.c, or maybe foo/bar/*-test.c, we can > automate the generation of the kunitconfig file, perhaps? Possibly. I have some friends on the TAP team (automated testing team within Google), and it sounds like that is actually a pretty hard problem, but something that is at least possible. Still, it would be nice to have a way to periodically run all the tests. > The other sad bit about having mutually exclusive config options is > that we can't easily "run all KUinit tests" for some kind of test > spinner or zero-day bot. > > I'm not sure there's a good solution to that issue, though. I think, as I mentioned above, the best we can do is probably have a thing which generates a set of kunitconfigs that in sum will run all the tests. Thoughts?