balena-os / meta-balena

A collection of Yocto layers used to build balenaOS images
https://www.balena.io/os
971 stars 115 forks source link

Specialize secure boot tests for RPI #3436

Closed alexgg closed 2 days ago

alexgg commented 1 month ago

USB programming flow.

alexgg commented 1 month ago

The current master has a failing test that also fails in this branch:

jenkins-leviathan-v2-template-51770-client-1  | [2024-06-02T18:31:53.496Z][worker-os] GET http://worker/dut/serial
jenkins-leviathan-v2-template-51770-client-1  | [2024-06-02T18:31:54.514Z][worker-os]             not ok 8 - Bootloader will not load configuration that fails signature verification # TODO This needs reworked for GRUB 2.12
jenkins-leviathan-v2-template-51770-client-1  | [2024-06-02T18:31:54.514Z][worker-os]               ---
jenkins-leviathan-v2-template-51770-client-1  | [2024-06-02T18:31:54.514Z][worker-os]               at:
jenkins-leviathan-v2-template-51770-client-1  | [2024-06-02T18:31:54.514Z][worker-os]                 line: 107
jenkins-leviathan-v2-template-51770-client-1  | [2024-06-02T18:31:54.514Z][worker-os]                 column: 24
jenkins-leviathan-v2-template-51770-client-1  | [2024-06-02T18:31:54.514Z][worker-os]                 file: /data/suite/tests/secureboot/index.js
jenkins-leviathan-v2-template-51770-client-1  | [2024-06-02T18:31:54.515Z][worker-os]               found:
jenkins-leviathan-v2-template-51770-client-1  | [2024-06-02T18:31:54.515Z][worker-os]                 !error
jenkins-leviathan-v2-template-51770-client-1  | [2024-06-02T18:31:54.515Z][worker-os]                 name: Error
jenkins-leviathan-v2-template-51770-client-1  | [2024-06-02T18:31:54.515Z][worker-os]                 message: |-
jenkins-leviathan-v2-template-51770-client-1  | [2024-06-02T18:31:54.516Z][worker-os]                   Condition async () => this.worker.fetchSerial().then(
jenkins-leviathan-v2-template-51770-client-1  | [2024-06-02T18:31:54.517Z][worker-os]                                           serialLogs => serialLogs.split('\n')
jenkins-leviathan-v2-template-51770-client-1  |                                                                                         .slice(slice)
jenkins-leviathan-v2-template-51770-client-1  |                                                                                         .join('\n')
jenkins-leviathan-v2-template-51770-client-1  |                                                                                         .match(pattern)
jenkins-leviathan-v2-template-51770-client-1  |                                     ) timed out
jenkins-leviathan-v2-template-51770-client-1  |                 stack: |-
jenkins-leviathan-v2-template-51770-client-1  |                   Error: Condition async () => this.worker.fetchSerial().then(
jenkins-leviathan-v2-template-51770-client-1  | [2024-06-02T18:31:54.517Z][worker-os]                                           serialLogs => serialLogs.split('\n')
jenkins-leviathan-v2-template-51770-client-1  | [2024-06-02T18:31:54.517Z][worker-os]                                                                                           .slice(slice)
jenkins-leviathan-v2-template-51770-client-1  | [2024-06-02T18:31:54.517Z][worker-os]                                                                                           .join('\n')
jenkins-leviathan-v2-template-51770-client-1  | [2024-06-02T18:31:54.521Z][worker-os]                                                                                           .match(pattern)
jenkins-leviathan-v2-template-51770-client-1  |                                     ) timed out
jenkins-leviathan-v2-template-51770-client-1  |                       at _waitUntil (/usr/app/lib/common/utils.js:103:11)
rcooke-warwick commented 1 week ago

are the latter 3 commits supposed to be in this PR?

rcooke-warwick commented 1 week ago

Looks good other than the few questions I've written + a run of these tests with a locked device + USB provisioning flow which I haven't been able to do yet

alexgg commented 6 days ago

@resin-jenkins retest this please

alexgg commented 5 days ago

@resin-jenkins retest this please

alexgg commented 5 days ago

Passed for:

qemu-generic-aarch64
qemu-generic-amd64
qemu-generic-amd64-sb

qemu-genericx86-64-ext seemed passed to but it did not report back. Re-trying anyway to make sure.

alexgg commented 4 days ago

@resin-jenkins retest this please

alexgg commented 4 days ago

@resin-jenkins retest this please

alexgg commented 3 days ago

lgtm

alexgg commented 3 days ago

Now qemu-genericx86-64-ext passed, so it has seen all tests passed in different runs.