zephyr/tests/arch
Carlo Caione 7a043d6f19 tests: arm_runtime_nmi: Add barriers
Testing NMI on emulated QEMU platforms brings some interesting and wrong
results like:

  START - test_arm_runtime_nmi
  Trigger NMI in 10s: 0 s
  Trigger NMI in 10s: 1 s
  Trigger NMI in 10s: 2 s
  Trigger NMI in 10s: 3 s
  Trigger NMI in 10s: 4 s
  Trigger NMI in 10s: 5 s
  Trigger NMI in 10s: 6 s
  Trigger NMI in 10s: 7 s
  Trigger NMI in 10s: 8 s
  Trigger NMI in 10s: 9 s
  NMI triggered (test_handler_isr)!
      Assertion failed at ... arm_runtime_nmi_fn_test_arm_runtime_nmi:
        (nmi_triggered is false)
  Isr not triggered!

where the NMI handler is correctly called, see `NMI triggered`, but the
assert still fails on `nmi_triggered` being false.

This is due to a limitation in the emulation but also in the test not
being strictly architecturally compliant (you need a DSB;ISB sequence
after writing to SCB).

Add the proper barriers after writing to `SCB->ISCR` to make it
compliant and making it pass on QEMU as well.

Also reduce the timing to 2 sec.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-06-05 20:20:54 -04:00
..
arc/arc_dsp_sharing DSP: add dsp unit test 2022-12-19 11:56:55 +01:00
arm tests: arm_runtime_nmi: Add barriers 2023-06-05 20:20:54 -04:00
arm64 samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
common samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
riscv/fpu_sharing samples, tests: convert string-based twister lists to YAML lists 2023-05-10 09:52:37 +02:00
x86 tests: improve filtering and use integration_platforms 2023-05-24 07:50:50 -04:00