Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4106833imj; Tue, 19 Feb 2019 15:39:48 -0800 (PST) X-Google-Smtp-Source: AHgI3Iae4RtWPaatPn1HDUq7Y5g9ba/HNQbRIs94PeGv0TesHlFBZ7s1FNxK1HmV3xAMNEk5ND0z X-Received: by 2002:a17:902:7007:: with SMTP id y7mr31553480plk.167.1550619588719; Tue, 19 Feb 2019 15:39:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550619588; cv=none; d=google.com; s=arc-20160816; b=q2F+YRBNQzd1czHUvU3g+PhUy+/QReuW1UmeL91/uQ11SfdpwDa102rxCjaWH54hTg 2dHsCqx1o4rgAJHG2HZ6VKqCgCze3JlVvR1lJVY0K92PAGQzgCOmF/8FFmGTC3WpPOg5 OUwUuGS9BcTmIE0vjWJAODsjQatKBuGZTYC5Z1S9JGyrHYkrC8EfWiqWmw0+k25PhvPm pR4f5YOM4d1TP8WJJrKUpwh20/437LLyVbyCBY1hDWCrekRaPrtMKpjoJhhhtxrWj++y I5B42WNngBa3iCQ0mNJaabzel9QxzfsW8sLccJKZHUQLJI20bJU/ah2aMxR5MOcKQ7uY EQog== 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=JTEHxB85X7mXy+xnotDPHC+lAi11j10avRqG+prbNps=; b=oSCNkdjubhVSKxlLnQQBEwloTxX8Bq33TI4RM4mtR0UwEWicAiV2Op6reA++9daEi9 285Mbi93zrbcUbreLwfbdjjyN9pOeZwFqOg1F8yhzF0VZ9pObn2vfLGPYJFMp20eG9XQ BKoDWNj1mVzXSy4YLep5rD4Vj9rkHp/KsC6eMPX++alAYFeEJTZS8k7OyqWXMf106rZY 1vbWn+OMMKQTTG+PuJgNE52TfS7D4ciNAC2MzBrO+z9mGIWnv5V1JEES4fNnf/yTAuZv R77JKcNVZyaUm7sElK1Gn3MUdTtzsbQyYeU7CIWV/iz+CMdVBjZRne/S3gOjEJi6ZkRT LmMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Iq6FOybL; 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 e67si14467585pfh.212.2019.02.19.15.39.33; Tue, 19 Feb 2019 15:39:48 -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=@google.com header.s=20161025 header.b=Iq6FOybL; 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 S1730040AbfBSXig (ORCPT + 99 others); Tue, 19 Feb 2019 18:38:36 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:38191 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728753AbfBSXig (ORCPT ); Tue, 19 Feb 2019 18:38:36 -0500 Received: by mail-ot1-f65.google.com with SMTP id m1so37141215otf.5 for ; Tue, 19 Feb 2019 15:38:35 -0800 (PST) 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=JTEHxB85X7mXy+xnotDPHC+lAi11j10avRqG+prbNps=; b=Iq6FOybLXiD4S1XABXuua7GzVXHjNGMMs1NwtPi5+XGORhjLam1vo289vhL8XFKiBB c+roae7BQ2eR7SnNN6s6M+/jKi6VpIGxFrNcn9kI//+gPzJVaGs8nur1eZJd3+nKki5v dqPj1/RRDad2SSWkO/0K9sONug3CUf8NO2ojuv+leICfJ3fsYvbjhhE3MV3xK/iU99gv rvoSS9S8h0GWiLWPCzrq6QimynYt3+dFJqroTuzAaMRSd01L9qw5sXtW+pWzP5obp8WQ byHgObOxiVZrwH0nQ6p/ZiiAU6kPPbucegWhF2uG0c5OxZFl/DpARZc2AayED9mALPG/ eDXw== 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=JTEHxB85X7mXy+xnotDPHC+lAi11j10avRqG+prbNps=; b=DFvo786FvMkdE7JmvNCqu49cd96azb2U7i6Qs9V/O3fyE0IX3DuxvECrHINOWMHcfW ipMBcFj0+iFava19DYeYQN46CPlYNPpB5B2Iul/LqlayEVRyOIRfceghlWq7n8T6nWIX RydCQ1j6cCyTuA55Gvt0v9lyzPha6qLk4sBXUfyGkH0DzoQG5PHCaznE0ycRyLdJ2d9f c4boI8UOF3kRdotfV9lBumqrE//k3aB03Ep3/ikvoiSkEyYv1XmocWEBgumPHFoxH6FS 77axW71tH43xD9j7wceVSuCq2dnxFo6aJVwqKDBJFazTTXAjrj7Oh9nhFo5AvLWWTqo3 Y9gA== X-Gm-Message-State: AHQUAuZ5Ou9Rwqeqj1z0oigC2YrSvjmXK/bXH6nj/O1+xyprGm7QKbqr Okn0izGP17+RcPKrn4R+LX3degyjtCiWjuZ7gK+okQ== X-Received: by 2002:aca:c6d5:: with SMTP id w204mr4184704oif.137.1550619514888; Tue, 19 Feb 2019 15:38:34 -0800 (PST) MIME-Version: 1.0 References: <20190216004647.206431-1-brendanhiggins@google.com> In-Reply-To: From: Brendan Higgins Date: Tue, 19 Feb 2019 15:38:24 -0800 Message-ID: Subject: Re: [PATCH v2] of: unittest: unflatten device tree on UML when testing To: Frank Rowand Cc: Rob Herring , Luis Chamberlain , devicetree , Linux Kernel Mailing List 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, Feb 15, 2019 at 6:35 PM Frank Rowand wrote: > > On 2/15/19 6:18 PM, Frank Rowand wrote: > > On 2/15/19 4:46 PM, Brendan Higgins wrote: > >> UML supports enabling OF, and is useful for running the device tree > >> tests, so add support for unflattening device tree blobs so we can > >> actually use it. > >> > >> Signed-off-by: Brendan Higgins > >> --- > >> drivers/of/unittest.c | 3 +++ > >> 1 file changed, 3 insertions(+) > >> > >> diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c > >> index 84427384654d5..6de34d5fa0e85 100644 > >> --- a/drivers/of/unittest.c > >> +++ b/drivers/of/unittest.c > >> @@ -2527,6 +2527,9 @@ static int __init of_unittest(void) > >> } > >> of_node_put(np); > >> > >> + if (IS_ENABLED(CONFIG_UML)) > >> + unittest_unflatten_overlay_base(); > >> + > > > > This is still the wrong location. It should be at the top of the function. Oh sorry, I figured since this only sets up the overlay_base that the dependency order didn't matter. I will send an updated patch shortly. > > > > I'll try moving it to the top and see if it still works -- should only > > take me a few minutes. > > Yep, see below. > > > > -Frank > > > >> pr_info("start of unittest - you will see error messages\n"); > >> of_unittest_check_tree_linkage(); > >> of_unittest_check_phandles(); > >> > > > > > > This is probably white space damaged because I used cut and paste, > but this is what I meant above. > > Tested on 5.0-rc3. > > Applied patches 1-14 of series: > > [RFC v4 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework > > booted uml, saw the expected 219 pass, 1 fail. > > Applied the following patch, saw the expected 224 pass, 0 fail. > > I did not apply patch 15 of the other series, but applying patch 15 > should still result in errors on boot, as I reported in the mail > thread for that patch series. Sure, I will address that there. Thanks!