aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/stm32l4x5_syscfg-test.c
diff options
context:
space:
mode:
authorInès Varhol <ines.varhol@telecom-paris.fr>2024-06-29 13:07:09 +0200
committerPeter Maydell <peter.maydell@linaro.org>2024-07-01 15:40:54 +0100
commit58c782de557beb496bfb4c5ade721bbbd2480c72 (patch)
tree1be29ebe49e3c6c47b36a91ecd241f4e4d469ea7 /tests/qtest/stm32l4x5_syscfg-test.c
parent9c4887e3b68a362f2f5a4e86daab98a51b3b769e (diff)
downloadqemu-58c782de557beb496bfb4c5ade721bbbd2480c72.zip
qemu-58c782de557beb496bfb4c5ade721bbbd2480c72.tar.gz
qemu-58c782de557beb496bfb4c5ade721bbbd2480c72.tar.bz2
tests/qtest: Ensure STM32L4x5 EXTI state is correct at the end of QTests
EXTI's new field `irq_levels` tracks irq levels between tests when using `global_qtest`. This happens in `stm32l4x5_exti-test.c`, `stm32l4x5_syscfg-test.c` and `stm32l4x5_gpio-test.c` (`dm163.c` doesn't use `global_qtest`). To ensure that `irq_levels` has the same value before and after each QTest, this commit toggles back the irq lines that were changed at the end of each problematic test. Most QTests were already doing this. Signed-off-by: Inès Varhol <ines.varhol@telecom-paris.fr> Message-id: 20240629110800.539969-3-ines.varhol@telecom-paris.fr Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/qtest/stm32l4x5_syscfg-test.c')
-rw-r--r--tests/qtest/stm32l4x5_syscfg-test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/qtest/stm32l4x5_syscfg-test.c b/tests/qtest/stm32l4x5_syscfg-test.c
index 1cdf8f0..258417c 100644
--- a/tests/qtest/stm32l4x5_syscfg-test.c
+++ b/tests/qtest/stm32l4x5_syscfg-test.c
@@ -221,10 +221,10 @@ static void test_interrupt(void)
g_assert_true(get_irq(1));
/* Clean the test */
- syscfg_writel(SYSCFG_EXTICR1, 0x00000000);
syscfg_set_irq(0, 0);
/* irq 15 is high at reset because GPIOA15 is high at reset */
syscfg_set_irq(17, 0);
+ syscfg_writel(SYSCFG_EXTICR1, 0x00000000);
}
static void test_irq_pin_multiplexer(void)