From nobody Sun Feb 8 16:31:30 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA4FD36AB6B; Mon, 12 Jan 2026 14:21:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768227721; cv=none; b=Epj0xO9/nMBupyQLBw32d1s/Zq0iaYjcclO7QTSgHVpzCch51b5r/z3gZdjoGZywDiZAQ1Lseoopnk+IlKHI/mtO3Sqio5mSl1J7GHV2y21vc1EXkQCeDldYsvYXgx0MEV/GjdbtJjqPyAa21FNmxHaloaBI7Dm6EzP4XWU0vPQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768227721; c=relaxed/simple; bh=ukav0csfGSYhTySJmPXHNDEiPKRwkJZCNFtIAOUkmi8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=O/SUg4wONE/8gG8DrEI9FWssdr/ODAtnXgrAAlgla64Um9+Pi+W4EB5xWKkvT3czqkWZSkZB1Yl6LryTl3luuZGcIhpTICQbQSayiyGFvph9FPShxQAF6Z41Mx2tpDikf0XpNxoiW6gACR4QPjnhfcJM+uN+wn1iEkrzJnaVVQg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=2S9yzatz; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="2S9yzatz" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 732EC4E42097; Mon, 12 Jan 2026 14:21:58 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 4397A606FA; Mon, 12 Jan 2026 14:21:58 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id D6DED103C9260; Mon, 12 Jan 2026 15:21:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1768227717; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=SCPDW1Fd99/HH0hpXZlq0g01YveqESOf+XNqKOwlufg=; b=2S9yzatzpGeiD2XvkKJeGBcf+5CxcQf0O24l+LQkIjakRP6k3Kmi+x0HnGB1t+uz+LAkeH uyscI1CWo/2zkRx64RVpX51KSiR16ow/fyG9niu0hT7mDli96o7R3gQSJYbkmYxlyStJ6r lBsu/aRD71aT/z2umqtiK+Bc0x4GqSpjnWgQE4mNX8uFt/0xXF/UjHY/YNWc4xvuBFYuQT ZMMfZthtbrBVTfqowLrLFhv85uB/s9deBUH0jmHEUSAk8EIumJFd5Hx5KOweu3Vkj9zCUR hrhySUBNGwJcta/adetiSyoSmbRHq/x+HVOHm8dmghXLSPLDw3f1o3W4qIp1Yg== From: Herve Codina To: David Gibson , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Ayush Singh , Geert Uytterhoeven , devicetree-compiler@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree-spec@vger.kernel.org, Hui Pu , Ian Ray , Luca Ceresoli , Thomas Petazzoni , Herve Codina Subject: [RFC PATCH 63/77] tests: metadata: Improve sort test to check for orphan nodes sorting Date: Mon, 12 Jan 2026 15:19:53 +0100 Message-ID: <20260112142009.1006236-64-herve.codina@bootlin.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260112142009.1006236-1-herve.codina@bootlin.com> References: <20260112142009.1006236-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" dtc is able to sort orphan nodes when the --sort option is used. Improve the metadata sort test to perform a check for this feature. Signed-off-by: Herve Codina --- tests/metadata_sort.dtb.dts.expect | 39 ++++++++++++++++++++++++++++++ tests/metadata_sort.dtb.expect | 30 +++++++++++++++++++++++ tests/metadata_sort.dts | 33 +++++++++++++++++++++++++ 3 files changed, 102 insertions(+) diff --git a/tests/metadata_sort.dtb.dts.expect b/tests/metadata_sort.dtb.d= ts.expect index 270c06d..df3c02b 100644 --- a/tests/metadata_sort.dtb.dts.expect +++ b/tests/metadata_sort.dtb.dts.expect @@ -20,3 +20,42 @@ phandle =3D <0x01>; }; }; + +&abc { + prop-a =3D "a"; + prop-b =3D "b"; + + node-a { + prop =3D <0x01>; + }; + + node-b { + prop =3D <0x02>; + }; + + node-c { + prop =3D <0x03>; + }; +}; + +&de1 { + prop-a =3D "a"; + prop-b =3D "b"; + + node-a { + prop =3D <0x01>; + }; + + node-b { + prop =3D <0x02>; + }; + + node-c { + prop =3D <0x03>; + }; +}; + +&de2 { + prop-a =3D "a"; + prop-b =3D "b"; +}; diff --git a/tests/metadata_sort.dtb.expect b/tests/metadata_sort.dtb.expect index 0dacab7..47002fe 100644 --- a/tests/metadata_sort.dtb.expect +++ b/tests/metadata_sort.dtb.expect @@ -16,3 +16,33 @@ // [FDT_IMPORT_SYM] 'abc' (foo,bar) // [FDT_IMPORT_SYM] 'de1' (foo,bar) // [FDT_IMPORT_SYM] 'de2' (foo,bar) +&abc { + prop-a =3D "a"; + prop-b =3D "b"; + node-a { + prop =3D <0x00000001>; + }; + node-b { + prop =3D <0x00000002>; + }; + node-c { + prop =3D <0x00000003>; + }; +}; +&de1 { + prop-a =3D "a"; + prop-b =3D "b"; + node-a { + prop =3D <0x00000001>; + }; + node-b { + prop =3D <0x00000002>; + }; + node-c { + prop =3D <0x00000003>; + }; +}; +&de2 { + prop-a =3D "a"; + prop-b =3D "b"; +}; diff --git a/tests/metadata_sort.dts b/tests/metadata_sort.dts index e523e20..3b690a5 100644 --- a/tests/metadata_sort.dts +++ b/tests/metadata_sort.dts @@ -23,3 +23,36 @@ /export/ a: &node_b; }; }; + +&de2 { + prop-b =3D "b"; + prop-a =3D "a"; +}; + +&abc { + prop-b =3D "b"; + prop-a =3D "a"; + node-b { + prop =3D <2>; + }; + node-a { + prop =3D <1>; + }; + node-c { + prop =3D <3>; + }; +}; + +&de1 { + prop-b =3D "b"; + prop-a =3D "a"; + node-b { + prop =3D <2>; + }; + node-a { + prop =3D <1>; + }; + node-c { + prop =3D <3>; + }; +}; --=20 2.52.0