[PATCH] docs: dt: unittest: update to current unittest filenames

Markus Heidelberg posted 1 patch 1 month, 3 weeks ago
Documentation/devicetree/of_unittest.rst      | 20 +++++++++---------
.../zh_CN/devicetree/of_unittest.rst          | 21 +++++++++++--------
2 files changed, 22 insertions(+), 19 deletions(-)
[PATCH] docs: dt: unittest: update to current unittest filenames
Posted by Markus Heidelberg 1 month, 3 weeks ago
There have been several renamings and modified Make rules since
introduction of this unittest document.

The file list in the Chinese translation had been extended.
For a change to drivers/of/unittest-data/tests-*.dtsi surrounding
translation has to be updated.

Signed-off-by: Markus Heidelberg <m.heidelberg@cab.de>
---
 Documentation/devicetree/of_unittest.rst      | 20 +++++++++---------
 .../zh_CN/devicetree/of_unittest.rst          | 21 +++++++++++--------
 2 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/Documentation/devicetree/of_unittest.rst b/Documentation/devicetree/of_unittest.rst
index 8b557acd29d1..6ed6e3291964 100644
--- a/Documentation/devicetree/of_unittest.rst
+++ b/Documentation/devicetree/of_unittest.rst
@@ -48,30 +48,30 @@ from 'scripts/dtc/of_unittest_expect --help'.
 3. Test-data
 ============
 
-The Device Tree Source file (drivers/of/unittest-data/testcases.dts) contains
+The Device Tree Source file (drivers/of/unittest-data/testcases.dtso) contains
 the test data required for executing the unit tests automated in
 drivers/of/unittest.c. See the content of the folder::
 
     drivers/of/unittest-data/tests-*.dtsi
 
-for the Device Tree Source Include files (.dtsi) included in testcases.dts.
+for the Device Tree Source Include files (.dtsi) included in testcases.dtso.
 
 When the kernel is built with CONFIG_OF_UNITTEST enabled, then the following make
 rule::
 
-    $(obj)/%.dtb: $(src)/%.dts FORCE
-	    $(call if_changed_dep, dtc)
+    $(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE
+	    $(call if_changed_dep,dtc)
 
-is used to compile the DT source file (testcases.dts) into a binary blob
-(testcases.dtb), also referred as flattened DT.
+is used to compile the DT source file (testcases.dtso) into a binary blob
+(testcases.dtbo), also referred as flattened DT.
 
 After that, using the following rule the binary blob above is wrapped as an
-assembly file (testcases.dtb.S)::
+assembly file (testcases.dtbo.S)::
 
-    $(obj)/%.dtb.S: $(obj)/%.dtb
-	    $(call cmd, dt_S_dtb)
+    $(obj)/%.dtbo.S: $(obj)/%.dtbo FORCE
+	    $(call if_changed,wrap_S_dtb)
 
-The assembly file is compiled into an object file (testcases.dtb.o), and is
+The assembly file is compiled into an object file (testcases.dtbo.o), and is
 linked into the kernel image.
 
 
diff --git a/Documentation/translations/zh_CN/devicetree/of_unittest.rst b/Documentation/translations/zh_CN/devicetree/of_unittest.rst
index 5c1a8e0cfd16..cfd0b751ef27 100644
--- a/Documentation/translations/zh_CN/devicetree/of_unittest.rst
+++ b/Documentation/translations/zh_CN/devicetree/of_unittest.rst
@@ -32,27 +32,30 @@ OF Selftest被设计用来测试提供给设备驱动开发者的接口(includ
 2. 测试数据
 ===========
 
-设备树源文件(drivers/of/unittest-data/testcases.dts)包含执行drivers/of/unittest.c
-中自动化单元测试所需的测试数据。目前,以下设备树源包含文件(.dtsi)被包含在testcases.dt中::
+设备树源文件(drivers/of/unittest-data/testcases.dtso)包含执行drivers/of/unittest.c
+中自动化单元测试所需的测试数据。目前,以下设备树源包含文件(.dtsi)被包含在testcases.dtso中::
 
     drivers/of/unittest-data/tests-interrupts.dtsi
     drivers/of/unittest-data/tests-platform.dtsi
     drivers/of/unittest-data/tests-phandle.dtsi
     drivers/of/unittest-data/tests-match.dtsi
+    drivers/of/unittest-data/tests-address.dtsi
+    drivers/of/unittest-data/tests-overlay.dtsi
+    drivers/of/unittest-data/tests-lifecycle.dtsi
 
 当内核在启用CONFIG_OF_UNITTEST的情况下被构建时,那么下面的make规则::
 
-    $(obj)/%.dtb: $(src)/%.dts FORCE
-	    $(call if_changed_dep, dtc)
+    $(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE
+	    $(call if_changed_dep,dtc)
 
-用于将DT源文件(testcases.dts)编译成二进制blob(testcases.dtb),也被称为扁平化的DT。
+用于将DT源文件(testcases.dtso)编译成二进制blob(testcases.dtbo),也被称为扁平化的DT。
 
-之后,使用以下规则将上述二进制blob包装成一个汇编文件(testcases.dtb.S)::
+之后,使用以下规则将上述二进制blob包装成一个汇编文件(testcases.dtbo.S)::
 
-    $(obj)/%.dtb.S: $(obj)/%.dtb
-	    $(call cmd, dt_S_dtb)
+    $(obj)/%.dtbo.S: $(obj)/%.dtbo FORCE
+	    $(call if_changed,wrap_S_dtb)
 
-汇编文件被编译成一个对象文件(testcases.dtb.o),并被链接到内核镜像中。
+汇编文件被编译成一个对象文件(testcases.dtbo.o),并被链接到内核镜像中。
 
 
 2.1. 添加测试数据
-- 
2.43.0

Re: [PATCH] docs: dt: unittest: update to current unittest filenames
Posted by Rob Herring (Arm) 1 month, 3 weeks ago
On Mon, 23 Feb 2026 12:12:03 +0100, Markus Heidelberg wrote:
> There have been several renamings and modified Make rules since
> introduction of this unittest document.
> 
> The file list in the Chinese translation had been extended.
> For a change to drivers/of/unittest-data/tests-*.dtsi surrounding
> translation has to be updated.
> 
> Signed-off-by: Markus Heidelberg <m.heidelberg@cab.de>
> ---
>  Documentation/devicetree/of_unittest.rst      | 20 +++++++++---------
>  .../zh_CN/devicetree/of_unittest.rst          | 21 +++++++++++--------
>  2 files changed, 22 insertions(+), 19 deletions(-)
> 

Applied, thanks!