From e0a468f9e8ef859138dee2b9c4decb013935cfae Mon Sep 17 00:00:00 2001 From: Tim Trippel Date: Wed, 21 Aug 2024 12:08:46 -0700 Subject: [PATCH] [rom_e2e] remove flaky flash ECC error test cases This removes 2 flash ECC error test cases that were brittle since the test was self-corrupting itself (by design) in locations where test code could be executing. Signed-off-by: Tim Trippel --- .../rom/e2e/boot_policy_flash_ecc_error/BUILD | 13 ++++--------- .../flash_ecc_error_test.c | 2 -- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/sw/device/silicon_creator/rom/e2e/boot_policy_flash_ecc_error/BUILD b/sw/device/silicon_creator/rom/e2e/boot_policy_flash_ecc_error/BUILD index 2fa1cd3f86986..8d9a03bc2761e 100644 --- a/sw/device/silicon_creator/rom/e2e/boot_policy_flash_ecc_error/BUILD +++ b/sw/device/silicon_creator/rom/e2e/boot_policy_flash_ecc_error/BUILD @@ -22,7 +22,6 @@ load( ) load( "//rules/opentitan:defs.bzl", - "cw310_params", "fpga_params", "opentitan_binary", "opentitan_test", @@ -87,18 +86,14 @@ FLASH_ECC_ERROR_CAUSES = [ "cause": "manifest_extension_spx_signature", "id": 12, }, + # We only test corrupting the first flash word since this is likely not in + # the range of test code that needs to execute successfully to drive the + # test, but still exercising the scenario of a flash corruption happening + # in the code region. { "cause": "code_first_word", "id": 13, }, - { - "cause": "code_middle_word", - "id": 14, - }, - { - "cause": "code_last_word", - "id": 15, - }, ] BOOT_POLICY_FLASH_ECC_ERROR_TESTS = [ diff --git a/sw/device/silicon_creator/rom/e2e/boot_policy_flash_ecc_error/flash_ecc_error_test.c b/sw/device/silicon_creator/rom/e2e/boot_policy_flash_ecc_error/flash_ecc_error_test.c index 87032bcb40ffd..9d61bee9da04e 100644 --- a/sw/device/silicon_creator/rom/e2e/boot_policy_flash_ecc_error/flash_ecc_error_test.c +++ b/sw/device/silicon_creator/rom/e2e/boot_policy_flash_ecc_error/flash_ecc_error_test.c @@ -186,8 +186,6 @@ static const corruption_word_t kWords2Corrupt[] = { // Code corruption offsets. {.offset = kCodeFirstWordOffset, .description = "code_first_word"}, - {.offset = kCodeMiddleWordOffset, .description = "code_middle_word"}, - {.offset = kCodeLastWordOffset, .description = "code_last_word"}, }; static void init_peripherals(void) {