fix(efuse): Fix test where size of field was obtained incorrectly

When the eFuse field consists of single descriptor, its size can be
taken from struct member 'bit_count'. However, when the field consists of
multiple descriptors, the size should be obtained via esp_efuse_get_field_size()
This commit is contained in:
Konstantin Kondrashov
2025-11-20 15:49:26 +02:00
committed by Sudeep Mohanty
parent 997c8f50b5
commit 3f5377a9b1
3 changed files with 3 additions and 7 deletions
@@ -3,10 +3,6 @@
components/efuse/test_apps:
enable:
- if: (INCLUDE_DEFAULT == 1 and SOC_EFUSE_SUPPORTED == 1) or IDF_TARGET == "linux")
disable:
- if: IDF_TARGET == "esp32p4"
temporary: true
reason: p4 rev3 migration # TODO: IDF-14403
disable_test:
- if: IDF_TARGET in ["esp32s2", "esp32s3"]
reason: eFuse for S2 and S3 is similar to the C3 chip, so we only test for C3.
+2 -2
View File
@@ -1,3 +1,3 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-H21 | ESP32-H4 | ESP32-S2 | ESP32-S3 | Linux |
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | --------- | -------- | -------- | -------- | ----- |
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-H21 | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 | Linux |
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | --------- | -------- | -------- | -------- | -------- | ----- |
@@ -127,7 +127,7 @@ static esp_err_t s_check_key(esp_efuse_block_t num_key, void* wr_key)
TEST_ASSERT_EQUAL(purpose, esp_efuse_get_key_purpose(num_key));
esp_efuse_purpose_t purpose2 = 0;
const esp_efuse_desc_t** key_purpose = esp_efuse_get_purpose_field(num_key);
TEST_ESP_OK(esp_efuse_read_field_blob(key_purpose, &purpose2, key_purpose[0]->bit_count));
TEST_ESP_OK(esp_efuse_read_field_blob(key_purpose, &purpose2, esp_efuse_get_field_size(key_purpose)));
TEST_ASSERT_EQUAL(purpose, purpose2);
TEST_ASSERT_TRUE(esp_efuse_get_keypurpose_dis_write(num_key));
return ESP_OK;