From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6E10321A02937 for ; Wed, 28 Nov 2018 13:16:46 -0800 (PST) Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) (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 1E72021473 for ; Wed, 28 Nov 2018 21:16:46 +0000 (UTC) Received: by mail-qk1-f180.google.com with SMTP id w204so17770998qka.2 for ; Wed, 28 Nov 2018 13:16:46 -0800 (PST) MIME-Version: 1.0 References: <20181128193636.254378-1-brendanhiggins@google.com> <20181128193636.254378-17-brendanhiggins@google.com> In-Reply-To: <20181128193636.254378-17-brendanhiggins@google.com> From: Rob Herring Date: Wed, 28 Nov 2018 15:16:34 -0600 Message-ID: Subject: Re: [RFC v3 16/19] arch: um: make UML unflatten device tree when testing List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Brendan Higgins Cc: brakmo@fb.com, dri-devel , linux-kselftest@vger.kernel.org, shuah@kernel.org, Frank Rowand , linux-nvdimm , Richard Weinberger , knut.omang@oracle.com, Kieran Bingham , Joel Stanley , Jeff Dike , "Bird," Timothy" , Kees Cook ," linux-um@lists.infradead.org, Steven Rostedt , Julia Lawall , kunit-dev@googlegroups.com, Greg Kroah-Hartman , "linux-kernel@vger.kernel.org" , "Luis R. Rodriguez" , Daniel Vetter , Michael Ellerman , Joe Perches , Kevin Hilman List-ID: On Wed, Nov 28, 2018 at 1:38 PM Brendan Higgins wrote: > > Make UML unflatten any present device trees when running KUnit tests. > > Signed-off-by: Brendan Higgins > --- > arch/um/kernel/um_arch.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c > index a818ccef30ca2..bd58ae3bf4148 100644 > --- a/arch/um/kernel/um_arch.c > +++ b/arch/um/kernel/um_arch.c > @@ -13,6 +13,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -347,6 +348,9 @@ void __init setup_arch(char **cmdline_p) > read_initrd(); > > paging_init(); > +#if IS_ENABLED(CONFIG_OF_UNITTEST) > + unflatten_device_tree(); > +#endif Kind of strange to have this in the arch code. I'd rather have this in the unittest code if possible. Can we have an initcall conditional on CONFIG_UM in the unittest do this? Side note, use a C if with IS_ENABLED() whenever possible instead of pre-processor #if. I'll take a fix separately as it was on my todo to fix. I've got the unit tests running in a gitlab CI job now[1]. Rob [1] https://gitlab.com/robherring/linux-dt-unittest/pipelines _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm