Skip to content

Commit

Permalink
of: unittest: Fix EXPECT for parse_phandle_with_args_map() test
Browse files Browse the repository at this point in the history
commit 0aeae37 upstream.

Commit 12e1724 ("of: base: improve error msg in
of_phandle_iterator_next()") added printing of the phandle value on
error, but failed to update the unittest.

Fixes: 12e1724 ("of: base: improve error msg in of_phandle_iterator_next()")
Cc: stable@vger.kernel.org
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230801-dt-changeset-fixes-v3-1-5f0410e007dd@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
robherring authored and gregkh committed Aug 30, 2023
1 parent fa700d9 commit d92815c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/of/unittest.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,12 +664,12 @@ static void __init of_unittest_parse_phandle_with_args_map(void)
memset(&args, 0, sizeof(args));

EXPECT_BEGIN(KERN_INFO,
"OF: /testcase-data/phandle-tests/consumer-b: could not find phandle");
"OF: /testcase-data/phandle-tests/consumer-b: could not find phandle 12345678");

rc = of_parse_phandle_with_args_map(np, "phandle-list-bad-phandle",
"phandle", 0, &args);
EXPECT_END(KERN_INFO,
"OF: /testcase-data/phandle-tests/consumer-b: could not find phandle");
"OF: /testcase-data/phandle-tests/consumer-b: could not find phandle 12345678");

unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc);

Expand Down

0 comments on commit d92815c

Please sign in to comment.