Skip to content

Commit 6901378

Browse files
committed
of/unittest: add printf tests for node name
Add some printf test for printing the node name (without the unit-address). Reviewed-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
1 parent b610e2f commit 6901378

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/of/unittest.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,10 @@ static void __init of_unittest_printf(void)
299299

300300
of_unittest_printf_one(np, "%pOF", full_name);
301301
of_unittest_printf_one(np, "%pOFf", full_name);
302+
of_unittest_printf_one(np, "%pOFn", "dev");
303+
of_unittest_printf_one(np, "%2pOFn", "dev");
304+
of_unittest_printf_one(np, "%5pOFn", " dev");
305+
of_unittest_printf_one(np, "%pOFnc", "dev:test-sub-device");
302306
of_unittest_printf_one(np, "%pOFp", phandle_str);
303307
of_unittest_printf_one(np, "%pOFP", "dev@100");
304308
of_unittest_printf_one(np, "ABC %pOFP ABC", "ABC dev@100 ABC");

0 commit comments

Comments
 (0)