Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: dt: unittest: update to current unittest filenames

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>
Link: https://patch.msgid.link/20260223111207.54640-1-m.heidelberg@cab.de
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

authored by

Markus Heidelberg and committed by
Rob Herring (Arm)
be4b91d9 0220405d

+22 -19
+10 -10
Documentation/devicetree/of_unittest.rst
··· 48 48 3. Test-data 49 49 ============ 50 50 51 - The Device Tree Source file (drivers/of/unittest-data/testcases.dts) contains 51 + The Device Tree Source file (drivers/of/unittest-data/testcases.dtso) contains 52 52 the test data required for executing the unit tests automated in 53 53 drivers/of/unittest.c. See the content of the folder:: 54 54 55 55 drivers/of/unittest-data/tests-*.dtsi 56 56 57 - for the Device Tree Source Include files (.dtsi) included in testcases.dts. 57 + for the Device Tree Source Include files (.dtsi) included in testcases.dtso. 58 58 59 59 When the kernel is built with CONFIG_OF_UNITTEST enabled, then the following make 60 60 rule:: 61 61 62 - $(obj)/%.dtb: $(src)/%.dts FORCE 63 - $(call if_changed_dep, dtc) 62 + $(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE 63 + $(call if_changed_dep,dtc) 64 64 65 - is used to compile the DT source file (testcases.dts) into a binary blob 66 - (testcases.dtb), also referred as flattened DT. 65 + is used to compile the DT source file (testcases.dtso) into a binary blob 66 + (testcases.dtbo), also referred as flattened DT. 67 67 68 68 After that, using the following rule the binary blob above is wrapped as an 69 - assembly file (testcases.dtb.S):: 69 + assembly file (testcases.dtbo.S):: 70 70 71 - $(obj)/%.dtb.S: $(obj)/%.dtb 72 - $(call cmd, dt_S_dtb) 71 + $(obj)/%.dtbo.S: $(obj)/%.dtbo FORCE 72 + $(call if_changed,wrap_S_dtb) 73 73 74 - The assembly file is compiled into an object file (testcases.dtb.o), and is 74 + The assembly file is compiled into an object file (testcases.dtbo.o), and is 75 75 linked into the kernel image. 76 76 77 77
+12 -9
Documentation/translations/zh_CN/devicetree/of_unittest.rst
··· 32 32 2. 测试数据 33 33 =========== 34 34 35 - 设备树源文件(drivers/of/unittest-data/testcases.dts)包含执行drivers/of/unittest.c 36 - 中自动化单元测试所需的测试数据。目前,以下设备树源包含文件(.dtsi)被包含在testcases.dt中:: 35 + 设备树源文件(drivers/of/unittest-data/testcases.dtso)包含执行drivers/of/unittest.c 36 + 中自动化单元测试所需的测试数据。目前,以下设备树源包含文件(.dtsi)被包含在testcases.dtso中:: 37 37 38 38 drivers/of/unittest-data/tests-interrupts.dtsi 39 39 drivers/of/unittest-data/tests-platform.dtsi 40 40 drivers/of/unittest-data/tests-phandle.dtsi 41 41 drivers/of/unittest-data/tests-match.dtsi 42 + drivers/of/unittest-data/tests-address.dtsi 43 + drivers/of/unittest-data/tests-overlay.dtsi 44 + drivers/of/unittest-data/tests-lifecycle.dtsi 42 45 43 46 当内核在启用CONFIG_OF_UNITTEST的情况下被构建时,那么下面的make规则:: 44 47 45 - $(obj)/%.dtb: $(src)/%.dts FORCE 46 - $(call if_changed_dep, dtc) 48 + $(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE 49 + $(call if_changed_dep,dtc) 47 50 48 - 用于将DT源文件(testcases.dts)编译成二进制blob(testcases.dtb),也被称为扁平化的DT。 51 + 用于将DT源文件(testcases.dtso)编译成二进制blob(testcases.dtbo),也被称为扁平化的DT。 49 52 50 - 之后,使用以下规则将上述二进制blob包装成一个汇编文件(testcases.dtb.S):: 53 + 之后,使用以下规则将上述二进制blob包装成一个汇编文件(testcases.dtbo.S):: 51 54 52 - $(obj)/%.dtb.S: $(obj)/%.dtb 53 - $(call cmd, dt_S_dtb) 55 + $(obj)/%.dtbo.S: $(obj)/%.dtbo FORCE 56 + $(call if_changed,wrap_S_dtb) 54 57 55 - 汇编文件被编译成一个对象文件(testcases.dtb.o),并被链接到内核镜像中。 58 + 汇编文件被编译成一个对象文件(testcases.dtbo.o),并被链接到内核镜像中。 56 59 57 60 58 61 2.1. 添加测试数据