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

tests: secureboot: refactor to facilitate extension #3437

Closed alexgg closed 1 week ago

alexgg commented 1 month ago

As the secure boot feature is extended to more device types, the test needs to be easy to extend.

Change-type: patch


Contributor checklist

Reviewer Guidelines

alexgg commented 4 weeks ago

@resin-jenkins retest this please

alexgg commented 3 weeks ago

@resin-jenkins retest this please

alexgg commented 3 weeks ago

Re-tried qemu-generic-amd64-sb

alexgg commented 2 weeks ago

@resin-jenkins retest this please

alexgg commented 2 weeks ago

@resin-jenkins retest this please

rcooke-warwick commented 2 weeks ago

latest commit fixes cloud suite

alexgg commented 2 weeks ago

@resin-jenkins retest this please

alexgg commented 2 weeks ago

@resin-jenkins retest this please

alexgg commented 1 week ago

@resin-jenkins retest this please

alexgg commented 1 week ago

@resin-jenkins retest this please

alexgg commented 1 week ago

@resin-jenkins retest this please

alexgg commented 1 week ago

@resin-jenkins retest this please

alexgg commented 1 week ago

@resin-jenkins retest this please

alexgg commented 1 week ago

@resin-jenkins retest this please

alexgg commented 1 week ago

@resin-jenkins retest this please

alexgg commented 1 week ago
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.141Z][worker-os]             not ok 7 - Firmware will not load bootloader that fails verification
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.141Z][worker-os]               ---
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.143Z][worker-os]               at:
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.144Z][worker-os]                 line: 150
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.145Z][worker-os]                 column: 26
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.145Z][worker-os]                 file: /data/suite/tests/secureboot/index.js
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.145Z][worker-os]               found:
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.145Z][worker-os]                 !error
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.145Z][worker-os]                 name: Error
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.145Z][worker-os]                 message: |-
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.145Z][worker-os]                   Condition async () => this.worker.fetchSerial().then(
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.146Z][worker-os]                                   serialLogs => {
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.146Z][worker-os]                                       serialLogs.split('\n')
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.146Z][worker-os]                                       .slice(slice)
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.146Z][worker-os]                                       .join('\n')
jenkins-leviathan-v2-template-55678-client-1  |                                     .match(pattern)
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.146Z][worker-os]                                   }) timed out
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.147Z][worker-os]                 stack: >-
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.147Z][worker-os]                   Error: Condition async () => this.worker.fetchSerial().then(
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.147Z][worker-os]                                   serialLogs => {
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.147Z][worker-os]                                       serialLogs.split('\n')
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.147Z][worker-os]                                       .slice(slice)
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.148Z][worker-os]                                       .join('\n')
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.148Z][worker-os]                                       .match(pattern)
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.148Z][worker-os]                                   }) timed out
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.148Z][worker-os]                       at _waitUntil (/usr/app/lib/common/utils.js:103:11)
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.148Z][worker-os]                       at _waitUntil (/usr/app/lib/common/utils.js:118:11)
jenkins-leviathan-v2-template-55678-client-1  |                       at Object.waitUntil (/usr/app/lib/common/utils.js:121:3)
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.149Z][worker-os]                       at uefiSecureBoot.waitForSerialOutput (/data/suite/tests/secureboot/index.js:28:3)
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.149Z][worker-os]               source: |
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.149Z][worker-os]                       ).then(() => this.worker.executeCommandInHostOS('reboot', this.link)
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.149Z][worker-os]                       ).then(() => this.test.resolves(
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.149Z][worker-os]                 -------------------------^
jenkins-leviathan-v2-template-55678-client-1  |                             this.waitForSerialOutput(/bootx64.efi: Access Denied/),
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.150Z][worker-os]                           'Firmware will not load bootloader that fails verification',
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.150Z][worker-os]               ...
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.165Z][worker-os] 
jenkins-leviathan-v2-template-55678-client-1  | [2024-07-05T20:50:39.165Z][worker-os]             Bail out! Firmware will not load bootloader that fails verification
alexgg commented 1 week ago

@resin-jenkins retest this please

alexgg commented 1 week ago

@resin-jenkins retest this please

alexgg commented 1 week ago

lgtm