[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 27/29] tests/qtest: Fix STM32L4x5 SYSCFG irq line 15 state assumpt
From: |
Peter Maydell |
Subject: |
[PULL 27/29] tests/qtest: Fix STM32L4x5 SYSCFG irq line 15 state assumption |
Date: |
Mon, 1 Jul 2024 17:07:27 +0100 |
From: Inès Varhol <ines.varhol@telecom-paris.fr>
The QTest `test_irq_pin_multiplexer` makes the assumption that the
reset state of irq line 15 is low, which is false since STM32L4x5 GPIO
was implemented (the reset state of pin GPIOA15 is high because there's
pull-up and it results in the irq line 15 also being high at reset).
It wasn't triggering an error because `test_interrupt` was mistakenly
"resetting" the line low.
This commit corrects these two mistakes by :
- not setting the line low in `test_interrupt`
- using an irq line in `test_irq_pin_multiplexer` which is low at reset
Signed-off-by: Inès Varhol <ines.varhol@telecom-paris.fr>
Message-id: 20240629104454.366283-1-ines.varhol@telecom-paris.fr
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
tests/qtest/stm32l4x5_syscfg-test.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/qtest/stm32l4x5_syscfg-test.c
b/tests/qtest/stm32l4x5_syscfg-test.c
index 506ca08bc24..1cdf8f05c80 100644
--- a/tests/qtest/stm32l4x5_syscfg-test.c
+++ b/tests/qtest/stm32l4x5_syscfg-test.c
@@ -223,7 +223,7 @@ static void test_interrupt(void)
/* Clean the test */
syscfg_writel(SYSCFG_EXTICR1, 0x00000000);
syscfg_set_irq(0, 0);
- syscfg_set_irq(15, 0);
+ /* irq 15 is high at reset because GPIOA15 is high at reset */
syscfg_set_irq(17, 0);
}
@@ -237,21 +237,21 @@ static void test_irq_pin_multiplexer(void)
syscfg_set_irq(0, 1);
- /* Check that irq 0 was set and irq 15 wasn't */
+ /* Check that irq 0 was set and irq 2 wasn't */
g_assert_true(get_irq(0));
- g_assert_false(get_irq(15));
+ g_assert_false(get_irq(2));
/* Clean the test */
syscfg_set_irq(0, 0);
- syscfg_set_irq(15, 1);
+ syscfg_set_irq(2, 1);
- /* Check that irq 15 was set and irq 0 wasn't */
- g_assert_true(get_irq(15));
+ /* Check that irq 2 was set and irq 0 wasn't */
+ g_assert_true(get_irq(2));
g_assert_false(get_irq(0));
/* Clean the test */
- syscfg_set_irq(15, 0);
+ syscfg_set_irq(2, 0);
}
static void test_irq_gpio_multiplexer(void)
--
2.34.1
- [PULL 19/29] target/arm: Delete dead code from disas_simd_indexed, (continued)
- [PULL 19/29] target/arm: Delete dead code from disas_simd_indexed, Peter Maydell, 2024/07/01
- [PULL 24/29] hw/misc/zynq_slcr: Add boot-mode property, Peter Maydell, 2024/07/01
- [PULL 25/29] hw/arm/xilinx_zynq: Add boot-mode property, Peter Maydell, 2024/07/01
- [PULL 28/29] hw/misc: In STM32L4x5 EXTI, correct configurable interrupts, Peter Maydell, 2024/07/01
- [PULL 12/29] target/arm: Convert SUDOT, USDOT to decodetree, Peter Maydell, 2024/07/01
- [PULL 13/29] target/arm: Convert BFDOT to decodetree, Peter Maydell, 2024/07/01
- [PULL 17/29] target/arm: Convert FCADD to decodetree, Peter Maydell, 2024/07/01
- [PULL 15/29] target/arm: Convert BFMMLA, SMMLA, UMMLA, USMMLA to decodetree, Peter Maydell, 2024/07/01
- [PULL 23/29] MAINTAINERS: Update my family name, Peter Maydell, 2024/07/01
- [PULL 20/29] target/arm: Fix indentation, Peter Maydell, 2024/07/01
- [PULL 27/29] tests/qtest: Fix STM32L4x5 SYSCFG irq line 15 state assumption,
Peter Maydell <=
- [PULL 29/29] tests/qtest: Ensure STM32L4x5 EXTI state is correct at the end of QTests, Peter Maydell, 2024/07/01
- [PULL 18/29] target/arm: Convert FCMLA to decodetree, Peter Maydell, 2024/07/01
- Re: [PULL 00/29] target-arm queue, Richard Henderson, 2024/07/01