drivers/of/unittest.c | 28 ---------------------------- 1 file changed, 28 deletions(-)
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
These have now been demoted to debug and are normally hidden. Drop the
assertions entirely.
Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
drivers/of/unittest.c | 28 ----------------------------
1 file changed, 28 deletions(-)
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 0060334a98a7..5386efeaf710 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -1844,26 +1844,10 @@ static void __init of_unittest_overlay_gpio(void)
unittest(overlay_data_apply("overlay_gpio_02b", NULL),
"Adding overlay 'overlay_gpio_02b' failed\n");
- /*
- * messages are the result of the probes, after the
- * driver is registered
- */
-
- EXPECT_BEGIN(KERN_DEBUG,
- "gpio-<<int>> (line-B-input): hogged as input\n");
-
- EXPECT_BEGIN(KERN_DEBUG,
- "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_DEBUG,
- "gpio-<<int>> (line-A-input): hogged as input\n");
- EXPECT_END(KERN_DEBUG,
- "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");
@@ -1888,17 +1872,11 @@ static void __init of_unittest_overlay_gpio(void)
probe_pass_count = unittest_gpio_probe_pass_count;
chip_request_count = unittest_gpio_chip_request_count;
- EXPECT_BEGIN(KERN_DEBUG,
- "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_DEBUG,
- "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");
@@ -1935,17 +1913,11 @@ static void __init of_unittest_overlay_gpio(void)
* - processing gpio for overlay_gpio_04b
*/
- EXPECT_BEGIN(KERN_DEBUG,
- "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_DEBUG,
- "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",
unittest_gpio_chip_request_count - chip_request_count);
--
2.39.2
On Fri, Jun 9, 2023 at 8:36 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > These have now been demoted to debug and are normally hidden. Drop the > assertions entirely. > > Suggested-by: Rob Herring <robh@kernel.org> > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > --- > drivers/of/unittest.c | 28 ---------------------------- > 1 file changed, 28 deletions(-) Why is this a separate patch? Don't I get at least 5 days to review/ack changes in drivers/of/? Rob
On Fri, Jun 9, 2023 at 7:01 PM Rob Herring <robh+dt@kernel.org> wrote: > > On Fri, Jun 9, 2023 at 8:36 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > These have now been demoted to debug and are normally hidden. Drop the > > assertions entirely. > > > > Suggested-by: Rob Herring <robh@kernel.org> > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > --- > > drivers/of/unittest.c | 28 ---------------------------- > > 1 file changed, 28 deletions(-) > > Why is this a separate patch? Don't I get at least 5 days to > review/ack changes in drivers/of/? > Sorry, my bad, I queued the previous one through the GPIO tree after it was reviewed here thinking the unittests bits are trivial. I can back it out if you insist or you can ack this one and the end effect is the same? I will pay attention in the future. Bart
On Fri, Jun 9, 2023 at 2:15 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > On Fri, Jun 9, 2023 at 7:01 PM Rob Herring <robh+dt@kernel.org> wrote: > > > > On Fri, Jun 9, 2023 at 8:36 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > > > > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > > > These have now been demoted to debug and are normally hidden. Drop the > > > assertions entirely. > > > > > > Suggested-by: Rob Herring <robh@kernel.org> > > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > --- > > > drivers/of/unittest.c | 28 ---------------------------- > > > 1 file changed, 28 deletions(-) > > > > Why is this a separate patch? Don't I get at least 5 days to > > review/ack changes in drivers/of/? > > > > Sorry, my bad, I queued the previous one through the GPIO tree after > it was reviewed here thinking the unittests bits are trivial. I can > back it out if you insist or you can ack this one and the end effect > is the same? I will pay attention in the future. I'd prefer it to be squashed, but either way: Acked-by: Rob Herring <robh@kernel.org>
On Fri, Jun 09, 2023 at 04:36:09PM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> These have now been demoted to debug and are normally hidden. Drop the
> assertions entirely.
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Suggested-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
> drivers/of/unittest.c | 28 ----------------------------
> 1 file changed, 28 deletions(-)
>
> diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
> index 0060334a98a7..5386efeaf710 100644
> --- a/drivers/of/unittest.c
> +++ b/drivers/of/unittest.c
> @@ -1844,26 +1844,10 @@ static void __init of_unittest_overlay_gpio(void)
> unittest(overlay_data_apply("overlay_gpio_02b", NULL),
> "Adding overlay 'overlay_gpio_02b' failed\n");
>
> - /*
> - * messages are the result of the probes, after the
> - * driver is registered
> - */
> -
> - EXPECT_BEGIN(KERN_DEBUG,
> - "gpio-<<int>> (line-B-input): hogged as input\n");
> -
> - EXPECT_BEGIN(KERN_DEBUG,
> - "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_DEBUG,
> - "gpio-<<int>> (line-A-input): hogged as input\n");
> - EXPECT_END(KERN_DEBUG,
> - "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");
>
> @@ -1888,17 +1872,11 @@ static void __init of_unittest_overlay_gpio(void)
> probe_pass_count = unittest_gpio_probe_pass_count;
> chip_request_count = unittest_gpio_chip_request_count;
>
> - EXPECT_BEGIN(KERN_DEBUG,
> - "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_DEBUG,
> - "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");
>
> @@ -1935,17 +1913,11 @@ static void __init of_unittest_overlay_gpio(void)
> * - processing gpio for overlay_gpio_04b
> */
>
> - EXPECT_BEGIN(KERN_DEBUG,
> - "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_DEBUG,
> - "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",
> unittest_gpio_chip_request_count - chip_request_count);
> --
> 2.39.2
>
--
With Best Regards,
Andy Shevchenko
© 2016 - 2026 Red Hat, Inc.