diff --git a/test-cases/aum-rolllback-bootcount.yaml b/test-cases/aum-rolllback-bootcount.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b9a611e039844ddf315da85da51555daeb4fe65e --- /dev/null +++ b/test-cases/aum-rolllback-bootcount.yaml @@ -0,0 +1,58 @@ +metadata: + name: aum-rollback-bootcount + format: "Apertis Test Definition 1.0" + image-types: + fixedfunction: [ armhf, arm64, amd64 ] + image-deployment: + - OSTree + type: functional + exec-type: manual + priority: critical + maintainer: "Apertis Project" + description: "Apertis update manager: Rollback bootcount + This test ensures that the update manager is able to rollback to an old deployment in case of bootcount exceeded." + + expected: + - "If the test succeeds you will see a log entry" + - | + >Warning: Bootlimit (3) exceeded. Using altbootcmd. + ... + Found /extlinux/extlinux-rollback.conf + Retrieving file: /extlinux/extlinux-rollback.conf + + notes: + - "Make sure to boot from the device configured for rollback, + if not the bootcount will not be increased" + - "The test uses internet" + - "The test will prepare the system to perform an OTA update" + - "It requires five phases, which require a manual reboot to complete" + - "Phase 1 is to prepare the system with a version that can be updated" + - "Phase 2 aims to clean the old deployment to allow the update" + - "Phase 3 performs the OTA update" + - "Phase 4 is to simulate a boot failure three times to exceed the bootcount" + - "Phase 5 is to check that the system rollback to the previous state" + +install: + git-repos: + - url: https://gitlab.apertis.org/tests/aum-offline-upgrade.git + branch: apertis/v2025pre + +run: + steps: + - "# For Phase 1-3, perform the following actions to move to the next phase, + the actions prepare the system and run the test in the appropriate phase" + - "Enter test directory" + - $ cd aum-offline-upgrade + - "Set environment variables" + - $ source /etc/os-release + - $ ARCH=`dpkg --print-architecture` + - "Set additional variables which will be use to generate the image file path + base on the images available in the server, as example" + - $ BASEURL="https://images.apertis.org" BOARD="uboot" IMGPATH="daily/$VERSION" + - "Run the actual test" + - $ common/run-test-in-systemd --timeout=1200 --name=rollback-bootcount env DEBUG=2 RELEASE=$VERSION ARCH=$ARCH BASEURL=$BASEURL IMGPATH=$IMGPATH IMGDATE=$BUILD_ID IMGTYPE=$VARIANT_ID BOARD=$BOARD ./run-test-ota-auto.sh + - "Reboot the system" + - "For Phase 4, power cycle the board just after starting the kernel, + repeat it for three times to increase bootcount beyond the limit" + - "Check that bootlimit has been exceeded, by looking at logs" + - "Check that after booting the original deployment has been used" \ No newline at end of file