aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/of/unittest.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index ac1a834f828f..aba8946cac46 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -92,6 +92,11 @@ static void __init of_selftest_find_node_by_name(void)
92 "option path test failed\n"); 92 "option path test failed\n");
93 of_node_put(np); 93 of_node_put(np);
94 94
95 np = of_find_node_opts_by_path("/testcase-data:test/option", &options);
96 selftest(np && !strcmp("test/option", options),
97 "option path test, subcase #1 failed\n");
98 of_node_put(np);
99
95 np = of_find_node_opts_by_path("/testcase-data:testoption", NULL); 100 np = of_find_node_opts_by_path("/testcase-data:testoption", NULL);
96 selftest(np, "NULL option path test failed\n"); 101 selftest(np, "NULL option path test failed\n");
97 of_node_put(np); 102 of_node_put(np);
@@ -102,6 +107,12 @@ static void __init of_selftest_find_node_by_name(void)
102 "option alias path test failed\n"); 107 "option alias path test failed\n");
103 of_node_put(np); 108 of_node_put(np);
104 109
110 np = of_find_node_opts_by_path("testcase-alias:test/alias/option",
111 &options);
112 selftest(np && !strcmp("test/alias/option", options),
113 "option alias path test, subcase #1 failed\n");
114 of_node_put(np);
115
105 np = of_find_node_opts_by_path("testcase-alias:testaliasoption", NULL); 116 np = of_find_node_opts_by_path("testcase-alias:testaliasoption", NULL);
106 selftest(np, "NULL option alias path test failed\n"); 117 selftest(np, "NULL option alias path test failed\n");
107 of_node_put(np); 118 of_node_put(np);