Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3086487pxb; Tue, 12 Jan 2021 06:08:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3pTSaFXEyx1VadmrGZaEb5IvEro2AZPXYgGNdsX8kU7UsVCAByRkC+M1BFmnsbLuBC8fn X-Received: by 2002:a17:906:4058:: with SMTP id y24mr3240791ejj.245.1610460501424; Tue, 12 Jan 2021 06:08:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610460501; cv=none; d=google.com; s=arc-20160816; b=kRrGCmxcOYYhAoBVo7H7wZuaV4OBFY/Pbkq3qkLgtup2gRRhwOsod8aektb5mQFcWx u8IyclhCMZWzHQl/l+l28RvV9NHg4nc4DNrX+R2wPcVVs7LoHwTKzMCMZ5W6+ZqScQ+E TYUpMzbrT4sR84exZsYuvcnPJpU/MZnyxzzCoI3KLmoTb7T0WqUapVbhXr5w2PgDlA09 669j8vtsEP0ojGmyfopcq2soGPAP07XmUDyMIEK/+JDwtgb93yT6vy9lxSjAS/Wi93jH 6FOBKh3Mj0As6Juu436oG2HcNg3kLz7jNSv9V3Ckq+LquCgCd42eJlYzpQBqTZIgsFqW pQ7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Jf/PIYATu3y6PbZLgGRxzcU7rEf7E+M3DYJ3+9F4uws=; b=cqdG/IXDNWRhNPfZJ3B2n+yS6bfmNuuCReY11G/xy1KyoOOtICjBcPFqnIqLNnMapN NA7lG8qPaj7HuZQxkDnhgX0ioIcpeHs5SLT1lgVWDVhb9gmPnSqq+dX3XCgYUe2ZUYGS jw2kZn8UCmqWAikEjTosr8RLSTkxdg7YoLSR8sxCFMeLZ8Mb19YOymGRuRyLC+jaW0wm GL/1tVf2ecae84yl8FfkIBDlQdr0/FzbfqJP1n0ankuul1yMFzUNV2+/w9fPgbIfNHxb jtCpEEapchCoW6asrynZ4G8J8gctTh7jZFt1d91DRsy+6cSV9xzjE+UNoJBPuG4WuQ9R vFHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZAkvt9t8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id h26si1194831ejq.399.2021.01.12.06.07.54; Tue, 12 Jan 2021 06:08:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZAkvt9t8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1730543AbhALOFu (ORCPT + 99 others); Tue, 12 Jan 2021 09:05:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:48920 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727954AbhALOFu (ORCPT ); Tue, 12 Jan 2021 09:05:50 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4EFF423102; Tue, 12 Jan 2021 14:05:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610460309; bh=hEyF8u1jTp1PdY2BgjCeEQOjkCa4GQKBP+Ai0lRFwnI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ZAkvt9t8Aor96P99OppfBioEuqN08bN/qqHnCLPzBFsvHwmv+TS5L8y1SfDjvkb6Z XFZX5vBv7oYPhEdmv8k5dra3x9f96FoJg4SPVBSKq/f8uJKTa26JsEUf3UDBvCdSt8 8i4IOG28IJ62lXksW63gSRG5A0QTggaL/riLMgJE6f6WqZMHx7yMvtNPCMAwYdDz7F LO5NUok+6iBA7bs1wo0ggXTchXqxQEUm5k1mNuiXRj0bv1JXHa48RH6GnQ3GDZjsaf hEU76Wzmzvelqd7vTZ2wVCp2qRXE4QAGzB6Uzbpzzt8j7JVJ1CUp0O6zAlNDNCAzAA FtrPayBvBq32w== Received: by mail-ed1-f44.google.com with SMTP id b2so2439674edm.3; Tue, 12 Jan 2021 06:05:09 -0800 (PST) X-Gm-Message-State: AOAM53316nN7HgC7KDeycUKipurB+TP2owX5sEGSKLRWTdJWChSp7zdU xIaqTYV4IxcUX05D3SfV4rA/Al8KmkCDGlrL9Q== X-Received: by 2002:a50:f404:: with SMTP id r4mr3569989edm.62.1610460307833; Tue, 12 Jan 2021 06:05:07 -0800 (PST) MIME-Version: 1.0 References: <1e42183ccafa1afba33b3e79a4e3efd3329fd133.1610095159.git.viresh.kumar@linaro.org> <23e16d20-36eb-87d9-4473-142504ad8a95@gmail.com> In-Reply-To: <23e16d20-36eb-87d9-4473-142504ad8a95@gmail.com> From: Rob Herring Date: Tue, 12 Jan 2021 08:04:55 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] of: unittest: Statically apply overlays using fdtoverlay To: Frank Rowand Cc: Viresh Kumar , Pantelis Antoniou , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Linux Kbuild mailing list , Vincent Guittot , Bill Mills , Anmar Oueja , Masahiro Yamada Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 11, 2021 at 4:06 PM Frank Rowand wrote: > > On 1/8/21 2:41 AM, Viresh Kumar wrote: > > Now that fdtoverlay is part of the kernel build, start using it to test > > the unitest overlays we have by applying them statically. > > > > The file overlay_base.dtb have symbols of its own and we need to apply > > overlay.dtb to overlay_base.dtb alone first to make it work, which gives > > us intermediate-overlay.dtb file. > > > > The intermediate-overlay.dtb file along with all other overlays is them > > applied to testcases.dtb to generate the master.dtb file. > > > > Signed-off-by: Viresh Kumar > > NACK to this specific patch, in its current form. > > There are restrictions on applying an overlay at runtime that do not apply > to applying an overlay to an FDT that will be loaded by the kernel during > early boot. Thus the unittest overlays _must_ be applied using the kernel > overlay loading methods to test the kernel runtime overlay loading feature. This patch doesn't take away from any of that and it completely orthogonal. > I agree that testing fdtoverlay is a good idea. I have not looked at the > parent project to see how much testing of fdtoverlay occurs there, but I > would prefer that fdtoverlay tests reside in the parent project if practical > and reasonable. If there is some reason that some fdtoverlay tests are > more practical in the Linux kernel repository then I am open to adding > them to the Linux kernel tree. If you (or more importantly someone else sending us patches) make changes to the overlays, you can test that they apply at build time rather than runtime. I'll take it! So please help on fixing the issue because I want to apply this. And yes, dtc has fdtoverlay tests. But this patch shows there's at least 2 issues. fdtoverlay can't apply overlays to the root and using an overlay as the base tree in UML is odd IMO. Rob