Skip to content

Commit 02da653

Browse files
committed
Merge branch 'feat/adding_test_case_anti_rollback_and_flash_encryption' into 'master'
feat(ota): Added test for checking flash encryption and anti-rollback enabled Closes IDF-9200 See merge request espressif/esp-idf!32951
2 parents ff3e93a + 99f0e1b commit 02da653

File tree

4 files changed

+21
-6
lines changed

4 files changed

+21
-6
lines changed

examples/system/ota/advanced_https_ota/anti_rollback_partition.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ nvs, data, nvs, , 0x4000,
44
otadata, data, ota, , 0x2000,
55
phy_init, data, phy, , 0x1000,
66
emul_efuse,data,efuse, , 0x2000,
7-
ota_0, app, ota_0, , 3584K,
8-
ota_1, app, ota_1, , 3584K,
7+
ota_0, app, ota_0, , 1500K,
8+
ota_1, app, ota_1, , 1500K,

examples/system/ota/advanced_https_ota/pytest_advanced_ota.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ def test_examples_protocol_advanced_https_ota_example_redirect_url(dut: Dut) ->
430430

431431

432432
@pytest.mark.esp32
433-
@pytest.mark.ethernet_flash_8m
433+
@pytest.mark.flash_encryption_ota
434434
@pytest.mark.parametrize('config', ['anti_rollback',], indirect=True)
435435
@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True)
436436
def test_examples_protocol_advanced_https_ota_example_anti_rollback(dut: Dut) -> None:

examples/system/ota/advanced_https_ota/sdkconfig.ci.anti_rollback

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ CONFIG_PARTITION_TABLE_CUSTOM=y
66
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="anti_rollback_partition.csv"
77
CONFIG_PARTITION_TABLE_FILENAME="anti_rollback_partition.csv"
88
CONFIG_PARTITION_TABLE_OFFSET=0xd000
9-
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
10-
CONFIG_ESPTOOLPY_FLASHSIZE="8MB"
9+
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
10+
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
1111
CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y
1212
CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK=y
1313
CONFIG_BOOTLOADER_APP_SECURE_VERSION=1
14-
CONFIG_BOOTLOADER_EFUSE_SECURE_VERSION_EMULATE=y
1514
CONFIG_EXAMPLE_CONNECT_ETHERNET=y
1615
CONFIG_EXAMPLE_CONNECT_WIFI=n
1716
CONFIG_EXAMPLE_USE_INTERNAL_ETHERNET=y
@@ -24,3 +23,18 @@ CONFIG_EXAMPLE_ETH_PHY_ADDR=1
2423
CONFIG_MBEDTLS_TLS_CLIENT_ONLY=y
2524
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
2625
CONFIG_EXAMPLE_CONNECT_IPV6=n
26+
27+
28+
# Default settings for testing this example in CI.
29+
# This configuration is not secure, don't use it in production!
30+
# See Flash Encryption API Guide for more details.
31+
32+
CONFIG_SECURE_FLASH_ENC_ENABLED=y
33+
CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT=y
34+
CONFIG_SECURE_BOOT_ALLOW_ROM_BASIC=y
35+
CONFIG_SECURE_BOOT_ALLOW_JTAG=y
36+
CONFIG_SECURE_FLASH_UART_BOOTLOADER_ALLOW_ENC=y
37+
CONFIG_SECURE_FLASH_UART_BOOTLOADER_ALLOW_DEC=y
38+
CONFIG_SECURE_FLASH_UART_BOOTLOADER_ALLOW_CACHE=y
39+
CONFIG_SECURE_FLASH_REQUIRE_ALREADY_ENABLED=y
40+
CONFIG_NVS_ENCRYPTION=n # this test combination is only for flash encryption and anti-rollback use-case and hence disabling it.

tools/ci/idf_pytest/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
'flash_encryption': 'Flash Encryption runners',
6969
'flash_encryption_f4r8': 'Flash Encryption runners with 4-line flash and 8-line psram',
7070
'flash_encryption_f8r8': 'Flash Encryption runners with 8-line flash and 8-line psram',
71+
'flash_encryption_ota': 'Flash Encryption runners with ethernet OTA support with 4mb flash size',
7172
'flash_multi': 'Multiple flash chips tests',
7273
'psram': 'Chip has 4-line psram',
7374
'ir_transceiver': 'runners with a pair of IR transmitter and receiver',

0 commit comments

Comments
 (0)