From nobody Sun Feb 8 12:37:34 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 E250F35FF78 for ; Mon, 12 Jan 2026 14:21:21 +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=1768227689; cv=none; b=fnCSk2mksPhKxiPbjxGKpRW7K3QWK6FlJ0VK+oHpcDOQF7CsS9YzsN4R0bksXZR5JclMoyzdohjxG5iKgBk/hXb6PKLNipUsA80VU2eJ8Ou+cLKVf8gtDwhBw8EEVGUENDxOWHMW6UsX65BHs8LIvzVbhFXTLmYDRWf+6vAHhAg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768227689; c=relaxed/simple; bh=XK4Qj6dGI5I2sDXHvTeRuRbmQgbqoVznNYSvAZEruGo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UlVPBcnO16Ll62owfQ/STT9cy1jSxoplcXytn4AoI9gmg7xH+ZOQ+OlF5tw2nza5Jc/tyF4tG7KEM5K/g0VgmWdmGbNM50BLo6GTIl/hwA4Sjq/4pNwNxcg8FYkwUci13a1N9nIXvZ+3jOYaj1FO+blIMz5JeVAcsOM/eVsZnZY= 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=moT0VZQz; 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="moT0VZQz" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 705184E42088; Mon, 12 Jan 2026 14:21:20 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 4777B606FA; Mon, 12 Jan 2026 14:21:20 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 7F841103C9265; Mon, 12 Jan 2026 15:21:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1768227679; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=cMv+eZ8iw4zoGhMV/2Bi24IbtrvJT0jIrX504J92XpU=; b=moT0VZQzfgkdFfoX+lfDgOhh5TnP4T4fQBKTfYyzzRvpVlU0f46/BdEuS6Y37jW9ai+1Il Qrz80CDiHS56tdLu6d/XallPpb3EWXKTFrmzfAK6uLhJ4FTZo7YPscL0mW013dfdQ5P+o4 +62PpGXr1tnaY9PbMguOong5cVeRicEpjNOMSnBNNUX48DzDuaV3mZBMt7KbWIcEeUNJkM ht/pKy5L39NabintnXFZvr6SlhFsfKX44rCrxMFXWQ6An52fxRINBun3cJ9ZERA/HP27dr T8WWRWMubHbI9b+TaheBBFq0F4LinfTl0wwNBB3BF/I042LUh2D5uQyhP7qptw== 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 38/77] tests: metadata: Improve sort test to check for import symbols sorting Date: Mon, 12 Jan 2026 15:19:28 +0100 Message-ID: <20260112142009.1006236-39-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 the import symbols list 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 | 4 ++++ tests/metadata_sort.dtb.expect | 3 +++ tests/metadata_sort.dts | 4 ++++ tests/run_tests.sh | 4 ++-- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/metadata_sort.dtb.dts.expect b/tests/metadata_sort.dtb.d= ts.expect index f07a42b..270c06d 100644 --- a/tests/metadata_sort.dtb.dts.expect +++ b/tests/metadata_sort.dtb.dts.expect @@ -1,6 +1,10 @@ /dts-v1/; /addon/; =20 +/import/ abc: "foo,bar"; +/import/ de1: "foo,bar"; +/import/ de2: "foo,bar"; + / { =20 node-a { diff --git a/tests/metadata_sort.dtb.expect b/tests/metadata_sort.dtb.expect index 7856894..0dacab7 100644 --- a/tests/metadata_sort.dtb.expect +++ b/tests/metadata_sort.dtb.expect @@ -13,3 +13,6 @@ phandle =3D <0x00000001>; }; }; +// [FDT_IMPORT_SYM] 'abc' (foo,bar) +// [FDT_IMPORT_SYM] 'de1' (foo,bar) +// [FDT_IMPORT_SYM] 'de2' (foo,bar) diff --git a/tests/metadata_sort.dts b/tests/metadata_sort.dts index 7d1cca7..e523e20 100644 --- a/tests/metadata_sort.dts +++ b/tests/metadata_sort.dts @@ -6,6 +6,10 @@ /dts-v1/; /addon/; =20 +/import/ de1: "foo,bar"; +/import/ abc: "foo,bar"; +/import/ de2: "foo,bar"; + / { node_b: node-b { }; diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 5368db9..a5e31df 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -1158,8 +1158,8 @@ metadata_tests() { =20 run_dtc_test -I dts -O dtb -s -o metadata_sort.dtb "$SRCDIR/metadata_sort= .dts" base_run_test wrap_fdtdump metadata_sort.dtb metadata_sort.dtb.out - # Remove unneeded comments - sed -i '/^\/\/ /d' metadata_sort.dtb.out + # Remove unneeded comments, keep comments in the form '// [xxxx' + sed -i '/^\/\/ [^\[]/d' metadata_sort.dtb.out base_run_test check_diff metadata_sort.dtb.out "$SRCDIR/metadata_sort.dtb= .expect" run_dtc_test -I dtb -O dts -o metadata_sort.dtb.dts metadata_sort.dtb base_run_test check_diff metadata_sort.dtb.dts "$SRCDIR/metadata_sort.dtb= .dts.expect" --=20 2.52.0