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

of: unittest: Add options string testcase variants

Add testcase variants with '/' in the options string to test for
scan beyond end path name terminated by ':'.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Peter Hurley and committed by
Rob Herring
8cbba1ab 106937e8

+11
+11
drivers/of/unittest.c
··· 92 92 "option path test failed\n"); 93 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 100 np = of_find_node_opts_by_path("/testcase-data:testoption", NULL); 96 101 selftest(np, "NULL option path test failed\n"); 97 102 of_node_put(np); ··· 105 100 &options); 106 101 selftest(np && !strcmp("testaliasoption", options), 107 102 "option alias path test failed\n"); 103 + of_node_put(np); 104 + 105 + np = of_find_node_opts_by_path("testcase-alias:test/alias/option", 106 + &options); 107 + selftest(np && !strcmp("test/alias/option", options), 108 + "option alias path test, subcase #1 failed\n"); 108 109 of_node_put(np); 109 110 110 111 np = of_find_node_opts_by_path("testcase-alias:testaliasoption", NULL);