[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7071c813-538b-4f57-8a71-2ca77ee70bfd@roeck-us.net>
Date: Fri, 22 Aug 2025 18:13:35 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Brian Norris <briannorris@...omium.org>
Cc: Thomas Gleixner <tglx@...utronix.de>, David Gow <davidgow@...gle.com>,
linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert@...ux-m68k.org>,
kunit-dev@...glegroups.com
Subject: Re: [PATCH v2 3/6] genirq/test: Fail early if we can't request an IRQ
On Fri, Aug 22, 2025 at 11:59:04AM -0700, Brian Norris wrote:
> Requesting the IRQ is part of basic setup of the test. If it fails, most
> of the subsequent tests are likely to fail, and the output gets noisy.
> Use "assert" to fail early.
>
> Signed-off-by: Brian Norris <briannorris@...omium.org>
> Reviewed-by: David Gow <davidgow@...gle.com>
Tested-by: Guenter Roeck <linux@...ck-us.net>
> ---
>
> (no changes since v1)
>
> kernel/irq/irq_test.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/kernel/irq/irq_test.c b/kernel/irq/irq_test.c
> index f8f4532c2805..56baeb5041d6 100644
> --- a/kernel/irq/irq_test.c
> +++ b/kernel/irq/irq_test.c
> @@ -71,7 +71,7 @@ static void irq_disable_depth_test(struct kunit *test)
> KUNIT_ASSERT_PTR_NE(test, desc, NULL);
>
> ret = request_irq(virq, noop_handler, 0, "test_irq", NULL);
> - KUNIT_EXPECT_EQ(test, ret, 0);
> + KUNIT_ASSERT_EQ(test, ret, 0);
>
> KUNIT_EXPECT_EQ(test, desc->depth, 0);
>
> @@ -95,7 +95,7 @@ static void irq_free_disabled_test(struct kunit *test)
> KUNIT_ASSERT_PTR_NE(test, desc, NULL);
>
> ret = request_irq(virq, noop_handler, 0, "test_irq", NULL);
> - KUNIT_EXPECT_EQ(test, ret, 0);
> + KUNIT_ASSERT_EQ(test, ret, 0);
>
> KUNIT_EXPECT_EQ(test, desc->depth, 0);
>
> @@ -106,7 +106,7 @@ static void irq_free_disabled_test(struct kunit *test)
> KUNIT_EXPECT_GE(test, desc->depth, 1);
>
> ret = request_irq(virq, noop_handler, 0, "test_irq", NULL);
> - KUNIT_EXPECT_EQ(test, ret, 0);
> + KUNIT_ASSERT_EQ(test, ret, 0);
> KUNIT_EXPECT_EQ(test, desc->depth, 0);
>
> free_irq(virq, NULL);
> @@ -134,7 +134,7 @@ static void irq_shutdown_depth_test(struct kunit *test)
> KUNIT_ASSERT_PTR_NE(test, data, NULL);
>
> ret = request_irq(virq, noop_handler, 0, "test_irq", NULL);
> - KUNIT_EXPECT_EQ(test, ret, 0);
> + KUNIT_ASSERT_EQ(test, ret, 0);
>
> KUNIT_EXPECT_TRUE(test, irqd_is_activated(data));
> KUNIT_EXPECT_TRUE(test, irqd_is_started(data));
> @@ -191,7 +191,7 @@ static void irq_cpuhotplug_test(struct kunit *test)
> KUNIT_ASSERT_PTR_NE(test, data, NULL);
>
> ret = request_irq(virq, noop_handler, 0, "test_irq", NULL);
> - KUNIT_EXPECT_EQ(test, ret, 0);
> + KUNIT_ASSERT_EQ(test, ret, 0);
>
> KUNIT_EXPECT_TRUE(test, irqd_is_activated(data));
> KUNIT_EXPECT_TRUE(test, irqd_is_started(data));
> --
> 2.51.0.rc2.233.g662b1ed5c5-goog
>
Powered by blists - more mailing lists