Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2270164ybg; Sat, 19 Oct 2019 11:37:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqwT1tvdcGh4FFd5HoZFbMnjaup8Ey2CXglQ1fNvoFR/V6POisYiIbCfD1bOgA4Pot/qwsi3 X-Received: by 2002:a17:906:8315:: with SMTP id j21mr14712809ejx.244.1571510240172; Sat, 19 Oct 2019 11:37:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571510240; cv=none; d=google.com; s=arc-20160816; b=U3b4jrfie/yAxlh8oECFOHwxEDn8cqzmjz3BeAnOj25jFqJwXkbprAi5an849/pfN1 xSOOG5WGcRfLVWZDUmr3p1UEBLdAAyFAtKbc/QYww2Dlzl92KXwGWSPETWgLJnNFKzfr LU0xmUU2LIHxmbcYUwV//0rv9DVv5ZflZ5uGSxshqDqnw8ZbGUgX9MOj7c7PT3OGrIaT huR1sEUdrac2vZmum7s+UoEqhheZBHrjP653SzsAu/gfzmDbC6ESRoc1INARO/v6xhLh 7uiptjdIKiriZQIXlr/MpCxT3qKhSRuLfnsnmyGFEnhpCXyfv9MHW/JTWXvIdBb9uOOk jtYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=diC5OhcgPAQon4MoTk8oBGJIDhBSL5N3IWATCx4/9pA=; b=QMgEHvpPoaM2Lxi+hpUK4782IM/EiKw8fT24BRljwgMweMrBL+dy0bTGjmRwBMgVQv Dzo7qNEqleOEOzE1aDr06rDqUZeMRaYBvT63/AK1dzU8WdTsOBaZEU43mKxtdS3ZMp99 033Yf0siP9maKTPraK5LG8x1VGc/xKqbnUcRIKDd8O08i9WH58OrcmJ15OD7/1nsPlhs rjo9JYVlz7yDCNCoxCVGp5lPxpRomX1k5HuSgmOi/RI1jkhlmjIAyC3R8aZsWFY8fBbz sj7Yswudch+qwQJmBlFInLFtaDEl2z97d4ba7CNp9O2zaE8bn8OJJa+Z7V/tevgPetVY 7G1A== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v12si6545092edf.212.2019.10.19.11.36.56; Sat, 19 Oct 2019 11:37:20 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726133AbfJSSgr (ORCPT + 99 others); Sat, 19 Oct 2019 14:36:47 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:42838 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726077AbfJSSgr (ORCPT ); Sat, 19 Oct 2019 14:36:47 -0400 Received: by mail-pf1-f196.google.com with SMTP id q12so5811858pff.9; Sat, 19 Oct 2019 11:36:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=diC5OhcgPAQon4MoTk8oBGJIDhBSL5N3IWATCx4/9pA=; b=fPzpyISqGRrzhG3UjcuuoLYaIWtp+frAaLeP6a6dfGgX/cLKXk+T9NFIDUtYY8oPGG 4KYgmWPdyz5bbiBKd0DnLXt1lVV02TSCMB/oGkGKqBl1BcoAQ13vKI3Mh3j1nwwUcLSR w0ciXPA6NjD5BbhhT2B5pHfd9iAySV0pbzPut53QAPVKvIafm+B6odLaeMzb8qd9ZQ+b hI/7pmc/NdMRZpioE30XcpiaGGGQxunwG6ZjH01FIo6xRQoSFL5gXwoa+DAeYS3m0xx/ L8u9i0KTn2vTAHbRz/bsLlfJMT+tp9hkHpQtE7T/s3NZ6g9rO0o9QxjezZntUHgC5Rwq M5zw== X-Gm-Message-State: APjAAAXxbk1au8JZEnFgCwO5OJwP27r9DQX7fV4mc8NKB/eJ0xM+lMgX 0TTRJHXV0jR3vWNCcmpPFL4= X-Received: by 2002:a63:1e04:: with SMTP id e4mr16626950pge.4.1571510205979; Sat, 19 Oct 2019 11:36:45 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id e192sm10404393pfh.83.2019.10.19.11.36.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2019 11:36:44 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 8F7D440256; Sat, 19 Oct 2019 18:36:43 +0000 (UTC) Date: Sat, 19 Oct 2019 18:36:43 +0000 From: Luis Chamberlain To: Alan Maguire Cc: Brendan Higgins , Matthias Maennich , shuah@kernel.org, john.johansen@canonical.com, jmorris@namei.org, serge@hallyn.com, keescook@chromium.org, yzaikin@google.com, davidgow@google.com, tytso@mit.edu, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, Mike Salvatore Subject: Re: [PATCH linux-kselftest/test v1] apparmor: add AppArmor KUnit tests for policy unpack Message-ID: <20191019183643.GG11244@42.do-not-panic.com> References: <20191018001816.94460-1-brendanhiggins@google.com> <20191018122949.GD11244@42.do-not-panic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 19, 2019 at 01:56:01PM +0100, Alan Maguire wrote: > On Fri, 18 Oct 2019, Luis Chamberlain wrote: > > > On Thu, Oct 17, 2019 at 05:18:16PM -0700, Brendan Higgins wrote: > > > From: Mike Salvatore > > > > > > In order to write the tests against the policy unpacking code, some > > > static functions needed to be exposed for testing purposes. One of the > > > goals of this patch is to establish a pattern for which testing these > > > kinds of functions should be done in the future. > > > > And you'd run into the same situation expressed elsewhere with kunit of > > an issue of the kunit test as built-in working but if built as a module > > then it would not work, given the lack of exports. Symbols namespaces > > should resolve this [0], and we'd be careful where a driver imports this > > namespace. > > > > [0] https://lwn.net/Articles/798254/ > > > > Thanks for the link! Looks interesting for us definitely! > > WRT adding tests, I think what we're aiming at is a set of best practices > to advise test developers using KUnit, while attempting to minimize > side-effects of any changes we need to make to support testability. > > One aspect of this we probably have to consider is inlining of code. Sure. Makes sense. Luis