mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
ci(esp_tee): Remove incorrect error checks for TEE flash protection tests
- Also fixed coverity issue from TEE secure storage
This commit is contained in:
@@ -48,12 +48,6 @@ __attribute__((unused)) static const uint32_t mmu_op_fail_seq[8] = {[0 ... 7] =
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#if SOC_TEE_FLASH_OP_FAIL_FAULT
|
||||
#define CHECK_FLASH_OP_FAIL(err) TEST_ESP_ERR(ESP_FAIL, err)
|
||||
#else
|
||||
#define CHECK_FLASH_OP_FAIL(err) do { (void)(err); esp_restart(); } while (0)
|
||||
#endif
|
||||
|
||||
static const char *TAG = "test_esp_tee_flash_prot";
|
||||
|
||||
static void set_boot_count_in_nvs(uint8_t boot_count)
|
||||
@@ -146,8 +140,7 @@ static void test_esp_partition_api_r(const esp_partition_t *part)
|
||||
TEST_ASSERT_NOT_NULL(part);
|
||||
uint8_t buf_r[128];
|
||||
memset(buf_r, 0x00, sizeof(buf_r));
|
||||
esp_err_t err = esp_partition_read(part, 0x00, buf_r, sizeof(buf_r));
|
||||
CHECK_FLASH_OP_FAIL(err);
|
||||
esp_partition_read(part, 0x00, buf_r, sizeof(buf_r));
|
||||
}
|
||||
|
||||
static void test_esp_partition_api_w(const esp_partition_t *part)
|
||||
@@ -155,15 +148,13 @@ static void test_esp_partition_api_w(const esp_partition_t *part)
|
||||
TEST_ASSERT_NOT_NULL(part);
|
||||
uint8_t buf_w[128];
|
||||
memset(buf_w, 0xA5, sizeof(buf_w));
|
||||
esp_err_t err = esp_partition_write(part, 0x00, buf_w, sizeof(buf_w));
|
||||
CHECK_FLASH_OP_FAIL(err);
|
||||
esp_partition_write(part, 0x00, buf_w, sizeof(buf_w));
|
||||
}
|
||||
|
||||
static void test_esp_partition_api_e(const esp_partition_t *part)
|
||||
{
|
||||
TEST_ASSERT_NOT_NULL(part);
|
||||
esp_err_t err = esp_partition_erase_range(part, 0x00, SPI_FLASH_SEC_SIZE);
|
||||
CHECK_FLASH_OP_FAIL(err);
|
||||
esp_partition_erase_range(part, 0x00, SPI_FLASH_SEC_SIZE);
|
||||
}
|
||||
|
||||
static void test_esp_partition_api(void)
|
||||
@@ -267,22 +258,19 @@ static void test_esp_flash_api_r(uint32_t paddr)
|
||||
{
|
||||
uint8_t buf_r[128];
|
||||
memset(buf_r, 0x00, sizeof(buf_r));
|
||||
esp_err_t err = esp_flash_read(NULL, buf_r, paddr, sizeof(buf_r));
|
||||
CHECK_FLASH_OP_FAIL(err);
|
||||
esp_flash_read(NULL, buf_r, paddr, sizeof(buf_r));
|
||||
}
|
||||
|
||||
static void test_esp_flash_api_w(uint32_t paddr)
|
||||
{
|
||||
uint8_t buf_w[128];
|
||||
memset(buf_w, 0xA5, sizeof(buf_w));
|
||||
esp_err_t err = esp_flash_write(NULL, buf_w, paddr, sizeof(buf_w));
|
||||
CHECK_FLASH_OP_FAIL(err);
|
||||
esp_flash_write(NULL, buf_w, paddr, sizeof(buf_w));
|
||||
}
|
||||
|
||||
static void test_esp_flash_api_e(uint32_t paddr)
|
||||
{
|
||||
esp_err_t err = esp_flash_erase_region(NULL, paddr, SPI_FLASH_SEC_SIZE);
|
||||
CHECK_FLASH_OP_FAIL(err);
|
||||
esp_flash_erase_region(NULL, paddr, SPI_FLASH_SEC_SIZE);
|
||||
}
|
||||
|
||||
static void test_esp_flash_api(void)
|
||||
|
||||
Reference in New Issue
Block a user