2020-05-04 00:20:01 -04:00
|
|
|
#!/usr/bin/env python
|
2020-07-29 06:24:39 -04:00
|
|
|
import sys
|
2021-01-25 21:49:01 -05:00
|
|
|
|
2020-05-22 08:21:05 -04:00
|
|
|
import panic_tests as test
|
|
|
|
from test_panic_util.test_panic_util import panic_test, run_all
|
2020-05-04 00:20:01 -04:00
|
|
|
|
|
|
|
|
2020-05-22 08:21:05 -04:00
|
|
|
# test_task_wdt
|
2020-12-03 04:53:27 -05:00
|
|
|
@panic_test(target=['ESP32', 'ESP32S2'])
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_panic_task_wdt(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.task_wdt_inner(env, 'panic')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_task_wdt_uart_elf_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.task_wdt_inner(env, 'coredump_uart_elf_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_task_wdt_uart_bin_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.task_wdt_inner(env, 'coredump_uart_bin_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
2020-05-04 00:20:01 -04:00
|
|
|
|
2020-05-22 08:21:05 -04:00
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_task_wdt_flash_elf_sha(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.task_wdt_inner(env, 'coredump_flash_elf_sha')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_task_wdt_flash_bin_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.task_wdt_inner(env, 'coredump_flash_bin_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
2020-09-30 16:41:14 -04:00
|
|
|
@panic_test()
|
|
|
|
def test_gdbstub_task_wdt(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.task_wdt_inner(env, 'gdbstub')
|
2020-09-30 16:41:14 -04:00
|
|
|
|
|
|
|
|
2020-05-22 08:21:05 -04:00
|
|
|
# test_int_wdt
|
2020-05-04 00:20:01 -04:00
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_panic_int_wdt(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.int_wdt_inner(env, 'panic')
|
2020-05-04 00:20:01 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_int_wdt_uart_elf_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.int_wdt_inner(env, 'coredump_uart_elf_crc')
|
2020-05-04 00:20:01 -04:00
|
|
|
|
|
|
|
|
2020-05-22 08:21:05 -04:00
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_int_wdt_uart_bin_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.int_wdt_inner(env, 'coredump_uart_bin_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_int_wdt_flash_elf_sha(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.int_wdt_inner(env, 'coredump_flash_elf_sha')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_int_wdt_flash_bin_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.int_wdt_inner(env, 'coredump_flash_bin_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
2020-09-30 16:41:14 -04:00
|
|
|
@panic_test()
|
|
|
|
def test_gdbstub_int_wdt(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.int_wdt_inner(env, 'gdbstub')
|
2020-09-30 16:41:14 -04:00
|
|
|
|
|
|
|
|
2020-05-22 08:21:05 -04:00
|
|
|
# test_int_wdt_cache_disabled
|
|
|
|
|
2020-05-04 00:20:01 -04:00
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_panic_int_wdt_cache_disabled(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.int_wdt_cache_disabled_inner(env, 'panic')
|
2020-05-04 00:20:01 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_int_wdt_cache_disabled_uart_elf_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.int_wdt_cache_disabled_inner(env, 'coredump_uart_elf_crc')
|
2020-05-04 00:20:01 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_int_wdt_cache_disabled_uart_bin_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.int_wdt_cache_disabled_inner(env, 'coredump_uart_bin_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_int_wdt_cache_disabled_flash_elf_sha(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.int_wdt_cache_disabled_inner(env, 'coredump_flash_elf_sha')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_int_wdt_cache_disabled_flash_bin_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.int_wdt_cache_disabled_inner(env, 'coredump_flash_bin_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
2020-09-30 16:41:14 -04:00
|
|
|
@panic_test()
|
|
|
|
def test_gdbstub_int_wdt_cache_disabled(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.int_wdt_cache_disabled_inner(env, 'gdbstub')
|
2020-09-30 16:41:14 -04:00
|
|
|
|
|
|
|
|
2020-05-22 08:21:05 -04:00
|
|
|
# test_cache_error
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_panic_cache_error(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.cache_error_inner(env, 'panic')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_cache_error_uart_elf_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.cache_error_inner(env, 'coredump_uart_elf_crc')
|
2020-05-04 00:20:01 -04:00
|
|
|
|
|
|
|
|
2020-05-22 08:21:05 -04:00
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_cache_error_uart_bin_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.cache_error_inner(env, 'coredump_uart_bin_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_cache_error_flash_elf_sha(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.cache_error_inner(env, 'coredump_flash_elf_sha')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_cache_error_flash_bin_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.cache_error_inner(env, 'coredump_flash_bin_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
2020-09-30 16:41:14 -04:00
|
|
|
@panic_test()
|
|
|
|
def test_gdbstub_cache_error(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.cache_error_inner(env, 'gdbstub')
|
2020-09-30 16:41:14 -04:00
|
|
|
|
|
|
|
|
2020-05-22 08:21:05 -04:00
|
|
|
# test_stack_overflow
|
|
|
|
|
2020-12-03 04:53:27 -05:00
|
|
|
@panic_test(target=['ESP32', 'ESP32S2'])
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_panic_stack_overflow(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.stack_overflow_inner(env, 'panic')
|
2020-05-04 00:20:01 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_stack_overflow_uart_elf_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.stack_overflow_inner(env, 'coredump_uart_elf_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_stack_overflow_uart_bin_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.stack_overflow_inner(env, 'coredump_uart_bin_crc')
|
2020-05-04 00:20:01 -04:00
|
|
|
|
|
|
|
|
2020-05-22 08:21:05 -04:00
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_stack_overflow_flash_elf_sha(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.stack_overflow_inner(env, 'coredump_flash_elf_sha')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_stack_overflow_flash_bin_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.stack_overflow_inner(env, 'coredump_flash_bin_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
2020-09-30 16:41:14 -04:00
|
|
|
@panic_test()
|
|
|
|
def test_gdbstub_stack_overflow(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.stack_overflow_inner(env, 'gdbstub')
|
2020-09-30 16:41:14 -04:00
|
|
|
|
|
|
|
|
2020-05-22 08:21:05 -04:00
|
|
|
# test_instr_fetch_prohibited
|
|
|
|
|
2020-12-03 04:53:27 -05:00
|
|
|
@panic_test(target=['ESP32', 'ESP32S2'])
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_panic_instr_fetch_prohibited(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.instr_fetch_prohibited_inner(env, 'panic')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_instr_fetch_prohibited_uart_elf_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.instr_fetch_prohibited_inner(env, 'coredump_uart_elf_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_instr_fetch_prohibited_uart_bin_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.instr_fetch_prohibited_inner(env, 'coredump_uart_bin_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_instr_fetch_prohibited_flash_elf_sha(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.instr_fetch_prohibited_inner(env, 'coredump_flash_elf_sha')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_instr_fetch_prohibited_flash_bin_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.instr_fetch_prohibited_inner(env, 'coredump_flash_bin_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
2020-09-30 16:41:14 -04:00
|
|
|
@panic_test()
|
|
|
|
def test_gdbstub_instr_fetch_prohibited(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.instr_fetch_prohibited_inner(env, 'gdbstub')
|
2020-09-30 16:41:14 -04:00
|
|
|
|
|
|
|
|
2020-05-22 08:21:05 -04:00
|
|
|
# test_illegal_instruction
|
|
|
|
|
2020-12-03 04:53:27 -05:00
|
|
|
@panic_test(target=['ESP32', 'ESP32S2'])
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_panic_illegal_instruction(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.illegal_instruction_inner(env, 'panic')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_illegal_instruction_uart_elf_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.illegal_instruction_inner(env, 'coredump_uart_elf_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_illegal_instruction_uart_bin_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.illegal_instruction_inner(env, 'coredump_uart_bin_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_illegal_instruction_flash_elf_sha(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.illegal_instruction_inner(env, 'coredump_flash_elf_sha')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_illegal_instruction_flash_bin_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.illegal_instruction_inner(env, 'coredump_flash_bin_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
2020-09-30 16:41:14 -04:00
|
|
|
@panic_test()
|
|
|
|
def test_gdbstub_illegal_instruction(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.illegal_instruction_inner(env, 'gdbstub')
|
2020-09-30 16:41:14 -04:00
|
|
|
|
|
|
|
|
2020-05-22 08:21:05 -04:00
|
|
|
# test_storeprohibited
|
|
|
|
|
2020-12-03 04:53:27 -05:00
|
|
|
@panic_test(target=['ESP32', 'ESP32S2'])
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_panic_storeprohibited(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.storeprohibited_inner(env, 'panic')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_storeprohibited_uart_elf_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.storeprohibited_inner(env, 'coredump_uart_elf_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_storeprohibited_uart_bin_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.storeprohibited_inner(env, 'coredump_uart_bin_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_storeprohibited_flash_elf_sha(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.storeprohibited_inner(env, 'coredump_flash_elf_sha')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_storeprohibited_flash_bin_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.storeprohibited_inner(env, 'coredump_flash_bin_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
2020-09-30 16:41:14 -04:00
|
|
|
@panic_test()
|
|
|
|
def test_gdbstub_storeprohibited(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.storeprohibited_inner(env, 'gdbstub')
|
2020-09-30 16:41:14 -04:00
|
|
|
|
|
|
|
|
2020-05-22 08:21:05 -04:00
|
|
|
# test_abort
|
|
|
|
|
2020-12-03 04:53:27 -05:00
|
|
|
@panic_test(target=['ESP32', 'ESP32S2'])
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_panic_abort(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.abort_inner(env, 'panic')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
2021-06-28 08:18:43 -04:00
|
|
|
@panic_test(target=['ESP32'])
|
|
|
|
def test_panic_abort_cache_disabled(env, _extra_data):
|
|
|
|
test.abort_cached_disabled_inner(env, 'panic')
|
|
|
|
|
|
|
|
|
2020-05-22 08:21:05 -04:00
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_abort_uart_elf_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.abort_inner(env, 'coredump_uart_elf_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_abort_uart_bin_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.abort_inner(env, 'coredump_uart_bin_crc')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_abort_flash_elf_sha(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.abort_inner(env, 'coredump_flash_elf_sha')
|
2020-05-22 08:21:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
@panic_test()
|
2020-09-30 16:41:14 -04:00
|
|
|
def test_coredump_abort_flash_bin_crc(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.abort_inner(env, 'coredump_flash_bin_crc')
|
2020-05-29 16:33:44 -04:00
|
|
|
|
|
|
|
|
2020-09-30 16:41:14 -04:00
|
|
|
@panic_test()
|
|
|
|
def test_gdbstub_abort(env, _extra_data):
|
2021-01-25 21:49:01 -05:00
|
|
|
test.abort_inner(env, 'gdbstub')
|
2020-09-30 16:41:14 -04:00
|
|
|
|
|
|
|
|
2021-06-28 08:18:43 -04:00
|
|
|
# test_assert
|
|
|
|
|
|
|
|
@panic_test(target=['ESP32', 'ESP32S2'])
|
|
|
|
def test_panic_assert(env, _extra_data):
|
|
|
|
test.assert_inner(env, 'panic')
|
|
|
|
|
|
|
|
|
|
|
|
@panic_test(target=['ESP32'])
|
|
|
|
def test_panic_assert_cache_disabled(env, _extra_data):
|
|
|
|
test.assert_cached_disabled_inner(env, 'panic')
|
|
|
|
|
|
|
|
|
2020-05-04 00:20:01 -04:00
|
|
|
if __name__ == '__main__':
|
2020-07-29 06:24:39 -04:00
|
|
|
run_all(__file__, sys.argv[1:])
|