Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp94676imu; Thu, 6 Dec 2018 16:43:06 -0800 (PST) X-Google-Smtp-Source: AFSGD/UjiK4V+15yWXKSmxfj+FjW/BWzmC+Ki2Ib8RmOl1ED4b0awPFEvXOgn+fr3WiZRgtsD9fx X-Received: by 2002:a62:36c1:: with SMTP id d184mr131040pfa.242.1544143386177; Thu, 06 Dec 2018 16:43:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544143386; cv=none; d=google.com; s=arc-20160816; b=cnk+jsLZIYRN9cRAROnYZqtVUbRTCDWt3qd6ePI/bJ3uV4me+erloqh7j4m4c82X/S hAWhMiKGZC8GjyDuvW7iYrD66//S3ug1kUZy0iPOXxTAnsAFGSqd2420J97VBvHLkCmE 9+q/UwCSPRu/U/KAp+gZrCGU7GUPfZgDB3s9NaNOSpf/XRrsO0Ty0+CNtdtPRpTuhu1o HvnlekwGCURVje+UIBVOBqueIYoz9FqB8pFVu8j5V88JL6AizYG19yX5+BSJfRnsVzzu dDa5n8rRsPRznm6ulY1St4sP5pItkWSmtelz+ONewC2UjOQPX3YwOB3Ub3abrx0M4GnY SFMQ== 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=OZ1p4l+cb7Uq00GFpaH/t89zELblMqOunwWU8hW2cVU=; b=IbVC6lwxWwfPkG667nH3JT/tHg+qO/eE8zW8WyRWS+ebfv+FKBMn2MdqysIlv2cuBu xuATBXSb2/6lnYIZSKE8SSfa0rypQTYvH9NkNuSEOOfwLYrWHMdLUutWV+Sdfon8a4z5 VrEgKhrj+FYAcrQO6Gz6RNZNe5v8lB3M3E1zEsH8zaTSauTj+EvSZWsuv5wLztXm1Xx8 tZWodDQPqVrZOLInWOxcooPbUl3cJjcE9G98h59qt+qchiCwIfu1neCV9IG+abk1tHgl kQmRqLL6wWyu/UsXUbRrX/DAWgW+Oq03mJwb9SzZqEUykUkg9eUmAGNmwjHzBYr2+oso cHig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LMIdoN64; 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=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 n30si1457055pgb.406.2018.12.06.16.42.38; Thu, 06 Dec 2018 16:43:06 -0800 (PST) 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=@kernel.org header.s=default header.b=LMIdoN64; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725966AbeLGAmA (ORCPT + 99 others); Thu, 6 Dec 2018 19:42:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:54622 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725939AbeLGAl7 (ORCPT ); Thu, 6 Dec 2018 19:41:59 -0500 Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6FAED2146D; Fri, 7 Dec 2018 00:41:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544143318; bh=vqp8LjO/eMXwBlhMDX3QdEwSenFyWd4X75HHYRPAels=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=LMIdoN64gZ3+E4s9S6nSnbOT3yGBylkLJ6fLubvRXjc1u5igW4FxS4Lu5IfsUzQGn Pp37FjBBWAkqcgQUdF/FY1USQX6OTsw6Q99p2UX7yQCDxU3G+drWYW4CR3Fvpkz5wU JByKJMPgQX9IA7O4ODVfKs3qF5u6NWdFNQT5afSM= Received: by mail-qk1-f178.google.com with SMTP id n12so1507351qkh.11; Thu, 06 Dec 2018 16:41:58 -0800 (PST) X-Gm-Message-State: AA+aEWaXfkz+Z6hvubPUi0V3Shtt9MizuqW/fN9FMpTtp69z7xwiw4q9 iGbQM7EsbUu+tOEtBgntumfDJpgioQldTYyoTw== X-Received: by 2002:a37:7682:: with SMTP id r124mr92987qkc.79.1544143317614; Thu, 06 Dec 2018 16:41:57 -0800 (PST) MIME-Version: 1.0 References: <20181128193636.254378-1-brendanhiggins@google.com> <20181128193636.254378-18-brendanhiggins@google.com> <18814973-8f0a-4647-a097-fcc3dc0b3cd3@infradead.org> In-Reply-To: From: Rob Herring Date: Thu, 6 Dec 2018 18:41:46 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC v3 17/19] of: unittest: migrate tests to run on KUnit To: Brendan Higgins Cc: Randy Dunlap , Greg Kroah-Hartman , Kees Cook , "Luis R. Rodriguez" , 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@vger.kernel.org" , Jeff Dike , Richard Weinberger , linux-um@lists.infradead.org, Daniel Vetter , dri-devel , Dan Williams , linux-nvdimm , Kieran Bingham , Frank Rowand , knut.omang@oracle.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 Wed, Dec 5, 2018 at 5:43 PM Brendan Higgins wrote: > > On Tue, Dec 4, 2018 at 5:41 AM Rob Herring wrote: > > > > On Mon, Dec 3, 2018 at 6:14 PM Brendan Higgins > > wrote: > > > > > > On Thu, Nov 29, 2018 at 4:40 PM Randy Dunlap wrote: > > > > > > > > On 11/28/18 12:56 PM, Rob Herring wrote: > > > > >> diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig > > > > >> index ad3fcad4d75b8..f309399deac20 100644 > > > > >> --- a/drivers/of/Kconfig > > > > >> +++ b/drivers/of/Kconfig > > > > >> @@ -15,6 +15,7 @@ if OF > > > > >> config OF_UNITTEST > > > > >> bool "Device Tree runtime unit tests" > > > > >> depends on !SPARC > > > > >> + depends on KUNIT > > > > > Unless KUNIT has depends, better to be a select here. > > > > > > > > That's just style or taste. I would prefer to use depends > > > > instead of select, but that's also just my preference. > > > > > > I prefer depends too, but Rob is the maintainer here. > > > > Well, we should be consistent, not the follow the whims of each maintainer. > > Sorry, I don't think that came out the way I meant it. I don't really > think we are consistent on this point across the kernel, and I don't > feel very strongly about the point, so I was just looking to follow > the path of least resistance. (I also just assumed Rob would keep us > consistent within drivers/of/.) I meant across unittests, we should be consistent. All unittests do either "depends on KUNIT" or "select KUNIT". The question I would ask is does KUNIT need to be user visible or is useful to enable without any unittests enabled? With depends, a user has 2 options to go enable vs. 1 with select. But if you want a global kill switch to turn off all unittests, then depends works better. > I figure if we are running unit tests from the test runner script or > from an automated system, you won't be hunting for dependencies for a > single test every time you want to run a test, so select doesn't make > it easier to configure in most imagined use cases. > > KUNIT hypothetically should not depend on anything, so select should > be safe to use. > > On the other hand, if we end up being wrong on this point and KUnit > gains widespread adoption, I would prefer not to be in a position > where I have to change a bunch of configs all over the kernel because > this example got copied and pasted. You'll be so happy that 100s of tests have been created using kunit, it won't be a big deal. :) In any case, I wouldn't spend more time on this. Rob