tests: arch: arm: arm_interrupt: remove side effect in assertion
Remove a side effect in an assertion check of the expected reason after spurious interrupt handling. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
parent
6380c24626
commit
ac6b4a00a9
1 changed files with 4 additions and 3 deletions
|
@ -54,7 +54,7 @@ void test_arm_interrupt(void)
|
||||||
{
|
{
|
||||||
/* Determine an NVIC IRQ line that is not currently in use. */
|
/* Determine an NVIC IRQ line that is not currently in use. */
|
||||||
int i;
|
int i;
|
||||||
int init_flag, post_flag;
|
int init_flag, post_flag, reason;
|
||||||
|
|
||||||
init_flag = test_flag;
|
init_flag = test_flag;
|
||||||
|
|
||||||
|
@ -101,8 +101,9 @@ void test_arm_interrupt(void)
|
||||||
/* Verify that the spurious ISR has led to the fault and the
|
/* Verify that the spurious ISR has led to the fault and the
|
||||||
* expected reason variable is reset.
|
* expected reason variable is reset.
|
||||||
*/
|
*/
|
||||||
zassert_true(expected_reason == -1,
|
reason = expected_reason;
|
||||||
"expected_reason has not been reset\n");
|
zassert_equal(reason, -1,
|
||||||
|
"expected_reason has not been reset (%d)\n", reason);
|
||||||
NVIC_DisableIRQ(i);
|
NVIC_DisableIRQ(i);
|
||||||
|
|
||||||
arch_irq_connect_dynamic(i, 0 /* highest priority */,
|
arch_irq_connect_dynamic(i, 0 /* highest priority */,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue