qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] tests/qtest: Check that EXTI fan-in irqs are correctly c


From: Peter Maydell
Subject: Re: [PATCH 2/2] tests/qtest: Check that EXTI fan-in irqs are correctly connected
Date: Thu, 15 Feb 2024 13:24:27 +0000

On Mon, 12 Feb 2024 at 16:34, Inès Varhol <ines.varhol@telecom-paris.fr> wrote:
>
> This commit adds a QTest that verifies each input line of a specific
> EXTI OR gate can influence the output line.
>
> Signed-off-by: Inès Varhol <ines.varhol@telecom-paris.fr>
> ---
>  tests/qtest/stm32l4x5_exti-test.c | 97 +++++++++++++++++++++++++++++++
>  1 file changed, 97 insertions(+)
>
> diff --git a/tests/qtest/stm32l4x5_exti-test.c 
> b/tests/qtest/stm32l4x5_exti-test.c
> index c390077713..276b7adc7a 100644
> --- a/tests/qtest/stm32l4x5_exti-test.c
> +++ b/tests/qtest/stm32l4x5_exti-test.c
> @@ -31,6 +31,11 @@
>
>  #define EXTI0_IRQ 6
>  #define EXTI1_IRQ 7
> +#define EXTI5_IRQ 23
> +#define EXTI6_IRQ 23
> +#define EXTI7_IRQ 23
> +#define EXTI8_IRQ 23
> +#define EXTI9_IRQ 23
>  #define EXTI35_IRQ 1
>
>  static void enable_nvic_irq(unsigned int n)
> @@ -499,6 +504,96 @@ static void test_interrupt(void)
>      g_assert_false(check_nvic_pending(EXTI1_IRQ));
>  }
>
> +static void test_orred_interrupts(void)
> +{
> +    /*
> +     * For lines EXTI5..9 (fanned-in to NVIC irq 23),
> +     * test that rising the line pends interrupt

"raising"

> +     * 23 in NVIC.
> +     */

I feel like you could probably write this code to use a loop
to avoid some of the repetition, but this is only test code,
so it's fine as-is.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]