Lines Matching refs:unittest

41 #define unittest(result, fmt, ...) ({ \  macro
87 unittest(np && name && !strcmp("/testcase-data", name), in of_unittest_find_node_by_name()
94 unittest(!np, "trailing '/' on /testcase-data/ should fail\n"); in of_unittest_find_node_by_name()
98 unittest(np && name && !strcmp("/testcase-data/phandle-tests/consumer-a", name), in of_unittest_find_node_by_name()
105 unittest(np && name && !strcmp("/testcase-data", name), in of_unittest_find_node_by_name()
112 unittest(!np, "trailing '/' on testcase-alias/ should fail\n"); in of_unittest_find_node_by_name()
116 unittest(np && name && !strcmp("/testcase-data/phandle-tests/consumer-a", name), in of_unittest_find_node_by_name()
122 unittest(!np, "non-existent path returned node %pOF\n", np); in of_unittest_find_node_by_name()
126 unittest(!np, "non-existent alias returned node %pOF\n", np); in of_unittest_find_node_by_name()
130 unittest(!np, "non-existent alias with relative path returned node %pOF\n", np); in of_unittest_find_node_by_name()
134 unittest(np && !strcmp("testoption", options), in of_unittest_find_node_by_name()
139 unittest(np && !strcmp("test/option", options), in of_unittest_find_node_by_name()
144 unittest(np && !strcmp("test/option", options), in of_unittest_find_node_by_name()
149 unittest(np, "NULL option path test failed\n"); in of_unittest_find_node_by_name()
154 unittest(np && !strcmp("testaliasoption", options), in of_unittest_find_node_by_name()
160 unittest(np && !strcmp("test/alias/option", options), in of_unittest_find_node_by_name()
167 unittest(np && name && !strcmp("/testcase-data/phandle-tests/consumer-a", name) && in of_unittest_find_node_by_name()
174 unittest(np, "NULL option alias path test failed\n"); in of_unittest_find_node_by_name()
179 unittest(np && !options, "option clearing test failed\n"); in of_unittest_find_node_by_name()
184 unittest(np && !options, "option clearing root node test failed\n"); in of_unittest_find_node_by_name()
202 unittest(0, "kzalloc() failed\n"); in of_unittest_dynamic()
210 unittest(of_add_property(np, prop) == 0, "Adding a new property failed\n"); in of_unittest_dynamic()
217 unittest(of_add_property(np, prop) != 0, in of_unittest_dynamic()
223 unittest(of_update_property(np, prop) == 0, in of_unittest_dynamic()
231 unittest(of_update_property(np, prop) == 0, in of_unittest_dynamic()
235 unittest(of_remove_property(np, prop) == 0, in of_unittest_dynamic()
243 unittest(prop->value != NULL, "Unable to allocate large buffer\n"); in of_unittest_dynamic()
245 unittest(of_add_property(np, prop) == 0, in of_unittest_dynamic()
281 unittest(child_count > 0, "Device node data structure is corrupted\n"); in of_unittest_check_tree_linkage()
282 unittest(child_count == allnode_count, in of_unittest_check_tree_linkage()
305 unittest((strcmp(buf, expected) == 0) && (buf[size+1] == 0xff), in of_unittest_printf_one()
315 unittest(strncmp(buf, expected, size) == 0 && (buf[size+1] == 0xff), in of_unittest_printf_one()
330 unittest(np, "testcase data missing\n"); in of_unittest_printf()
390 unittest(dup_count == 0, "Found %i duplicates in %i phandles\n", in of_unittest_check_phandles()
413 unittest(rc == 7, "of_count_phandle_with_args() returned %i, expected 7\n", rc); in of_unittest_parse_phandle_with_args()
467 unittest(passed, "index %i - data error on node %pOF rc=%i\n", in of_unittest_parse_phandle_with_args()
478 unittest(rc == -ENOENT, "expected:%i got:%i\n", -ENOENT, rc); in of_unittest_parse_phandle_with_args()
481 unittest(rc == -ENOENT, "expected:%i got:%i\n", -ENOENT, rc); in of_unittest_parse_phandle_with_args()
495 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
506 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
520 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
531 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
545 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
556 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
587 unittest(rc == 8, "of_count_phandle_with_args() returned %i, expected 8\n", rc); in of_unittest_parse_phandle_with_args_map()
653 unittest(passed, "index %i - data error on node %s rc=%i\n", in of_unittest_parse_phandle_with_args_map()
664 unittest(rc == -ENOENT, "expected:%i got:%i\n", -ENOENT, rc); 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()
690 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args_map()
703 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args_map()
706 unittest(prefs[i] == OF_KREF_READ(p[i]), in of_unittest_parse_phandle_with_args_map()
726 unittest(rc == 0, "first expected:0 got:%i\n", rc); in of_unittest_property_string()
728 unittest(rc == 1, "second expected:1 got:%i\n", rc); in of_unittest_property_string()
730 unittest(rc == 2, "third expected:2 got:%i\n", rc); in of_unittest_property_string()
732 unittest(rc == -ENODATA, "unmatched string; rc=%i\n", rc); in of_unittest_property_string()
734 unittest(rc == -EINVAL, "missing property; rc=%i\n", rc); in of_unittest_property_string()
736 unittest(rc == -ENODATA, "empty property; rc=%i\n", rc); in of_unittest_property_string()
738 unittest(rc == -EILSEQ, "unterminated string; rc=%i\n", rc); in of_unittest_property_string()
742 unittest(rc == 1, "Incorrect string count; rc=%i\n", rc); in of_unittest_property_string()
744 unittest(rc == 3, "Incorrect string count; rc=%i\n", rc); in of_unittest_property_string()
746 unittest(rc == -EILSEQ, "unterminated string; rc=%i\n", rc); in of_unittest_property_string()
748 unittest(rc == -EILSEQ, "unterminated string array; rc=%i\n", rc); in of_unittest_property_string()
752unittest(rc == 0 && !strcmp(strings[0], "foobar"), "of_property_read_string_index() failure; rc=%i… in of_unittest_property_string()
755unittest(rc == -ENODATA && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n",… in of_unittest_property_string()
757unittest(rc == 0 && !strcmp(strings[0], "first"), "of_property_read_string_index() failure; rc=%i\… in of_unittest_property_string()
759unittest(rc == 0 && !strcmp(strings[0], "second"), "of_property_read_string_index() failure; rc=%i… in of_unittest_property_string()
761unittest(rc == 0 && !strcmp(strings[0], "third"), "of_property_read_string_index() failure; rc=%i\… in of_unittest_property_string()
764unittest(rc == -ENODATA && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n",… in of_unittest_property_string()
767unittest(rc == -EILSEQ && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n", … in of_unittest_property_string()
769unittest(rc == 0 && !strcmp(strings[0], "first"), "of_property_read_string_index() failure; rc=%i\… in of_unittest_property_string()
772unittest(rc == -EILSEQ && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n", … in of_unittest_property_string()
777 unittest(rc == 1, "Incorrect string count; rc=%i\n", rc); in of_unittest_property_string()
779 unittest(rc == 3, "Incorrect string count; rc=%i\n", rc); in of_unittest_property_string()
781 unittest(rc == -EILSEQ, "unterminated string; rc=%i\n", rc); in of_unittest_property_string()
784 unittest(rc == -EILSEQ, "unterminated string array; rc=%i\n", rc); in of_unittest_property_string()
788 unittest(rc == 2 && strings[2] == NULL, "of_property_read_string_array() failure; rc=%i\n", rc); in of_unittest_property_string()
791unittest(rc == 1 && strings[1] == NULL, "Overwrote end of string array; rc=%i, str='%s'\n", rc, st… in of_unittest_property_string()
806 unittest(new && propcmp(&p1, new), "empty property didn't copy correctly\n"); in of_unittest_property_copy()
810 unittest(new && propcmp(&p2, new), "non-empty property didn't copy correctly\n"); in of_unittest_property_copy()
832 unittest(n1, "testcase setup failure\n"); in of_unittest_changeset()
835 unittest(n2, "testcase setup failure\n"); in of_unittest_changeset()
838 unittest(n21, "testcase setup failure %p\n", n21); in of_unittest_changeset()
842 unittest(nremove, "testcase setup failure\n"); in of_unittest_changeset()
845 unittest(ppadd, "testcase setup failure\n"); in of_unittest_changeset()
848 unittest(ppname_n1, "testcase setup failure\n"); in of_unittest_changeset()
851 unittest(ppname_n2, "testcase setup failure\n"); in of_unittest_changeset()
854 unittest(ppname_n21, "testcase setup failure\n"); in of_unittest_changeset()
857 unittest(ppupdate, "testcase setup failure\n"); in of_unittest_changeset()
865 unittest(ppremove, "failed to find removal prop"); in of_unittest_changeset()
869 unittest(!of_changeset_attach_node(&chgset, n1), "fail attach n1\n"); in of_unittest_changeset()
870 unittest(!of_changeset_add_property(&chgset, n1, ppname_n1), "fail add prop name\n"); in of_unittest_changeset()
872 unittest(!of_changeset_attach_node(&chgset, n2), "fail attach n2\n"); in of_unittest_changeset()
873 unittest(!of_changeset_add_property(&chgset, n2, ppname_n2), "fail add prop name\n"); in of_unittest_changeset()
875 unittest(!of_changeset_detach_node(&chgset, nremove), "fail remove node\n"); in of_unittest_changeset()
876 unittest(!of_changeset_add_property(&chgset, n21, ppname_n21), "fail add prop name\n"); in of_unittest_changeset()
878 unittest(!of_changeset_attach_node(&chgset, n21), "fail attach n21\n"); in of_unittest_changeset()
880 unittest(!of_changeset_add_property(&chgset, parent, ppadd), "fail add prop prop-add\n"); in of_unittest_changeset()
881 unittest(!of_changeset_update_property(&chgset, parent, ppupdate), "fail update prop\n"); in of_unittest_changeset()
882 unittest(!of_changeset_remove_property(&chgset, parent, ppremove), "fail remove prop\n"); in of_unittest_changeset()
884 unittest(n22, "fail create n22\n"); in of_unittest_changeset()
885 unittest(!of_changeset_add_prop_string(&chgset, n22, "prop-str", "abcd"), in of_unittest_changeset()
887 unittest(!of_changeset_add_prop_string_array(&chgset, n22, "prop-str-array", in of_unittest_changeset()
891 unittest(!of_changeset_add_prop_u32_array(&chgset, n22, "prop-u32-array", in of_unittest_changeset()
895 unittest(!of_changeset_apply(&chgset), "apply failed\n"); in of_unittest_changeset()
900 unittest((np = of_find_node_by_path("/testcase-data/changeset/n2/n21")), in of_unittest_changeset()
903 unittest((np = of_find_node_by_path("/testcase-data/changeset/n2/n22")), in of_unittest_changeset()
907 unittest(!of_changeset_revert(&chgset), "revert failed\n"); in of_unittest_changeset()
909 unittest(!of_find_node_by_path("/testcase-data/changeset/n2/n21"), in of_unittest_changeset()
912 unittest(of_property_present(parent, "prop-remove"), in of_unittest_changeset()
916 unittest(!ret, "failed to find updated prop after revert\n"); in of_unittest_changeset()
918 unittest(strcmp(propstr, "hello") == 0, "original value not in updated property after revert"); in of_unittest_changeset()
937 if (unittest(ret == 0, "failed to read %s\n", prop_name)) in changeset_check_string()
940 unittest(strcmp(str, expected_str) == 0, in changeset_check_string()
956 if (unittest(cnt >= 0, "failed to get %s count\n", prop_name)) in changeset_check_string_array()
959 if (unittest(cnt == count, in changeset_check_string_array()
966 if (unittest(ret == 0, "failed to read %s[%d]\n", prop_name, i)) in changeset_check_string_array()
969 unittest(strcmp(str, expected_array[i]) == 0, in changeset_check_string_array()
983 if (unittest(ret == 0, "failed to read %s\n", prop_name)) in changeset_check_u32()
986 unittest(val32 == expected_u32, in changeset_check_u32()
1002 if (unittest(cnt >= 0, "failed to get %s count\n", prop_name)) in changeset_check_u32_array()
1005 if (unittest(cnt == count, in changeset_check_u32_array()
1012 if (unittest(ret == 0, "failed to read %s[%d]\n", prop_name, i)) in changeset_check_u32_array()
1015 unittest(val32 == expected_array[i], in changeset_check_u32_array()
1024 unittest(of_property_read_bool(np, prop_name), in changeset_check_bool()
1046 if (unittest(np, "failed to create test-prop node\n")) in of_unittest_changeset_prop()
1050 unittest(ret == 0, "failed to add prop-string\n"); in of_unittest_changeset_prop()
1054 unittest(ret == 0, "failed to add prop-string-array\n"); in of_unittest_changeset_prop()
1057 unittest(ret == 0, "failed to add prop-u32\n"); in of_unittest_changeset_prop()
1061 unittest(ret == 0, "failed to add prop-u32-array\n"); in of_unittest_changeset_prop()
1064 unittest(ret == 0, "failed to add prop-bool\n"); in of_unittest_changeset_prop()
1069 if (unittest(ret == 0, "failed to apply changeset\n")) in of_unittest_changeset_prop()
1073 if (unittest(np, "failed to find test-prop node\n")) in of_unittest_changeset_prop()
1086 unittest(ret == 0, "failed to revert changeset\n"); in of_unittest_changeset_prop()
1109 unittest(cpu_addr == 0x4fffffff, in of_unittest_dma_get_max_cpu_address()
1130 unittest(!rc, "of_dma_get_range failed on node %pOF rc=%i\n", np, rc); in of_unittest_dma_ranges_one()
1139 unittest(0, "kzalloc() failed\n"); in of_unittest_dma_ranges_one()
1148 unittest(paddr == expect_paddr, in of_unittest_dma_ranges_one()
1151 unittest(dma_addr == expect_dma_addr, in of_unittest_dma_ranges_one()
1199 unittest(range.size == 0x10000000, in of_unittest_pci_dma_ranges()
1202 unittest(range.cpu_addr == 0x20000000, in of_unittest_pci_dma_ranges()
1205 unittest(range.pci_addr == 0x80000000, in of_unittest_pci_dma_ranges()
1209 unittest(range.size == 0x10000000, in of_unittest_pci_dma_ranges()
1212 unittest(range.cpu_addr == 0x40000000, in of_unittest_pci_dma_ranges()
1215 unittest(range.pci_addr == 0xc0000000, in of_unittest_pci_dma_ranges()
1249 unittest(range.size == 0x10000000, in of_unittest_pci_empty_dma_ranges()
1252 unittest(range.cpu_addr == 0x00000000, in of_unittest_pci_empty_dma_ranges()
1255 unittest(range.pci_addr == 0xc0000000, in of_unittest_pci_empty_dma_ranges()
1283 unittest(!ret, "of_range_to_resource returned error (%d) node %pOF\n", in of_unittest_bus_ranges()
1285 unittest(resource_type(&res) == IORESOURCE_MEM, in of_unittest_bus_ranges()
1288 unittest(res.start == 0xd0000000, in of_unittest_bus_ranges()
1291 unittest(resource_size(&res) == 0x20000000, in of_unittest_bus_ranges()
1296 unittest(count == 2, in of_unittest_bus_ranges()
1304 unittest(range.flags == IORESOURCE_MEM, in of_unittest_bus_ranges()
1308 unittest(range.size == 0x50000000, in of_unittest_bus_ranges()
1311 unittest(range.cpu_addr == 0x70000000, in of_unittest_bus_ranges()
1314 unittest(range.bus_addr == 0x70000000, in of_unittest_bus_ranges()
1318 unittest(range.size == 0x20000000, in of_unittest_bus_ranges()
1321 unittest(range.cpu_addr == 0xd0000000, in of_unittest_bus_ranges()
1324 unittest(range.bus_addr == 0x00000000, in of_unittest_bus_ranges()
1357 unittest(range.flags == 0xf00baa, in of_unittest_bus_3cell_ranges()
1360 unittest(range.size == 0x100000, in of_unittest_bus_3cell_ranges()
1363 unittest(range.cpu_addr == 0xa0000000, in of_unittest_bus_3cell_ranges()
1366 unittest(range.bus_addr == 0x0, in of_unittest_bus_3cell_ranges()
1370 unittest(range.flags == 0xf00bee, in of_unittest_bus_3cell_ranges()
1373 unittest(range.size == 0x200000, in of_unittest_bus_3cell_ranges()
1376 unittest(range.cpu_addr == 0xb0000000, in of_unittest_bus_3cell_ranges()
1379 unittest(range.bus_addr == 0x100000000, in of_unittest_bus_3cell_ranges()
1403 unittest(!ret, "of_property_read_reg(%pOF) returned error %d\n", in of_unittest_reg()
1405 unittest(addr == 0x1000, "of_property_read_reg(%pOF) untranslated address (%llx) incorrect\n", in of_unittest_reg()
1417 unittest(ret == -EINVAL, "of_address_to_resource(%pOF) expected error on untranslatable address\n", in of_unittest_reg()
1452 unittest(!ret, "of_address_to_resource(%pOF, %d) returned error %d\n", in of_unittest_check_addr()
1454 unittest(resource_type(&res) == resource_type(&expected->res) && in of_unittest_check_addr()
1525 unittest(passed, "index %i - data error on node %pOF rc=%i\n", in of_unittest_parse_interrupts()
1571 unittest(passed, "index %i - data error on node %pOF rc=%i\n", in of_unittest_parse_interrupts()
1651 unittest(passed, "index %i - data error on node %pOF rc=%i\n", in of_unittest_parse_interrupts_extended()
1693 unittest(passed, "IRQ refcount case #1 failed, original(%u) expected(%u) got(%u)\n", in of_unittest_irq_refcount()
1710 unittest(passed, "IRQ refcount case #2 failed, original(%u) expected(%u) got(%u)\n", in of_unittest_irq_refcount()
1767 unittest(0, "missing testcase node %s\n", in of_unittest_match_node()
1774 unittest(0, "%s didn't match anything\n", in of_unittest_match_node()
1780 unittest(0, "%s got wrong match. expected %s, got %s\n", in of_unittest_match_node()
1785 unittest(1, "passed"); in of_unittest_match_node()
1809 unittest(pdev, "device 1 creation failed\n"); in of_unittest_platform_populate()
1813 unittest(irq == -EPROBE_DEFER, in of_unittest_platform_populate()
1819 unittest(pdev, "device 2 creation failed\n"); in of_unittest_platform_populate()
1829 unittest(irq < 0 && irq != -EPROBE_DEFER, in of_unittest_platform_populate()
1834 unittest(np, "No testcase data in device tree\n"); in of_unittest_platform_populate()
1840 unittest(!rc, "testbus registration failed; rc=%i\n", rc); in of_unittest_platform_populate()
1862 unittest(pdev, in of_unittest_platform_populate()
1872 unittest(!of_find_device_by_node(grandchild), in of_unittest_platform_populate()
2177 unittest(!ret, in unittest_gpio_probe()
2248 unittest(overlay_data_apply("overlay_gpio_01", NULL), in of_unittest_overlay_gpio()
2251 unittest(overlay_data_apply("overlay_gpio_02a", NULL), in of_unittest_overlay_gpio()
2254 unittest(overlay_data_apply("overlay_gpio_02b", NULL), in of_unittest_overlay_gpio()
2258 if (unittest(ret == 0, "could not register unittest gpio driver\n")) in of_unittest_overlay_gpio()
2261 unittest(probe_pass_count + 2 == unittest_gpio_probe_pass_count, in of_unittest_overlay_gpio()
2264 unittest(chip_request_count + 2 == unittest_gpio_chip_request_count, in of_unittest_overlay_gpio()
2287 unittest(overlay_data_apply("overlay_gpio_03", NULL), in of_unittest_overlay_gpio()
2290 unittest(probe_pass_count + 1 == unittest_gpio_probe_pass_count, in of_unittest_overlay_gpio()
2293 unittest(chip_request_count + 1 == unittest_gpio_chip_request_count, in of_unittest_overlay_gpio()
2311 unittest(overlay_data_apply("overlay_gpio_04a", NULL), in of_unittest_overlay_gpio()
2314 unittest(probe_pass_count + 1 == unittest_gpio_probe_pass_count, in of_unittest_overlay_gpio()
2328 unittest(overlay_data_apply("overlay_gpio_04b", NULL), in of_unittest_overlay_gpio()
2331 unittest(chip_request_count + 1 == unittest_gpio_chip_request_count, in of_unittest_overlay_gpio()
2506 unittest(0, "could not apply overlay \"%s\"\n", overlay_name); in of_unittest_apply_overlay()
2522 unittest(0, "%s with device @\"%s\" %s\n", in __of_unittest_apply_overlay_check()
2539 unittest(0, "%s with device @\"%s\" %s\n", in __of_unittest_apply_overlay_check()
2578 unittest(0, "%s failed to be destroyed @\"%s\"\n", in of_unittest_apply_revert_overlay_check()
2587 unittest(0, "%s with device @\"%s\" %s\n", in of_unittest_apply_revert_overlay_check()
2614 unittest(1, "overlay test %d passed\n", 0); in of_unittest_overlay_0()
2634 unittest(1, "overlay test %d passed\n", 1); in of_unittest_overlay_1()
2654 unittest(1, "overlay test %d passed\n", 2); in of_unittest_overlay_2()
2674 unittest(1, "overlay test %d passed\n", 3); in of_unittest_overlay_3()
2684 unittest(1, "overlay test %d passed\n", 4); in of_unittest_overlay_4()
2704 unittest(1, "overlay test %d passed\n", 5); in of_unittest_overlay_5()
2721 unittest(0, "%s with device @\"%s\" %s\n", in of_unittest_overlay_6()
2740 unittest(0, "could not apply overlay \"%s\"\n", overlay_name); in of_unittest_overlay_6()
2757 unittest(0, "could not apply overlay \"%s\"\n", overlay_name); in of_unittest_overlay_6()
2771 unittest(0, "overlay @\"%s\" failed @\"%s\" %s\n", in of_unittest_overlay_6()
2783 unittest(0, "%s failed destroy @\"%s\"\n", in of_unittest_overlay_6()
2796 unittest(0, "%s with device @\"%s\" %s\n", in of_unittest_overlay_6()
2805 unittest(1, "overlay test %d passed\n", 6); in of_unittest_overlay_6()
2826 unittest(0, "could not apply overlay \"%s\"\n", overlay_name); in of_unittest_overlay_8()
2849 unittest(0, "could not apply overlay \"%s\"\n", overlay_name); in of_unittest_overlay_8()
2878 unittest(0, "%s was destroyed @\"%s\"\n", in of_unittest_overlay_8()
2889 unittest(0, "%s not destroyed @\"%s\"\n", in of_unittest_overlay_8()
2898 unittest(1, "overlay test %d passed\n", 8); in of_unittest_overlay_8()
2910 if (unittest(ret == 0, in of_unittest_overlay_10()
2916 if (unittest(child_path, "overlay test %d failed; kasprintf\n", 10)) in of_unittest_overlay_10()
2922 unittest(ret, "overlay test %d failed; no child device\n", 10); in of_unittest_overlay_10()
2934 unittest(ret == 0, "overlay test %d failed; overlay apply\n", 11); in of_unittest_overlay_11()
3153 if (unittest(ret == 0, in of_unittest_overlay_i2c_init()
3159 if (unittest(ret == 0, in of_unittest_overlay_i2c_init()
3173 if (unittest(ret == 0, in of_unittest_overlay_i2c_init()
3206 unittest(1, "overlay test %d passed\n", 12); in of_unittest_overlay_i2c_12()
3226 unittest(1, "overlay test %d passed\n", 13); in of_unittest_overlay_i2c_13()
3250 unittest(1, "overlay test %d passed\n", 15); in of_unittest_overlay_i2c_15()
3338 unittest(!ret, in of_unittest_overlay_notify()
3359 unittest(overlay_data_apply("overlay_16", &ovcs_id), in of_unittest_overlay_notify()
3364 unittest(ovcs_id, "ovcs_id not created for overlay_16\n"); in of_unittest_overlay_notify()
3370 unittest(overlay_data_apply("overlay_17", &ovcs_id), in of_unittest_overlay_notify()
3375 unittest(ovcs_id, "ovcs_id not created for overlay_17\n"); in of_unittest_overlay_notify()
3379 unittest(overlay_data_apply("overlay_18", &ovcs_id), in of_unittest_overlay_notify()
3382 unittest(ovcs_id, "ovcs_id not created for overlay_18\n"); in of_unittest_overlay_notify()
3393 unittest(1, "overlay_18 of_overlay_remove() injected error for OF_OVERLAY_PRE_REMOVE\n"); in of_unittest_overlay_notify()
3395unittest(0, "overlay_18 of_overlay_remove() injected error for OF_OVERLAY_PRE_REMOVE not returned\… in of_unittest_overlay_notify()
3398 unittest(1, "ovcs_id not created for overlay_18\n"); in of_unittest_overlay_notify()
3401 unittest(ovcs_id, "ovcs_id removed for overlay_18\n"); in of_unittest_overlay_notify()
3405 unittest(overlay_data_apply("overlay_19", &ovcs_id), in of_unittest_overlay_notify()
3408 unittest(ovcs_id, "ovcs_id not created for overlay_19\n"); in of_unittest_overlay_notify()
3415 unittest(1, "overlay_19 of_overlay_remove() injected error for OF_OVERLAY_POST_REMOVE\n"); in of_unittest_overlay_notify()
3417unittest(0, "overlay_19 of_overlay_remove() injected error for OF_OVERLAY_POST_REMOVE not returned… in of_unittest_overlay_notify()
3419 unittest(1, "ovcs_id removed for overlay_19\n"); in of_unittest_overlay_notify()
3422 unittest(!ovcs_id, "changeset ovcs_id = %d not removed for overlay_19\n", in of_unittest_overlay_notify()
3427 unittest(overlay_data_apply("overlay_20", &ovcs_id), in of_unittest_overlay_notify()
3433 unittest(1, "overlay_20 failed to be destroyed, ret = %d\n", in of_unittest_overlay_notify()
3436 unittest(1, "ovcs_id not created for overlay_20\n"); in of_unittest_overlay_notify()
3439 unittest(!of_overlay_notifier_unregister(&of_nb), in of_unittest_overlay_notify()
3449 unittest(0, "could not register unittest driver\n"); in of_unittest_overlay()
3455 unittest(0, "could not find bus_path \"%s\"\n", bus_path); in of_unittest_overlay()
3460 unittest(0, "could not populate bus @ \"%s\"\n", bus_path); in of_unittest_overlay()
3465 unittest(0, "could not find unittest0 @ \"%s\"\n", in of_unittest_overlay()
3471 unittest(0, "unittest1 @ \"%s\" should not exist\n", in of_unittest_overlay()
3476 unittest(1, "basic infrastructure of overlays passed"); in of_unittest_overlay()
3493 if (unittest(of_unittest_overlay_i2c_init() == 0, "i2c init failed\n")) in of_unittest_overlay()
3541 unittest(np, "find refcount_path \"%s\"\n", refcount_path); in of_unittest_lifecycle()
3548 unittest(0, "guardrail to avoid infinite loop\n"); in of_unittest_lifecycle()
3566 unittest(1, "/testcase-data/refcount-node is one"); in of_unittest_lifecycle()
3586 unittest(1, "/testcase-data/refcount-node is zero"); in of_unittest_lifecycle()
3603 unittest(1, "/testcase-data/refcount-node is zero, second time"); in of_unittest_lifecycle()
3629 unittest(np, "find refcount_parent_path \"%s\"\n", refcount_parent_path); in of_unittest_lifecycle()
3630 unittest(np, "ERROR: devicetree live tree left in a 'bad state' if test fail\n"); in of_unittest_lifecycle()
3652 unittest(0, "One or more lifecycle tests skipped\n"); in of_unittest_lifecycle()
3913 unittest(0, "overlay_base_root not initialized\n"); in of_unittest_overlay_high_level()
3963 unittest(0, "illegal node name in overlay_base %pOFn", in of_unittest_overlay_high_level()
4002 unittest(0, "__of_prop_dup() of '%s' from overlay_base node __symbols__", in of_unittest_overlay_high_level()
4011 unittest(0, "duplicate property '%s' in overlay_base node __symbols__", in of_unittest_overlay_high_level()
4016 unittest(0, "unable to add property '%s' in overlay_base node __symbols__ to sysfs", in of_unittest_overlay_high_level()
4078 unittest(ret, "Adding overlay 'overlay' failed\n"); in of_unittest_overlay_high_level()
4091 unittest(overlay_data_apply("overlay_bad_add_dup_node", NULL), in of_unittest_overlay_high_level()
4116 unittest(overlay_data_apply("overlay_bad_add_dup_prop", NULL), in of_unittest_overlay_high_level()
4132 unittest(overlay_data_apply("overlay_bad_phandle", NULL), in of_unittest_overlay_high_level()
4142 unittest(overlay_data_apply("overlay_bad_symbol", NULL), in of_unittest_overlay_high_level()
4157 unittest(overlay_data_apply("overlay_bad_unresolved", NULL), in of_unittest_overlay_high_level()
4250 unittest(res->start == exp_addr, "Incorrect translated address %llx, expected %llx\n", in unittest_pci_probe()
4280 unittest(pnp, "Failed creating PCI dt node\n"); in of_unittest_pci_node_verify()
4287 unittest(np, "Failed to get unittest-pci node under PCI node\n"); in of_unittest_pci_node_verify()
4294 unittest(reg, "Failed to get reg property\n"); in of_unittest_pci_node_verify()
4300 unittest(!np, "Child device tree node is not removed\n"); in of_unittest_pci_node_verify()
4302 unittest(!child_dev, "Child device is not removed\n"); in of_unittest_pci_node_verify()
4322 unittest(!rc, "Failed to register pci test driver; rc = %d\n", rc); in of_unittest_pci_node()
4327 if (unittest(!rc, "Failed to register unittest pci driver\n")) { in of_unittest_pci_node()
4339 unittest(of_unittest_pci_dev_num, in of_unittest_pci_node()
4341 unittest(of_unittest_pci_dev_num == of_unittest_pci_child_num, in of_unittest_pci_node()