• Home
  • Raw
  • Download

Lines Matching +full:i2c +full:- +full:alias

1 // SPDX-License-Identifier: GPL-2.0
6 #define pr_fmt(fmt) "### dt-test ### " fmt
10 #include <linux/dma-direct.h> /* to test phys_to_dma/dma_to_phys */
26 #include <linux/i2c.h>
27 #include <linux/i2c-mux.h>
52 #define OF_KREF_READ(NODE) kref_read(&(NODE)->kobj.kref)
76 np = of_find_node_by_path("/testcase-data"); in of_unittest_find_node_by_name()
78 unittest(np && name && !strcmp("/testcase-data", name), in of_unittest_find_node_by_name()
79 "find /testcase-data failed\n"); in of_unittest_find_node_by_name()
84 np = of_find_node_by_path("/testcase-data/"); in of_unittest_find_node_by_name()
85 unittest(!np, "trailing '/' on /testcase-data/ should fail\n"); in of_unittest_find_node_by_name()
87 np = of_find_node_by_path("/testcase-data/phandle-tests/consumer-a"); in of_unittest_find_node_by_name()
89 unittest(np && name && !strcmp("/testcase-data/phandle-tests/consumer-a", name), in of_unittest_find_node_by_name()
90 "find /testcase-data/phandle-tests/consumer-a failed\n"); in of_unittest_find_node_by_name()
94 np = of_find_node_by_path("testcase-alias"); in of_unittest_find_node_by_name()
96 unittest(np && name && !strcmp("/testcase-data", name), in of_unittest_find_node_by_name()
97 "find testcase-alias failed\n"); in of_unittest_find_node_by_name()
102 np = of_find_node_by_path("testcase-alias/"); in of_unittest_find_node_by_name()
103 unittest(!np, "trailing '/' on testcase-alias/ should fail\n"); in of_unittest_find_node_by_name()
105 np = of_find_node_by_path("testcase-alias/phandle-tests/consumer-a"); in of_unittest_find_node_by_name()
107 unittest(np && name && !strcmp("/testcase-data/phandle-tests/consumer-a", name), in of_unittest_find_node_by_name()
108 "find testcase-alias/phandle-tests/consumer-a failed\n"); in of_unittest_find_node_by_name()
112 np = of_find_node_by_path("/testcase-data/missing-path"); in of_unittest_find_node_by_name()
113 unittest(!np, "non-existent path returned node %pOF\n", np); in of_unittest_find_node_by_name()
116 np = of_find_node_by_path("missing-alias"); in of_unittest_find_node_by_name()
117 unittest(!np, "non-existent alias returned node %pOF\n", np); in of_unittest_find_node_by_name()
120 np = of_find_node_by_path("testcase-alias/missing-path"); in of_unittest_find_node_by_name()
121 unittest(!np, "non-existent alias with relative path returned node %pOF\n", np); in of_unittest_find_node_by_name()
124 np = of_find_node_opts_by_path("/testcase-data:testoption", &options); in of_unittest_find_node_by_name()
129 np = of_find_node_opts_by_path("/testcase-data:test/option", &options); in of_unittest_find_node_by_name()
134 np = of_find_node_opts_by_path("/testcase-data/testcase-device1:test/option", &options); in of_unittest_find_node_by_name()
139 np = of_find_node_opts_by_path("/testcase-data:testoption", NULL); in of_unittest_find_node_by_name()
143 np = of_find_node_opts_by_path("testcase-alias:testaliasoption", in of_unittest_find_node_by_name()
146 "option alias path test failed\n"); in of_unittest_find_node_by_name()
149 np = of_find_node_opts_by_path("testcase-alias:test/alias/option", in of_unittest_find_node_by_name()
151 unittest(np && !strcmp("test/alias/option", options), in of_unittest_find_node_by_name()
152 "option alias path test, subcase #1 failed\n"); in of_unittest_find_node_by_name()
155 np = of_find_node_opts_by_path("testcase-alias:testaliasoption", NULL); in of_unittest_find_node_by_name()
156 unittest(np, "NULL option alias path test failed\n"); in of_unittest_find_node_by_name()
160 np = of_find_node_opts_by_path("testcase-alias", &options); in of_unittest_find_node_by_name()
175 np = of_find_node_by_path("/testcase-data"); in of_unittest_dynamic()
188 /* Add a new property - should pass*/ in of_unittest_dynamic()
189 prop->name = "new-property"; in of_unittest_dynamic()
190 prop->value = "new-property-data"; in of_unittest_dynamic()
191 prop->length = strlen(prop->value) + 1; in of_unittest_dynamic()
194 /* Try to add an existing property - should fail */ in of_unittest_dynamic()
196 prop->name = "new-property"; in of_unittest_dynamic()
197 prop->value = "new-property-data-should-fail"; in of_unittest_dynamic()
198 prop->length = strlen(prop->value) + 1; in of_unittest_dynamic()
202 /* Try to modify an existing property - should pass */ in of_unittest_dynamic()
203 prop->value = "modify-property-data-should-pass"; in of_unittest_dynamic()
204 prop->length = strlen(prop->value) + 1; in of_unittest_dynamic()
208 /* Try to modify non-existent property - should pass*/ in of_unittest_dynamic()
210 prop->name = "modify-property"; in of_unittest_dynamic()
211 prop->value = "modify-missing-property-data-should-pass"; in of_unittest_dynamic()
212 prop->length = strlen(prop->value) + 1; in of_unittest_dynamic()
216 /* Remove property - should pass */ in of_unittest_dynamic()
220 /* Adding very large property - should pass */ in of_unittest_dynamic()
222 prop->name = "large-property-PAGE_SIZEx8"; in of_unittest_dynamic()
223 prop->length = PAGE_SIZE * 8; in of_unittest_dynamic()
224 prop->value = kzalloc(prop->length, GFP_KERNEL); in of_unittest_dynamic()
225 unittest(prop->value != NULL, "Unable to allocate large buffer\n"); in of_unittest_dynamic()
226 if (prop->value) in of_unittest_dynamic()
237 if (child->parent != np) { in of_unittest_check_node_linkage()
240 rc = -EINVAL; in of_unittest_check_node_linkage()
289 size = snprintf(buf, buf_size - 2, fmt, np); in of_unittest_printf_one()
298 for (i = 0; i < 2; i++, size--) { in of_unittest_printf_one()
312 const char *full_name = "/testcase-data/platform-tests/test-device@1/dev@100"; in of_unittest_printf()
321 num_to_str(phandle_str, sizeof(phandle_str), np->phandle, 0); in of_unittest_printf()
328 of_unittest_printf_one(np, "%pOFnc", "dev:test-sub-device"); in of_unittest_printf()
333 of_unittest_printf_one(np, "%-10pOFP", "dev@100 "); in of_unittest_printf()
335 of_unittest_printf_one(np, "%pOFF", "----"); in of_unittest_printf()
336 of_unittest_printf_one(np, "%pOFPF", "dev@100:----"); in of_unittest_printf()
337 of_unittest_printf_one(np, "%pOFPFPc", "dev@100:----:dev@100:test-sub-device"); in of_unittest_printf()
338 of_unittest_printf_one(np, "%pOFc", "test-sub-device"); in of_unittest_printf()
340 "\"test-sub-device\",\"test-compat2\",\"test-compat3\""); in of_unittest_printf()
357 if (!np->phandle) in of_unittest_check_phandles()
360 hash_for_each_possible(phandle_ht, nh, node, np->phandle) { in of_unittest_check_phandles()
361 if (nh->np->phandle == np->phandle) { in of_unittest_check_phandles()
363 np->phandle, nh->np, np); in of_unittest_check_phandles()
373 nh->np = np; in of_unittest_check_phandles()
374 hash_add(phandle_ht, &nh->node, np->phandle); in of_unittest_check_phandles()
382 hash_del(&nh->node); in of_unittest_check_phandles()
393 np = of_find_node_by_path("/testcase-data/phandle-tests/consumer-a"); in of_unittest_parse_phandle_with_args()
399 rc = of_count_phandle_with_args(np, "phandle-list", "#phandle-cells"); in of_unittest_parse_phandle_with_args()
406 rc = of_parse_phandle_with_args(np, "phandle-list", in of_unittest_parse_phandle_with_args()
407 "#phandle-cells", i, &args); in of_unittest_parse_phandle_with_args()
409 /* Test the values from tests-phandle.dtsi */ in of_unittest_parse_phandle_with_args()
423 passed &= (rc == -ENOENT); in of_unittest_parse_phandle_with_args()
448 passed &= (rc == -ENOENT); in of_unittest_parse_phandle_with_args()
454 unittest(passed, "index %i - data error on node %pOF rc=%i\n", in of_unittest_parse_phandle_with_args()
463 rc = of_parse_phandle_with_args(np, "phandle-list-missing", in of_unittest_parse_phandle_with_args()
464 "#phandle-cells", 0, &args); in of_unittest_parse_phandle_with_args()
465 unittest(rc == -ENOENT, "expected:%i got:%i\n", -ENOENT, rc); in of_unittest_parse_phandle_with_args()
466 rc = of_count_phandle_with_args(np, "phandle-list-missing", in of_unittest_parse_phandle_with_args()
467 "#phandle-cells"); in of_unittest_parse_phandle_with_args()
468 unittest(rc == -ENOENT, "expected:%i got:%i\n", -ENOENT, rc); in of_unittest_parse_phandle_with_args()
474 …"OF: /testcase-data/phandle-tests/consumer-a: could not get #phandle-cells-missing for /testcase-d… in of_unittest_parse_phandle_with_args()
476 rc = of_parse_phandle_with_args(np, "phandle-list", in of_unittest_parse_phandle_with_args()
477 "#phandle-cells-missing", 0, &args); in of_unittest_parse_phandle_with_args()
480 …"OF: /testcase-data/phandle-tests/consumer-a: could not get #phandle-cells-missing for /testcase-d… in of_unittest_parse_phandle_with_args()
482 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
485 …"OF: /testcase-data/phandle-tests/consumer-a: could not get #phandle-cells-missing for /testcase-d… in of_unittest_parse_phandle_with_args()
487 rc = of_count_phandle_with_args(np, "phandle-list", in of_unittest_parse_phandle_with_args()
488 "#phandle-cells-missing"); in of_unittest_parse_phandle_with_args()
491 …"OF: /testcase-data/phandle-tests/consumer-a: could not get #phandle-cells-missing for /testcase-d… in of_unittest_parse_phandle_with_args()
493 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
499 "OF: /testcase-data/phandle-tests/consumer-a: could not find phandle"); in of_unittest_parse_phandle_with_args()
501 rc = of_parse_phandle_with_args(np, "phandle-list-bad-phandle", in of_unittest_parse_phandle_with_args()
502 "#phandle-cells", 0, &args); in of_unittest_parse_phandle_with_args()
505 "OF: /testcase-data/phandle-tests/consumer-a: could not find phandle"); in of_unittest_parse_phandle_with_args()
507 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
510 "OF: /testcase-data/phandle-tests/consumer-a: could not find phandle"); in of_unittest_parse_phandle_with_args()
512 rc = of_count_phandle_with_args(np, "phandle-list-bad-phandle", in of_unittest_parse_phandle_with_args()
513 "#phandle-cells"); in of_unittest_parse_phandle_with_args()
516 "OF: /testcase-data/phandle-tests/consumer-a: could not find phandle"); in of_unittest_parse_phandle_with_args()
518 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
524 "OF: /testcase-data/phandle-tests/consumer-a: #phandle-cells = 3 found -1"); in of_unittest_parse_phandle_with_args()
526 rc = of_parse_phandle_with_args(np, "phandle-list-bad-args", in of_unittest_parse_phandle_with_args()
527 "#phandle-cells", 1, &args); in of_unittest_parse_phandle_with_args()
530 "OF: /testcase-data/phandle-tests/consumer-a: #phandle-cells = 3 found -1"); in of_unittest_parse_phandle_with_args()
532 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
535 "OF: /testcase-data/phandle-tests/consumer-a: #phandle-cells = 3 found -1"); in of_unittest_parse_phandle_with_args()
537 rc = of_count_phandle_with_args(np, "phandle-list-bad-args", in of_unittest_parse_phandle_with_args()
538 "#phandle-cells"); in of_unittest_parse_phandle_with_args()
541 "OF: /testcase-data/phandle-tests/consumer-a: #phandle-cells = 3 found -1"); in of_unittest_parse_phandle_with_args()
543 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
553 np = of_find_node_by_path("/testcase-data/phandle-tests/consumer-b"); in of_unittest_parse_phandle_with_args_map()
559 p[0] = of_find_node_by_path("/testcase-data/phandle-tests/provider0"); in of_unittest_parse_phandle_with_args_map()
560 p[1] = of_find_node_by_path("/testcase-data/phandle-tests/provider1"); in of_unittest_parse_phandle_with_args_map()
561 p[2] = of_find_node_by_path("/testcase-data/phandle-tests/provider2"); in of_unittest_parse_phandle_with_args_map()
562 p[3] = of_find_node_by_path("/testcase-data/phandle-tests/provider3"); in of_unittest_parse_phandle_with_args_map()
563 p[4] = of_find_node_by_path("/testcase-data/phandle-tests/provider4"); in of_unittest_parse_phandle_with_args_map()
564 p[5] = of_find_node_by_path("/testcase-data/phandle-tests/provider5"); in of_unittest_parse_phandle_with_args_map()
573 rc = of_count_phandle_with_args(np, "phandle-list", "#phandle-cells"); in of_unittest_parse_phandle_with_args_map()
580 rc = of_parse_phandle_with_args_map(np, "phandle-list", in of_unittest_parse_phandle_with_args_map()
583 /* Test the values from tests-phandle.dtsi */ in of_unittest_parse_phandle_with_args_map()
600 passed &= (rc == -ENOENT); in of_unittest_parse_phandle_with_args_map()
634 passed &= (rc == -ENOENT); in of_unittest_parse_phandle_with_args_map()
640 unittest(passed, "index %i - data error on node %s rc=%i\n", in of_unittest_parse_phandle_with_args_map()
641 i, args.np->full_name, rc); in of_unittest_parse_phandle_with_args_map()
649 rc = of_parse_phandle_with_args_map(np, "phandle-list-missing", in of_unittest_parse_phandle_with_args_map()
651 unittest(rc == -ENOENT, "expected:%i got:%i\n", -ENOENT, rc); in of_unittest_parse_phandle_with_args_map()
657 …"OF: /testcase-data/phandle-tests/consumer-b: could not get #phandle-missing-cells for /testcase-d… in of_unittest_parse_phandle_with_args_map()
659 rc = of_parse_phandle_with_args_map(np, "phandle-list", in of_unittest_parse_phandle_with_args_map()
660 "phandle-missing", 0, &args); in of_unittest_parse_phandle_with_args_map()
662 …"OF: /testcase-data/phandle-tests/consumer-b: could not get #phandle-missing-cells for /testcase-d… in of_unittest_parse_phandle_with_args_map()
664 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args_map()
670 "OF: /testcase-data/phandle-tests/consumer-b: could not find phandle"); in of_unittest_parse_phandle_with_args_map()
672 rc = of_parse_phandle_with_args_map(np, "phandle-list-bad-phandle", in of_unittest_parse_phandle_with_args_map()
675 "OF: /testcase-data/phandle-tests/consumer-b: could not find phandle"); in of_unittest_parse_phandle_with_args_map()
677 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args_map()
683 "OF: /testcase-data/phandle-tests/consumer-b: #phandle-cells = 2 found -1"); in of_unittest_parse_phandle_with_args_map()
685 rc = of_parse_phandle_with_args_map(np, "phandle-list-bad-args", in of_unittest_parse_phandle_with_args_map()
688 "OF: /testcase-data/phandle-tests/consumer-b: #phandle-cells = 2 found -1"); in of_unittest_parse_phandle_with_args_map()
690 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args_map()
706 np = of_find_node_by_path("/testcase-data/phandle-tests/consumer-a"); in of_unittest_property_string()
712 rc = of_property_match_string(np, "phandle-list-names", "first"); in of_unittest_property_string()
714 rc = of_property_match_string(np, "phandle-list-names", "second"); in of_unittest_property_string()
716 rc = of_property_match_string(np, "phandle-list-names", "third"); in of_unittest_property_string()
718 rc = of_property_match_string(np, "phandle-list-names", "fourth"); in of_unittest_property_string()
719 unittest(rc == -ENODATA, "unmatched string; rc=%i\n", rc); in of_unittest_property_string()
720 rc = of_property_match_string(np, "missing-property", "blah"); in of_unittest_property_string()
721 unittest(rc == -EINVAL, "missing property; rc=%i\n", rc); in of_unittest_property_string()
722 rc = of_property_match_string(np, "empty-property", "blah"); in of_unittest_property_string()
723 unittest(rc == -ENODATA, "empty property; rc=%i\n", rc); in of_unittest_property_string()
724 rc = of_property_match_string(np, "unterminated-string", "blah"); in of_unittest_property_string()
725 unittest(rc == -EILSEQ, "unterminated string; rc=%i\n", rc); in of_unittest_property_string()
728 rc = of_property_count_strings(np, "string-property"); in of_unittest_property_string()
730 rc = of_property_count_strings(np, "phandle-list-names"); in of_unittest_property_string()
732 rc = of_property_count_strings(np, "unterminated-string"); in of_unittest_property_string()
733 unittest(rc == -EILSEQ, "unterminated string; rc=%i\n", rc); in of_unittest_property_string()
734 rc = of_property_count_strings(np, "unterminated-string-list"); in of_unittest_property_string()
735 unittest(rc == -EILSEQ, "unterminated string array; rc=%i\n", rc); in of_unittest_property_string()
738 rc = of_property_read_string_index(np, "string-property", 0, strings); in of_unittest_property_string()
741 rc = of_property_read_string_index(np, "string-property", 1, strings); in of_unittest_property_string()
742 …unittest(rc == -ENODATA && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n",… in of_unittest_property_string()
743 rc = of_property_read_string_index(np, "phandle-list-names", 0, strings); in of_unittest_property_string()
745 rc = of_property_read_string_index(np, "phandle-list-names", 1, strings); in of_unittest_property_string()
747 rc = of_property_read_string_index(np, "phandle-list-names", 2, strings); in of_unittest_property_string()
750 rc = of_property_read_string_index(np, "phandle-list-names", 3, strings); in of_unittest_property_string()
751 …unittest(rc == -ENODATA && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n",… in of_unittest_property_string()
753 rc = of_property_read_string_index(np, "unterminated-string", 0, strings); in of_unittest_property_string()
754 …unittest(rc == -EILSEQ && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n", … in of_unittest_property_string()
755 rc = of_property_read_string_index(np, "unterminated-string-list", 0, strings); in of_unittest_property_string()
758 rc = of_property_read_string_index(np, "unterminated-string-list", 2, strings); /* should fail */ in of_unittest_property_string()
759 …unittest(rc == -EILSEQ && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n", … in of_unittest_property_string()
763 rc = of_property_read_string_array(np, "string-property", strings, 4); in of_unittest_property_string()
765 rc = of_property_read_string_array(np, "phandle-list-names", strings, 4); in of_unittest_property_string()
767 rc = of_property_read_string_array(np, "unterminated-string", strings, 4); in of_unittest_property_string()
768 unittest(rc == -EILSEQ, "unterminated string; rc=%i\n", rc); in of_unittest_property_string()
769 /* -- An incorrectly formed string should cause a failure */ in of_unittest_property_string()
770 rc = of_property_read_string_array(np, "unterminated-string-list", strings, 4); in of_unittest_property_string()
771 unittest(rc == -EILSEQ, "unterminated string array; rc=%i\n", rc); in of_unittest_property_string()
772 /* -- parsing the correctly formed strings should still work: */ in of_unittest_property_string()
774 rc = of_property_read_string_array(np, "unterminated-string-list", strings, 2); in of_unittest_property_string()
777 rc = of_property_read_string_array(np, "phandle-list-names", strings, 1); in of_unittest_property_string()
781 #define propcmp(p1, p2) (((p1)->length == (p2)->length) && \
782 (p1)->value && (p2)->value && \
783 !memcmp((p1)->value, (p2)->value, (p1)->length) && \
784 !strcmp((p1)->name, (p2)->name))
794 kfree(new->value); in of_unittest_property_copy()
795 kfree(new->name); in of_unittest_property_copy()
799 unittest(new && propcmp(&p2, new), "non-empty property didn't copy correctly\n"); in of_unittest_property_copy()
800 kfree(new->value); in of_unittest_property_copy()
801 kfree(new->name); in of_unittest_property_copy()
809 struct property *ppadd, padd = { .name = "prop-add", .length = 1, .value = "" }; in of_unittest_changeset()
813 struct property *ppupdate, pupdate = { .name = "prop-update", .length = 5, .value = "abcd" }; in of_unittest_changeset()
827 nchangeset = of_find_node_by_path("/testcase-data/changeset"); in of_unittest_changeset()
828 nremove = of_get_child_by_name(nchangeset, "node-remove"); in of_unittest_changeset()
847 n1->parent = parent; in of_unittest_changeset()
848 n2->parent = parent; in of_unittest_changeset()
849 n21->parent = n2; in of_unittest_changeset()
851 ppremove = of_find_property(parent, "prop-remove", NULL); in of_unittest_changeset()
867 unittest(!of_changeset_add_property(&chgset, parent, ppadd), "fail add prop prop-add\n"); in of_unittest_changeset()
876 unittest((np = of_find_node_by_path("/testcase-data/changeset/n2/n21")), in of_unittest_changeset()
898 np = of_find_node_by_path("/testcase-data/address-tests"); in of_unittest_dma_get_max_cpu_address()
940 dev_bogus->dma_range_map = map; in of_unittest_dma_ranges_one()
960 of_unittest_dma_ranges_one("/testcase-data/address-tests/device@70000000", in of_unittest_parse_dma_ranges()
963 of_unittest_dma_ranges_one("/testcase-data/address-tests/bus@80000000/device@1000", in of_unittest_parse_dma_ranges()
965 of_unittest_dma_ranges_one("/testcase-data/address-tests/pci@90000000", in of_unittest_parse_dma_ranges()
979 np = of_find_node_by_path("/testcase-data/address-tests/pci@90000000"); in of_unittest_pci_dma_ranges()
986 pr_err("missing dma-ranges property\n"); in of_unittest_pci_dma_ranges()
991 * Get the dma-ranges from the device tree in of_unittest_pci_dma_ranges()
1030 np = of_find_node_by_path("/testcase-data/interrupts/interrupts0"); in of_unittest_parse_interrupts()
1046 unittest(passed, "index %i - data error on node %pOF rc=%i\n", in of_unittest_parse_interrupts()
1051 np = of_find_node_by_path("/testcase-data/interrupts/interrupts1"); in of_unittest_parse_interrupts()
1063 /* Test the values from tests-phandle.dtsi */ in of_unittest_parse_interrupts()
1092 unittest(passed, "index %i - data error on node %pOF rc=%i\n", in of_unittest_parse_interrupts()
1107 np = of_find_node_by_path("/testcase-data/interrupts/interrupts-extended0"); in of_unittest_parse_interrupts_extended()
1119 /* Test the values from tests-phandle.dtsi */ in of_unittest_parse_interrupts_extended()
1166 unittest(passed, "index %i - data error on node %pOF rc=%i\n", in of_unittest_parse_interrupts_extended()
1193 { .path = "/testcase-data/match-node/name0", .data = "A", },
1194 { .path = "/testcase-data/match-node/name1", .data = "B", },
1195 { .path = "/testcase-data/match-node/a/name2", .data = "Ca", },
1196 { .path = "/testcase-data/match-node/b/name2", .data = "Cb", },
1197 { .path = "/testcase-data/match-node/c/name2", .data = "Cc", },
1198 { .path = "/testcase-data/match-node/name3", .data = "E", },
1199 { .path = "/testcase-data/match-node/name4", .data = "G", },
1200 { .path = "/testcase-data/match-node/name5", .data = "H", },
1201 { .path = "/testcase-data/match-node/name6", .data = "G", },
1202 { .path = "/testcase-data/match-node/name7", .data = "I", },
1203 { .path = "/testcase-data/match-node/name8", .data = "J", },
1204 { .path = "/testcase-data/match-node/name9", .data = "K", },
1228 if (strcmp(match->data, match_node_tests[i].data) != 0) { in of_unittest_match_node()
1231 (const char *)match->data); in of_unittest_match_node()
1244 .name = "unittest-bus",
1252 { .compatible = "test-device", }, in of_unittest_platform_populate()
1256 np = of_find_node_by_path("/testcase-data"); in of_unittest_platform_populate()
1259 /* Test that a missing irq domain returns -EPROBE_DEFER */ in of_unittest_platform_populate()
1260 np = of_find_node_by_path("/testcase-data/testcase-device1"); in of_unittest_platform_populate()
1266 unittest(irq == -EPROBE_DEFER, in of_unittest_platform_populate()
1267 "device deferred probe failed - %d\n", irq); in of_unittest_platform_populate()
1269 /* Test that a parsing failure does not return -EPROBE_DEFER */ in of_unittest_platform_populate()
1270 np = of_find_node_by_path("/testcase-data/testcase-device2"); in of_unittest_platform_populate()
1275 "platform testcase-data:testcase-device2: IRQ index 0 not found"); in of_unittest_platform_populate()
1280 "platform testcase-data:testcase-device2: IRQ index 0 not found"); in of_unittest_platform_populate()
1282 unittest(irq < 0 && irq != -EPROBE_DEFER, in of_unittest_platform_populate()
1283 "device parsing error failed - %d\n", irq); in of_unittest_platform_populate()
1286 np = of_find_node_by_path("/testcase-data/platform-tests"); in of_unittest_platform_populate()
1298 test_bus->dev.of_node = np; in of_unittest_platform_populate()
1302 * registered to catch problems with un-inserted resources. The in of_unittest_platform_populate()
1309 of_platform_populate(np, match, NULL, &test_bus->dev); in of_unittest_platform_populate()
1320 of_platform_depopulate(&test_bus->dev); in of_unittest_platform_populate()
1333 * update_node_properties - adds the properties
1349 child->parent = dup; in update_node_properties()
1358 * compiled with the '-@' option. If you encounter this error, in update_node_properties()
1366 * sets prop->next to NULL in update_node_properties()
1368 for (prop = np->properties; prop != NULL; prop = save_next) { in update_node_properties()
1369 save_next = prop->next; in update_node_properties()
1372 if (ret == -EEXIST && !strcmp(prop->name, "name")) in update_node_properties()
1375 np, prop->name); in update_node_properties()
1381 * attach_node_and_children - attaches nodes
1383 * CAUTION: misleading function name - if node @np already exists in
1413 child = np->child; in attach_node_and_children()
1414 np->child = NULL; in attach_node_and_children()
1418 np->sibling = np->parent->child; in attach_node_and_children()
1419 np->parent->child = np; in attach_node_and_children()
1427 next = child->sibling; in attach_node_and_children()
1434 * unittest_data_add - Reads, copies data from
1447 const int size = __dtb_testcases_end - __dtb_testcases_begin; in unittest_data_add()
1453 return -ENODATA; in unittest_data_add()
1459 return -ENOMEM; in unittest_data_add()
1465 return -ENODATA; in unittest_data_add()
1477 return -EINVAL; in unittest_data_add()
1491 "Duplicate name in testcase-data, renamed to \"duplicate-name#1\""); in unittest_data_add()
1493 /* attach the sub-tree to live tree */ in unittest_data_add()
1494 np = unittest_data_node->child; in unittest_data_add()
1496 struct device_node *next = np->sibling; in unittest_data_add()
1498 np->parent = of_root; in unittest_data_add()
1504 "Duplicate name in testcase-data, renamed to \"duplicate-name#1\""); in unittest_data_add()
1516 struct device *dev = &pdev->dev; in unittest_probe()
1517 struct device_node *np = dev->of_node; in unittest_probe()
1521 return -EINVAL; in unittest_probe()
1527 of_platform_populate(np, NULL, NULL, &pdev->dev); in unittest_probe()
1534 struct device *dev = &pdev->dev; in unittest_remove()
1535 struct device_node *np = dev->of_node; in unittest_remove()
1595 pr_debug("%s(): %s %d %d\n", __func__, chip->label, offset, in unittest_gpio_chip_request()
1609 return -ENOMEM; in unittest_gpio_probe()
1613 devptr->chip.of_node = pdev->dev.of_node; in unittest_gpio_probe()
1614 devptr->chip.label = "of-unittest-gpio"; in unittest_gpio_probe()
1615 devptr->chip.base = -1; /* dynamic allocation */ in unittest_gpio_probe()
1616 devptr->chip.ngpio = 5; in unittest_gpio_probe()
1617 devptr->chip.request = unittest_gpio_chip_request; in unittest_gpio_probe()
1619 ret = gpiochip_add_data(&devptr->chip, NULL); in unittest_gpio_probe()
1622 "gpiochip_add_data() for node @%pOF failed, ret = %d\n", devptr->chip.of_node, ret); in unittest_gpio_probe()
1632 struct device *dev = &pdev->dev; in unittest_gpio_remove()
1633 struct device_node *np = pdev->dev.of_node; in unittest_gpio_remove()
1638 return -EINVAL; in unittest_gpio_remove()
1640 if (gdev->chip.base != -1) in unittest_gpio_remove()
1641 gpiochip_remove(&gdev->chip); in unittest_gpio_remove()
1650 { .compatible = "unittest-gpio", },
1658 .name = "unittest-gpio",
1679 * - apply overlay_gpio_01 in of_unittest_overlay_gpio()
1680 * - apply overlay_gpio_02a in of_unittest_overlay_gpio()
1681 * - apply overlay_gpio_02b in of_unittest_overlay_gpio()
1682 * - register driver in of_unittest_overlay_gpio()
1685 * - probe and processing gpio hog for overlay_gpio_01 in of_unittest_overlay_gpio()
1686 * - probe for overlay_gpio_02a in of_unittest_overlay_gpio()
1687 * - processing gpio for overlay_gpio_02b in of_unittest_overlay_gpio()
1714 "gpio-<<int>> (line-B-input): hogged as input\n"); in of_unittest_overlay_gpio()
1717 "gpio-<<int>> (line-A-input): hogged as input\n"); in of_unittest_overlay_gpio()
1724 "gpio-<<int>> (line-A-input): hogged as input\n"); in of_unittest_overlay_gpio()
1726 "gpio-<<int>> (line-B-input): hogged as input\n"); in of_unittest_overlay_gpio()
1733 unittest_gpio_chip_request_count - chip_request_count); in of_unittest_overlay_gpio()
1738 * Similar to a driver built-in to the kernel, the in of_unittest_overlay_gpio()
1743 * - apply overlay_gpio_03 in of_unittest_overlay_gpio()
1746 * - probe and processing gpio hog. in of_unittest_overlay_gpio()
1753 "gpio-<<int>> (line-D-input): hogged as input\n"); in of_unittest_overlay_gpio()
1761 "gpio-<<int>> (line-D-input): hogged as input\n"); in of_unittest_overlay_gpio()
1768 unittest_gpio_chip_request_count - chip_request_count); in of_unittest_overlay_gpio()
1773 * - apply overlay_gpio_04a in of_unittest_overlay_gpio()
1776 * - probe for overlay_gpio_04a in of_unittest_overlay_gpio()
1793 * - apply overlay_gpio_04b in of_unittest_overlay_gpio()
1796 * - processing gpio for overlay_gpio_04b in of_unittest_overlay_gpio()
1800 "gpio-<<int>> (line-C-input): hogged as input\n"); in of_unittest_overlay_gpio()
1808 "gpio-<<int>> (line-C-input): hogged as input\n"); in of_unittest_overlay_gpio()
1812 unittest_gpio_chip_request_count - chip_request_count); in of_unittest_overlay_gpio()
1826 /* get the i2c client device instantiated at the path */
1842 /* find out if a i2c client device exists at that path */
1849 put_device(&client->dev); in of_path_i2c_client_exists()
1883 base = "/testcase-data/overlay-node/test-bus"; in unittest_path()
1886 base = "/testcase-data/overlay-node/test-bus/i2c-test-bus"; in unittest_path()
1892 snprintf(buf, sizeof(buf) - 1, "%s/test-unittest%d", base, nr); in unittest_path()
1893 buf[sizeof(buf) - 1] = '\0'; in unittest_path()
1916 snprintf(buf, sizeof(buf) - 1, in overlay_name_from_nr()
1918 buf[sizeof(buf) - 1] = '\0'; in overlay_name_from_nr()
1923 static const char *bus_path = "/testcase-data/overlay-node/test-bus";
1929 static int overlay_first_id = -1;
1942 id -= overlay_first_id; in of_unittest_track_overlay()
1953 id -= overlay_first_id; in of_unittest_untrack_overlay()
1970 for (id = MAX_UNITTEST_OVERLAYS - 1; id >= 0; id--) { in of_unittest_destroy_tracked_overlays()
1976 if (ret == -ENODEV) { in of_unittest_destroy_tracked_overlays()
2002 return -EFAULT; in of_unittest_apply_overlay()
2022 return -EINVAL; in of_unittest_apply_overlay_check()
2038 return -EINVAL; in of_unittest_apply_overlay_check()
2057 return -EINVAL; in of_unittest_apply_revert_overlay_check()
2074 return -EINVAL; in of_unittest_apply_revert_overlay_check()
2093 return -EINVAL; in of_unittest_apply_revert_overlay_check()
2105 …mory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unitt… in of_unittest_overlay_0()
2111 …mory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unitt… in of_unittest_overlay_0()
2125 …mory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unitt… in of_unittest_overlay_1()
2131 …mory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unitt… in of_unittest_overlay_1()
2146 …mory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unitt… in of_unittest_overlay_2()
2152 …mory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unitt… in of_unittest_overlay_2()
2165 …mory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unitt… in of_unittest_overlay_3()
2171 …mory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unitt… in of_unittest_overlay_3()
2195 …mory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unitt… in of_unittest_overlay_5()
2201 …mory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unitt… in of_unittest_overlay_5()
2235 …mory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unitt… in of_unittest_overlay_6()
2249 …mory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unitt… in of_unittest_overlay_6()
2252 …mory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unitt… in of_unittest_overlay_6()
2266 …mory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unitt… in of_unittest_overlay_6()
2282 for (i = 1; i >= 0; i--) { in of_unittest_overlay_6()
2322 …mory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unitt… in of_unittest_overlay_8()
2331 …mory leak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unitt… in of_unittest_overlay_8()
2342 …will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest8/prope… in of_unittest_overlay_8()
2348 …will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/test-unittest8/prope… in of_unittest_overlay_8()
2362 …rlay: node_overlaps_later_cs: #6 overlaps with #7 @/testcase-data/overlay-node/test-bus/test-unitt… in of_unittest_overlay_8()
2373 …rlay: node_overlaps_later_cs: #6 overlaps with #7 @/testcase-data/overlay-node/test-bus/test-unitt… in of_unittest_overlay_8()
2384 for (i = 1; i >= 0; i--) { in of_unittest_overlay_8()
2412 child_path = kasprintf(GFP_KERNEL, "%s/test-unittest101", in of_unittest_overlay_10()
2464 struct device *dev = &pdev->dev; in unittest_i2c_bus_probe()
2465 struct device_node *np = dev->of_node; in unittest_i2c_bus_probe()
2472 return -EINVAL; in unittest_i2c_bus_probe()
2480 return -ENOMEM; in unittest_i2c_bus_probe()
2483 std->pdev = pdev; in unittest_i2c_bus_probe()
2486 adap = &std->adap; in unittest_i2c_bus_probe()
2488 adap->nr = -1; in unittest_i2c_bus_probe()
2489 strlcpy(adap->name, pdev->name, sizeof(adap->name)); in unittest_i2c_bus_probe()
2490 adap->class = I2C_CLASS_DEPRECATED; in unittest_i2c_bus_probe()
2491 adap->algo = &unittest_i2c_algo; in unittest_i2c_bus_probe()
2492 adap->dev.parent = dev; in unittest_i2c_bus_probe()
2493 adap->dev.of_node = dev->of_node; in unittest_i2c_bus_probe()
2494 adap->timeout = 5 * HZ; in unittest_i2c_bus_probe()
2495 adap->retries = 3; in unittest_i2c_bus_probe()
2499 dev_err(dev, "Failed to add I2C adapter\n"); in unittest_i2c_bus_probe()
2508 struct device *dev = &pdev->dev; in unittest_i2c_bus_remove()
2509 struct device_node *np = dev->of_node; in unittest_i2c_bus_remove()
2513 i2c_del_adapter(&std->adap); in unittest_i2c_bus_remove()
2519 { .compatible = "unittest-i2c-bus", },
2527 .name = "unittest-i2c-bus",
2535 struct device *dev = &client->dev; in unittest_i2c_dev_probe()
2536 struct device_node *np = client->dev.of_node; in unittest_i2c_dev_probe()
2540 return -EINVAL; in unittest_i2c_dev_probe()
2550 struct device *dev = &client->dev; in unittest_i2c_dev_remove()
2551 struct device_node *np = client->dev.of_node; in unittest_i2c_dev_remove()
2558 { .name = "unittest-i2c-dev" },
2564 .name = "unittest-i2c-dev",
2582 struct device *dev = &client->dev; in unittest_i2c_mux_probe()
2583 struct i2c_adapter *adap = client->adapter; in unittest_i2c_mux_probe()
2584 struct device_node *np = client->dev.of_node, *child; in unittest_i2c_mux_probe()
2592 return -EINVAL; in unittest_i2c_mux_probe()
2595 max_reg = (u32)-1; in unittest_i2c_mux_probe()
2599 if (max_reg == (u32)-1 || reg > max_reg) in unittest_i2c_mux_probe()
2602 nchans = max_reg == (u32)-1 ? 0 : max_reg + 1; in unittest_i2c_mux_probe()
2605 return -EINVAL; in unittest_i2c_mux_probe()
2611 return -ENOMEM; in unittest_i2c_mux_probe()
2616 return -ENODEV; in unittest_i2c_mux_probe()
2627 struct device *dev = &client->dev; in unittest_i2c_mux_remove()
2628 struct device_node *np = client->dev.of_node; in unittest_i2c_mux_remove()
2637 { .name = "unittest-i2c-mux" },
2643 .name = "unittest-i2c-mux",
2658 "could not register unittest i2c device driver\n")) in of_unittest_overlay_i2c_init()
2664 "could not register unittest i2c bus driver\n")) in of_unittest_overlay_i2c_init()
2670 "i2c i2c-1: Added multiplexed i2c bus 2"); in of_unittest_overlay_i2c_init()
2675 "i2c i2c-1: Added multiplexed i2c bus 2"); in of_unittest_overlay_i2c_init()
2678 "could not register unittest i2c mux driver\n")) in of_unittest_overlay_i2c_init()
2700 …ak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/i2c-test-bus/test in of_unittest_overlay_i2c_12()
2705 …ak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/i2c-test-bus/test in of_unittest_overlay_i2c_12()
2719 …ak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/i2c-test-bus/test in of_unittest_overlay_i2c_13()
2725 …ak will occur if overlay removed, property: /testcase-data/overlay-node/test-bus/i2c-test-bus/test in of_unittest_overlay_i2c_13()
2733 /* just check for i2c mux existence */
2744 "i2c i2c-1: Added multiplexed i2c bus 3"); in of_unittest_overlay_i2c_15()
2749 "i2c i2c-1: Added multiplexed i2c bus 3"); in of_unittest_overlay_i2c_15()
2812 if (unittest(of_unittest_overlay_i2c_init() == 0, "i2c init failed\n")) in of_unittest_overlay()
2891 OVERLAY_INFO(overlay_base, -9999),
2914 OVERLAY_INFO(overlay_bad_add_dup_node, -EINVAL),
2915 OVERLAY_INFO(overlay_bad_add_dup_prop, -EINVAL),
2916 OVERLAY_INFO(overlay_bad_phandle, -EINVAL),
2917 OVERLAY_INFO(overlay_bad_symbol, -EINVAL),
2958 for (info = overlays; info && info->name; info++) { in unittest_unflatten_overlay_base()
2959 if (!strcmp(overlay_name, info->name)) { in unittest_unflatten_overlay_base()
2971 if (info->expected_result != -9999) { in unittest_unflatten_overlay_base()
2976 data_size = info->dtb_end - info->dtb_begin; in unittest_unflatten_overlay_base()
2982 size = fdt_totalsize(info->dtb_begin); in unittest_unflatten_overlay_base()
2994 memcpy(new_fdt, info->dtb_begin, size); in unittest_unflatten_overlay_base()
3006 * /proc/device-tree/ contains the updated structure and values from
3018 for (info = overlays; info && info->name; info++) { in overlay_data_apply()
3019 if (!strcmp(overlay_name, info->name)) { in overlay_data_apply()
3029 size = info->dtb_end - info->dtb_begin; in overlay_data_apply()
3033 ret = of_overlay_fdt_apply(info->dtb_begin, size, &info->overlay_id); in overlay_data_apply()
3035 *overlay_id = info->overlay_id; in overlay_data_apply()
3042 if (ret != info->expected_result) in overlay_data_apply()
3044 info->expected_result, ret, overlay_name); in overlay_data_apply()
3046 return (ret == info->expected_result); in overlay_data_apply()
3090 pprev = &overlay_base_root->child; in of_unittest_overlay_high_level()
3091 for (np = overlay_base_root->child; np; np = np->sibling) { in of_unittest_overlay_high_level()
3093 *pprev = np->sibling; in of_unittest_overlay_high_level()
3096 pprev = &np->sibling; in of_unittest_overlay_high_level()
3103 pprev = &overlay_base_root->child; in of_unittest_overlay_high_level()
3104 for (np = overlay_base_root->child; np; np = np->sibling) { in of_unittest_overlay_high_level()
3107 *pprev = np->sibling; in of_unittest_overlay_high_level()
3110 pprev = &np->sibling; in of_unittest_overlay_high_level()
3117 if (!strcmp(np->full_name, base_child->full_name)) { in of_unittest_overlay_high_level()
3133 for (np = overlay_base_root->child; np; np = np->sibling) in of_unittest_overlay_high_level()
3134 np->parent = of_root; in of_unittest_overlay_high_level()
3138 for (last_sibling = np = of_root->child; np; np = np->sibling) in of_unittest_overlay_high_level()
3142 last_sibling->sibling = overlay_base_root->child; in of_unittest_overlay_high_level()
3144 of_root->child = overlay_base_root->child; in of_unittest_overlay_high_level()
3156 prop->name); in of_unittest_overlay_high_level()
3160 kfree(new_prop->name); in of_unittest_overlay_high_level()
3161 kfree(new_prop->value); in of_unittest_overlay_high_level()
3163 /* "name" auto-generated by unflatten */ in of_unittest_overlay_high_level()
3164 if (!strcmp(prop->name, "name")) in of_unittest_overlay_high_level()
3167 prop->name); in of_unittest_overlay_high_level()
3172 prop->name); in of_unittest_overlay_high_level()
3184 …"OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/subst… in of_unittest_overlay_high_level()
3186 … WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/fairway-1/status"); in of_unittest_overlay_high_level()
3188 …eak will occur if overlay removed, property: /testcase-data-2/fairway-1/ride@100/track@30/incline- in of_unittest_overlay_high_level()
3190 …eak will occur if overlay removed, property: /testcase-data-2/fairway-1/ride@100/track@40/incline- in of_unittest_overlay_high_level()
3192 …"OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/light… in of_unittest_overlay_high_level()
3194 …"OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/light… in of_unittest_overlay_high_level()
3196 …"OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/light… in of_unittest_overlay_high_level()
3217 …"OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/light… in of_unittest_overlay_high_level()
3219 …"OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/light… in of_unittest_overlay_high_level()
3221 …"OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/light… in of_unittest_overlay_high_level()
3223 …eak will occur if overlay removed, property: /testcase-data-2/fairway-1/ride@100/track@40/incline- in of_unittest_overlay_high_level()
3225 …eak will occur if overlay removed, property: /testcase-data-2/fairway-1/ride@100/track@30/incline- in of_unittest_overlay_high_level()
3227 … WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/fairway-1/status"); in of_unittest_overlay_high_level()
3229 …"OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/subst… in of_unittest_overlay_high_level()
3234 …ay: ERROR: multiple fragments add and/or delete node /testcase-data-2/substation@100/motor-1/contr… in of_unittest_overlay_high_level()
3236 …ltiple fragments add, update, and/or delete property /testcase-data-2/substation@100/motor-1/contr… in of_unittest_overlay_high_level()
3242 …ltiple fragments add, update, and/or delete property /testcase-data-2/substation@100/motor-1/contr… in of_unittest_overlay_high_level()
3244 …ay: ERROR: multiple fragments add and/or delete node /testcase-data-2/substation@100/motor-1/contr… in of_unittest_overlay_high_level()
3247 …ay: ERROR: multiple fragments add and/or delete node /testcase-data-2/substation@100/motor-1/elect… in of_unittest_overlay_high_level()
3249 …ltiple fragments add, update, and/or delete property /testcase-data-2/substation@100/motor-1/elect… in of_unittest_overlay_high_level()
3251 …ltiple fragments add, update, and/or delete property /testcase-data-2/substation@100/motor-1/elect… in of_unittest_overlay_high_level()
3257 …ltiple fragments add, update, and/or delete property /testcase-data-2/substation@100/motor-1/elect… in of_unittest_overlay_high_level()
3259 …ltiple fragments add, update, and/or delete property /testcase-data-2/substation@100/motor-1/elect… in of_unittest_overlay_high_level()
3261 …ay: ERROR: multiple fragments add and/or delete node /testcase-data-2/substation@100/motor-1/elect… in of_unittest_overlay_high_level()
3286 pr_info("start of unittest - you will see error messages\n"); in of_unittest()
3299 np = of_find_node_by_path("/testcase-data/phandle-tests/consumer-a"); in of_unittest()
3330 pr_info("end of unittest - %i passed, %i failed\n", in of_unittest()