tests: add the case for ARC in yaml

* add the case for ARC in yaml after dynamic and direct irq are
  supported
* fix the bug that index in sw_isr_table should have a offset of
  CONFIG_GEN_IRQ_START_VECTOR

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
This commit is contained in:
Wayne Ren 2019-09-26 21:02:30 +08:00 committed by Andrew Boie
commit 482b993b88
3 changed files with 10 additions and 3 deletions

View file

@ -4,3 +4,9 @@ tests:
stm32_min_dev_blue usb_kw24d512 v2m_beetle
filter: CONFIG_GEN_ISR_TABLES and CONFIG_ARMV7_M_ARMV8_M_MAINLINE
tags: interrupt isr_table
arch.interrupt.arc:
arch_whitelist: arc
filter: CONFIG_RGF_NUM_BANKS > 1
extra_configs:
- CONFIG_ARC_FIRQ_STACK=y
- CONFIG_TEST_HW_STACK_PROTECTION=n

View file

@ -32,7 +32,7 @@ static void do_isr_dynamic(void)
int i;
void *argval;
for (i = CONFIG_GEN_IRQ_START_VECTOR; i < CONFIG_NUM_IRQS; i++) {
for (i = 0; i < (CONFIG_NUM_IRQS - CONFIG_GEN_IRQ_START_VECTOR); i++) {
if (_sw_isr_table[i].isr == z_irq_spurious) {
break;
}
@ -42,7 +42,8 @@ static void do_isr_dynamic(void)
"could not find slot for dynamic isr");
argval = &i;
z_arch_irq_connect_dynamic(i, 0, dyn_isr, argval, 0);
z_arch_irq_connect_dynamic(i + CONFIG_GEN_IRQ_START_VECTOR, 0, dyn_isr,
argval, 0);
zassert_true(_sw_isr_table[i].isr == dyn_isr &&
_sw_isr_table[i].arg == argval,

View file

@ -1,6 +1,6 @@
tests:
arch.interrupt:
arch_exclude: nios2 riscv32 arc
arch_exclude: nios2 riscv32
platform_exclude: qemu_x86 qemu_x86_coverage qemu_x86_64
tags: interrupt