Skip to content

Commit

Permalink
of: unittest: fix EXPECT text for gpio hog errors
Browse files Browse the repository at this point in the history
commit e85860e upstream.

The console message text for gpio hog errors does not match
what unittest expects.

Fixes: f4056e7 ("of: unittest: add overlay gpio test to catch gpio hog problem")
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Link: https://lore.kernel.org/r/20211029013225.2048695-1-frowand.list@gmail.com
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Frank Rowand authored and Greg Kroah-Hartman committed Feb 23, 2024
1 parent 7dd275c commit 6ac8965
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions drivers/of/unittest.c
Original file line number Diff line number Diff line change
@@ -2258,19 +2258,19 @@ static void __init of_unittest_overlay_gpio(void)
*/

EXPECT_BEGIN(KERN_INFO,
"GPIO line <<int>> (line-B-input) hogged as input\n");
"gpio-<<int>> (line-B-input): hogged as input\n");

EXPECT_BEGIN(KERN_INFO,
"GPIO line <<int>> (line-A-input) hogged as input\n");
"gpio-<<int>> (line-A-input): hogged as input\n");

ret = platform_driver_register(&unittest_gpio_driver);
if (unittest(ret == 0, "could not register unittest gpio driver\n"))
return;

EXPECT_END(KERN_INFO,
"GPIO line <<int>> (line-A-input) hogged as input\n");
"gpio-<<int>> (line-A-input): hogged as input\n");
EXPECT_END(KERN_INFO,
"GPIO line <<int>> (line-B-input) hogged as input\n");
"gpio-<<int>> (line-B-input): hogged as input\n");

unittest(probe_pass_count + 2 == unittest_gpio_probe_pass_count,
"unittest_gpio_probe() failed or not called\n");
@@ -2297,15 +2297,15 @@ static void __init of_unittest_overlay_gpio(void)
chip_request_count = unittest_gpio_chip_request_count;

EXPECT_BEGIN(KERN_INFO,
"GPIO line <<int>> (line-D-input) hogged as input\n");
"gpio-<<int>> (line-D-input): hogged as input\n");

/* overlay_gpio_03 contains gpio node and child gpio hog node */

unittest(overlay_data_apply("overlay_gpio_03", NULL),
"Adding overlay 'overlay_gpio_03' failed\n");

EXPECT_END(KERN_INFO,
"GPIO line <<int>> (line-D-input) hogged as input\n");
"gpio-<<int>> (line-D-input): hogged as input\n");

unittest(probe_pass_count + 1 == unittest_gpio_probe_pass_count,
"unittest_gpio_probe() failed or not called\n");
@@ -2344,15 +2344,15 @@ static void __init of_unittest_overlay_gpio(void)
*/

EXPECT_BEGIN(KERN_INFO,
"GPIO line <<int>> (line-C-input) hogged as input\n");
"gpio-<<int>> (line-C-input): hogged as input\n");

/* overlay_gpio_04b contains child gpio hog node */

unittest(overlay_data_apply("overlay_gpio_04b", NULL),
"Adding overlay 'overlay_gpio_04b' failed\n");

EXPECT_END(KERN_INFO,
"GPIO line <<int>> (line-C-input) hogged as input\n");
"gpio-<<int>> (line-C-input): hogged as input\n");

unittest(chip_request_count + 1 == unittest_gpio_chip_request_count,
"unittest_gpio_chip_request() called %d times (expected 1 time)\n",

0 comments on commit 6ac8965

Please sign in to comment.