From 85c2daee5bb5d67864283b602b94eee069343d51 Mon Sep 17 00:00:00 2001 From: Guillaume Souchere Date: Wed, 13 Mar 2024 12:34:33 +0100 Subject: [PATCH] test(esp_intr_dump): Enable test for esp32p4 Added back intr_dump test on esp32p4 target. Added esp32p4.txt expected output file containing the list of interrupts. --- components/esp_hw_support/intr_alloc.c | 1 + tools/test_apps/.build-test-rules.yml | 6 -- .../esp_intr_dump/expected_output/esp32p4.txt | 69 +++++++++++++++++++ .../esp_intr_dump/pytest_esp_intr_dump.py | 2 +- 4 files changed, 71 insertions(+), 7 deletions(-) create mode 100644 tools/test_apps/system/esp_intr_dump/expected_output/esp32p4.txt diff --git a/components/esp_hw_support/intr_alloc.c b/components/esp_hw_support/intr_alloc.c index da61b3a1f2..dbfb0995a8 100644 --- a/components/esp_hw_support/intr_alloc.c +++ b/components/esp_hw_support/intr_alloc.c @@ -966,6 +966,7 @@ esp_err_t esp_intr_dump(FILE *stream) if (vd == NULL) { fprintf(stream, " * * "); } else { + // # TODO: IDF-9512 // esp_cpu_intr_get_* functions need to be extended with cpu parameter. // Showing info for the current cpu only, in the meantime. if (esp_cpu_get_core_id() == cpu) { diff --git a/tools/test_apps/.build-test-rules.yml b/tools/test_apps/.build-test-rules.yml index 973e0f147b..9e725eb748 100644 --- a/tools/test_apps/.build-test-rules.yml +++ b/tools/test_apps/.build-test-rules.yml @@ -157,12 +157,6 @@ tools/test_apps/system/eh_frame: temporary: true reason: the other targets are not tested yet -tools/test_apps/system/esp_intr_dump: - disable_test: - - if: IDF_TARGET == "esp32p4" - temporary: true - reason: test not pass, should be re-enable # TODO: IDF-8991 - tools/test_apps/system/g0_components: enable: - if: INCLUDE_DEFAULT == 1 or IDF_TARGET in ["esp32p4", "esp32c5"] # preview targets diff --git a/tools/test_apps/system/esp_intr_dump/expected_output/esp32p4.txt b/tools/test_apps/system/esp_intr_dump/expected_output/esp32p4.txt new file mode 100644 index 0000000000..3d08400cfb --- /dev/null +++ b/tools/test_apps/system/esp_intr_dump/expected_output/esp32p4.txt @@ -0,0 +1,69 @@ +CPU 0 interrupt status: + Int Level Type Status + 0 1 Level Used: CPU_INT_FROM_CPU_0 + 1 1 Level Used: SYSTIMER_TARGET0 + 2 1 Level Used: TG0_WDT_LEVEL + 3 1 Level Used: UART0 + 4 * * Free + 5 * * Free + 6 * * Reserved + 7 * * Free + 8 * * Free + 9 * * Free + 10 * * Free + 11 * * Free + 12 * * Free + 13 * * Free + 14 * * Free + 15 * * Free + 16 * * Free + 17 * * Free + 18 * * Free + 19 * * Free + 20 * * Free + 21 * * Free + 22 * * Free + 23 * * Free + 24 * * Free + 25 * * Free + 26 * * Free + 27 * * Free + 28 * * Free + 29 * * Free + 30 * * Free + 31 * * Free +CPU 1 interrupt status: + Int Level Type Status + 0 ? ? Used: CPU_INT_FROM_CPU_1 + 1 ? ? Used: SYSTIMER_TARGET1 + 2 * * Free + 3 * * Free + 4 * * Free + 5 * * Free + 6 * * Reserved + 7 * * Free + 8 * * Free + 9 * * Free + 10 * * Free + 11 * * Free + 12 * * Free + 13 * * Free + 14 * * Free + 15 * * Free + 16 * * Free + 17 * * Free + 18 * * Free + 19 * * Free + 20 * * Free + 21 * * Free + 22 * * Free + 23 * * Free + 24 * * Free + 25 * * Free + 26 * * Free + 27 * * Free + 28 * * Free + 29 * * Free + 30 * * Free + 31 * * Free +Interrupts available for general use: 56 diff --git a/tools/test_apps/system/esp_intr_dump/pytest_esp_intr_dump.py b/tools/test_apps/system/esp_intr_dump/pytest_esp_intr_dump.py index bc4c16c35e..b4cfd0acf4 100644 --- a/tools/test_apps/system/esp_intr_dump/pytest_esp_intr_dump.py +++ b/tools/test_apps/system/esp_intr_dump/pytest_esp_intr_dump.py @@ -46,7 +46,7 @@ def test_esp_intr_dump_shared(dut: Dut) -> None: dut.expect_exact(PROMPT) -@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='esp32p4 support TBD') # TODO: IDF-8991 +# TODO: IDF-9512, Update the expected output of dual core RISC-V chips when the issue is resolved @pytest.mark.supported_targets @pytest.mark.generic def test_esp_intr_dump_expected_output(dut: Dut) -> None: