Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: arm_interrupt: remove redundant test case part #36225

Conversation

ioannisg
Copy link
Member

@ioannisg ioannisg commented Jun 14, 2021

The test case part in test_arm_interrupt, which is
triggering a SysTick IRQ (when SysTick is not used
for system timer implementation), to catch a spurious
interrupt is not really testing what it is designed
for. The reason is that the z_arm_exc_spurious has
be re-designed to be invoked only if the kernel is
built without support for system clock, i.e. with
CONFIG_SYS_CLOCK_EXISTS=n, but this configuration is
not compatible with ZTESTs and is, therefore, never
tested in this test, in any configuration. When the
SysTick is not implemented in the HW, it is not
possible to set the PendSTSET bit, so this is not
possible to execute this part of the test case, anyways.

What we have been catching as an error, here, is the
ASSERT in the sys_clock_isr() weak implementation, but
asserts are verified earlier in this test case, so this
part is really redundant.

Signed-off-by: Ioannis Glaropoulos [email protected]

Fixes #34917
Fixes #35656

@ioannisg ioannisg self-assigned this Jun 14, 2021
@github-actions github-actions bot added the area: Tests Issues related to a particular existing or missing test label Jun 14, 2021
@ioannisg
Copy link
Member Author

@dleach02 this is supposed to fix the reported error in #34917

@ioannisg ioannisg requested a review from galak June 14, 2021 10:36
@ioannisg ioannisg marked this pull request as ready for review June 14, 2021 13:24
@ioannisg ioannisg requested a review from anangl June 18, 2021 09:53
@ioannisg ioannisg added this to the v2.7.0 milestone Jun 18, 2021
The test case part in test_arm_interrupt, which is
triggering a SysTick IRQ (when SysTick is not used
for system timer implementation), to catch a spurious
interrupt is not really testing what it is designed
for. The reason is that the z_arm_exc_spurious has
be re-designed to be invoked only if the kernel is
built without support for system clock, i.e. with
CONFIG_SYS_CLOCK_EXISTS=n, but this configuration is
not compatible with ZTESTs and is, therefore, never
tested in this test, in any configuration. When the
SysTick is not implemented in the HW, it is not
possible to set the PendSTSET bit, so this is not
possible to execute this part of the test case, anyways.

What we have been catching as an error, here, is the
ASSERT in the sys_clock_isr() weak implementation, but
asserts are verified earlier in this test case, so this
part is really redundant.

Signed-off-by: Ioannis Glaropoulos <[email protected]>
@ioannisg ioannisg force-pushed the tests_arch_arm_interrupt_remove_redundant_case branch from 92e3704 to 8cb443c Compare June 23, 2021 19:30
@ioannisg ioannisg merged commit 9adf155 into zephyrproject-rtos:main Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ARM ARM (32-bit) Architecture area: Tests Issues related to a particular existing or missing test
Projects
None yet
3 participants