From 38894a8f6b08252c7b02ca7017d8298e84a7ffd7 Mon Sep 17 00:00:00 2001 From: Entrpi Date: Tue, 27 Oct 2026 23:14:22 +1100 Subject: [PATCH] test(artifacts): run the ESP image lane on esptool v5.6.0 The lane compared descriptor fields only when esptool image-info printed one, so a descriptor that REA reports and esptool does not print passed without comparison. Compare the descriptor kind in both directions. Record that the lane passed for all 13 images with esptool and espsecure v5.6.0, the version the layout facts cite, as well as with 4.12.0. --- docs/esp-image.md | 15 ++++++++------- scripts/verify/firmware/esp-image-tools.mjs | 14 ++++++++++++-- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/docs/esp-image.md b/docs/esp-image.md index e4c3912f72..d24500b2d0 100644 --- a/docs/esp-image.md +++ b/docs/esp-image.md @@ -243,10 +243,11 @@ It needs a Clang with the RISC-V target, `ld.lld` and a Python that can run `REA_XTENSA_ESP32_GCC` adds an ESP32 (Xtensa) app built with Espressif's `xtensa-esp32-elf-gcc`. Without it the report marks that image as skipped. -The lane ran on macOS arm64 with Node 24.22.1, esptool and espsecure 4.12.0, -Homebrew Clang and LLD 21.1.8, and `xtensa-esp32-elf-gcc` 14.2.0 -(crosstool-NG esp-14.2.0_20251107). All checks passed for all 13 images. The -complete run, including the builds and every esptool call, took 13.2 s -elapsed, 11.1 s user CPU and 1.6 s system CPU, with a 257 MiB peak resident -set, under `/usr/bin/time -l` with warm caches. esptool v5.6.0, the version -this reader's layout facts cite, has not been run in the lane. +The lane ran on macOS arm64 with Node 24.22.1, Homebrew Clang and LLD 21.1.8, +and `xtensa-esp32-elf-gcc` 14.2.0 (crosstool-NG esp-14.2.0_20251107), once +with esptool and espsecure v5.6.0 and once with 4.12.0. All checks passed for +all 13 images in both runs. With v5.6.0 the complete run, including the builds +and every esptool call, took 12.9 s elapsed, 11.2 s user CPU and 1.6 s system +CPU under `/usr/bin/time -l` with warm caches. The largest single process +peaked at a 254 MiB resident set; the combined peak of all processes was not +measured. diff --git a/scripts/verify/firmware/esp-image-tools.mjs b/scripts/verify/firmware/esp-image-tools.mjs index 0a180c4eb6..7ed5cb4672 100644 --- a/scripts/verify/firmware/esp-image-tools.mjs +++ b/scripts/verify/firmware/esp-image-tools.mjs @@ -155,9 +155,20 @@ export const inspect = async (file) => { }; }; +const oracleDescriptorKind = (oracle) => { + if (oracle.project !== undefined) return "app"; + if (oracle.bootloaderVersion !== undefined) return "bootloader"; + return null; +}; + const assertDescriptorAgrees = (name, oracle, descriptor) => { + // Both directions, so a descriptor esptool does not print fails the lane. + assert.equal( + descriptor?.kind ?? null, + oracleDescriptorKind(oracle), + `${name} descriptor`, + ); if (oracle.project !== undefined) { - assert.equal(descriptor.kind, "app", `${name} descriptor`); assert.equal(descriptor.project_name, oracle.project, name); assert.equal(descriptor.version, oracle.appVersion, name); assert.equal(descriptor.app_elf_sha256, oracle.elfSha256, name); @@ -170,7 +181,6 @@ const assertDescriptorAgrees = (name, oracle, descriptor) => { ); } if (oracle.bootloaderVersion !== undefined) { - assert.equal(descriptor.kind, "bootloader", `${name} descriptor`); assert.equal(String(descriptor.version), oracle.bootloaderVersion, name); assert.equal(descriptor.idf_ver, oracle.idfVer, name); assert.equal(descriptor.date_time, oracle.compileTime, name);