Re: [PATCH] genirq/test: Fix depth tests on architectures with NOREQUEST by default.

From: Guenter Roeck
Date: Sun Aug 17 2025 - 11:09:22 EST


On 8/16/25 02:45, David Gow wrote:
The new irq KUnit tests fail on some architectures (notably PowerPC and
32-bit ARM), as the request_irq() call fails due to the
ARCH_IRQ_INIT_FLAGS containing IRQ_NOREQUEST, yielding the following
errors:
[10:17:45] # irq_free_disabled_test: EXPECTATION FAILED at kernel/irq/irq_test.c:88
[10:17:45] Expected ret == 0, but
[10:17:45] ret == -22 (0xffffffffffffffea)
[10:17:45] # irq_free_disabled_test: EXPECTATION FAILED at kernel/irq/irq_test.c:90
[10:17:45] Expected desc->depth == 0, but
[10:17:45] desc->depth == 1 (0x1)
[10:17:45] # irq_free_disabled_test: EXPECTATION FAILED at kernel/irq/irq_test.c:93
[10:17:45] Expected desc->depth == 1, but
[10:17:45] desc->depth == 2 (0x2)

If we clear IRQ_NOREQUEST from the desc, these tests now pass on arm and
powerpc.

Fixes: 66067c3c8a1e ("genirq: Add kunit tests for depth counts")
Signed-off-by: David Gow <davidgow@xxxxxxxxxx>

This doesn't completely fix the problems with the code, but it is a start.

From:

Unit test results:
pass: 640019 fail: 652

to:

Unit test results:
pass: 640559 fail: 114

Above tests now pass for most architectures/platforms, so

Tested-by: Guenter Roeck <linux@xxxxxxxxxxxx>

Detailed test results are at https://kerneltests.org/builders in the "testing"
column in case anyone wants to have a look.

Guenter