Commit Graph

6 Commits

Author SHA1 Message Date
Enjia Mai 70f8f3302b tests: interrupt: add test cases of offloading job from isr
Add 3 test cases to test offload job from isr, include:

1. test_isr_offload_job_multiple()
Validate the offloaded work executes immediately or not depends on its
priority, and it offloads to different k_work.

2. test_isr_offload_job_identi()
Validate the offloaded work executes immediately or not depends on its
priority, and it offloads to the identical k_work.

3. test_isr_offload_job()
Use dynamic interrupt instead of irq_offload() to verify the offloaded
work.

Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
2021-05-07 18:24:32 -04:00
Enjia Mai b488b396bb tests: improve test cases for interrupt testing
Improve dynamic interrupt test cases of interrupt for platform such as
x86, x86_64, native_posix, this improve code coverage of it.

Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
2021-03-04 14:54:17 -05:00
Stephanos Ioannidis 66a53dd5cd tests: kernel: interrupt: Reorganise tests
This commit re-organises the kernel interrupt tests for consistency.

In addition, it removes any references to the `irq_offload` feature,
which is no longer used by this test.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-03-27 13:24:35 -04:00
Andrew Boie 921c628f1e tests: interrupt: use one CPU only
The test tries to mask CPU interrupts and then enable a k_timer,
passing if it didn't fire.

This is totally defeated if the interrupt just fires on another
CPU that doesn't have interrupts masked.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-03-10 10:14:55 -04:00
Andy Ross b5908fd89d tests/kernel/interrupt: Add a simple dynamic interrupt test
Platforms which use the GEN_SW_ISR mechanism for interrupt handling
can make use of a really simple whitebox trick for verifying that it
worked (i.e. that the pointer and argument get placed in the table
correctly).

Easy and simple way to get some coverage for dynamic IRQs, which is
currently entirely missing.  Long term we'll want to replace this with
a test that uses the API directly and chooses an arch-specific vector
to set, and triggers it using arch-specific code, but that's quite a
bit more effort and for now we need to land patches to
z_irq_connect_dynamic() which show test coverage.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-08-22 17:53:51 -04:00
Ajay Kishore 2a103ea674 tests: add tests to validate interrupt nesting feature
This test is intended to verify the interrupt nesting.
Interrupt nesting feature allows an ISR to be preempted
in mid-execution if a higher priority interrupt is signaled.
The lower priority ISR resumes execution once the higher
priority ISR has completed its processing.

Signed-off-by: Ajay Kishore <ajay.kishore@intel.com>
2018-10-10 19:59:47 -04:00