From 3f188f679e32914b298b5f34359100233518755c Mon Sep 17 00:00:00 2001 From: Denis Pynkin <denis.pynkin@collabora.com> Date: Tue, 12 Mar 2019 21:35:28 +0300 Subject: [PATCH] Check if fsck has been started for rootfs In case if fsck has been started it savees 2 files in directory '/run/initramfs': - stamp file 'fsck-root' in case if fsck run was successful - log file 'fsck.log' with filesystem check log Since fsck is started on every boot it is enough to make sure we have root file system check on initramfs stage. Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com> --- test-cases/disk-fsck-boot-rootfs.yaml | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 test-cases/disk-fsck-boot-rootfs.yaml diff --git a/test-cases/disk-fsck-boot-rootfs.yaml b/test-cases/disk-fsck-boot-rootfs.yaml new file mode 100644 index 0000000..7708021 --- /dev/null +++ b/test-cases/disk-fsck-boot-rootfs.yaml @@ -0,0 +1,32 @@ +metadata: + name: disk-rootfs-fsck + format: "Apertis Test Definition 1.0" + image-types: + minimal: [ armhf, arm64, amd64 ] + target: [ armhf, arm64, amd64 ] + image-deployment: + - APT + - OSTree + type: functional + exec-type: automated + priority: high + maintainer: "Apertis Project" + description: "Ensure that the root file system check is enabled on boot" + + expected: + - "Test command should report \"pass\"." + +install: + git-repos: + - url: https://gitlab.apertis.org/infrastructure/apertis-tests.git + branch: 'apertis/v2019dev0' + +run: + steps: + - "# Enter test directory:" + - cd apertis-tests + - "# Execute the following command:" + - common/run-test-in-systemd --name=as-root common/fsck-boot-rootfs.sh + +parse: + pattern: "(?P<test_case_id>.*-*):\\s+(?P<result>(pass|fail))" -- GitLab