Lines Matching refs:strings
388 const char *strings[4]; in of_unittest_property_string() local
424 rc = of_property_read_string_index(np, "string-property", 0, strings); in of_unittest_property_string()
425 …unittest(rc == 0 && !strcmp(strings[0], "foobar"), "of_property_read_string_index() failure; rc=%i… in of_unittest_property_string()
426 strings[0] = NULL; in of_unittest_property_string()
427 rc = of_property_read_string_index(np, "string-property", 1, strings); in of_unittest_property_string()
428 …unittest(rc == -ENODATA && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n",… in of_unittest_property_string()
429 rc = of_property_read_string_index(np, "phandle-list-names", 0, strings); in of_unittest_property_string()
430 …unittest(rc == 0 && !strcmp(strings[0], "first"), "of_property_read_string_index() failure; rc=%i\… in of_unittest_property_string()
431 rc = of_property_read_string_index(np, "phandle-list-names", 1, strings); in of_unittest_property_string()
432 …unittest(rc == 0 && !strcmp(strings[0], "second"), "of_property_read_string_index() failure; rc=%i… in of_unittest_property_string()
433 rc = of_property_read_string_index(np, "phandle-list-names", 2, strings); in of_unittest_property_string()
434 …unittest(rc == 0 && !strcmp(strings[0], "third"), "of_property_read_string_index() failure; rc=%i\… in of_unittest_property_string()
435 strings[0] = NULL; in of_unittest_property_string()
436 rc = of_property_read_string_index(np, "phandle-list-names", 3, strings); in of_unittest_property_string()
437 …unittest(rc == -ENODATA && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n",… in of_unittest_property_string()
438 strings[0] = NULL; in of_unittest_property_string()
439 rc = of_property_read_string_index(np, "unterminated-string", 0, strings); in of_unittest_property_string()
440 …unittest(rc == -EILSEQ && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n", … in of_unittest_property_string()
441 rc = of_property_read_string_index(np, "unterminated-string-list", 0, strings); in of_unittest_property_string()
442 …unittest(rc == 0 && !strcmp(strings[0], "first"), "of_property_read_string_index() failure; rc=%i\… in of_unittest_property_string()
443 strings[0] = NULL; in of_unittest_property_string()
444 rc = of_property_read_string_index(np, "unterminated-string-list", 2, strings); /* should fail */ in of_unittest_property_string()
445 …unittest(rc == -EILSEQ && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n", … in of_unittest_property_string()
446 strings[1] = NULL; in of_unittest_property_string()
449 rc = of_property_read_string_array(np, "string-property", strings, 4); in of_unittest_property_string()
451 rc = of_property_read_string_array(np, "phandle-list-names", strings, 4); in of_unittest_property_string()
453 rc = of_property_read_string_array(np, "unterminated-string", strings, 4); in of_unittest_property_string()
456 rc = of_property_read_string_array(np, "unterminated-string-list", strings, 4); in of_unittest_property_string()
459 strings[2] = NULL; in of_unittest_property_string()
460 rc = of_property_read_string_array(np, "unterminated-string-list", strings, 2); in of_unittest_property_string()
461 unittest(rc == 2 && strings[2] == NULL, "of_property_read_string_array() failure; rc=%i\n", rc); in of_unittest_property_string()
462 strings[1] = NULL; in of_unittest_property_string()
463 rc = of_property_read_string_array(np, "phandle-list-names", strings, 1); in of_unittest_property_string()
464 …unittest(rc == 1 && strings[1] == NULL, "Overwrote end of string array; rc=%i, str='%s'\n", rc, st… in of_unittest_property_string()