Skip to content

Commit

Permalink
Adding the external kola test for luks + multipath case
Browse files Browse the repository at this point in the history
Signed-off-by: Poorna Gottimukkula <Poorna.Gottimukkula1@ibm.com>
  • Loading branch information
Poorna-Gottimukkula1 committed Aug 29, 2024
1 parent 8ee4035 commit a19c7d0
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 5 deletions.
18 changes: 13 additions & 5 deletions tests/kola/root-reprovision/luks/data/luks-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,20 @@ if ! grep -q no_read_workqueue <<< "${table}"; then
fi
ok "discard and custom option enabled for root LUKS"

# while we're here, sanity-check that boot is mounted by UUID
if ! systemctl cat boot.mount | grep -q What=/dev/disk/by-uuid; then
systemctl cat boot.mount
fatal "boot mounted not by UUID"
# while we're here, sanity-check that boot is mounted by UUID or dm-mpath-boot
if grep -q "rd.multipath=default" /proc/cmdline; then
if ! systemctl cat boot.mount | grep -q "What=/dev/disk/by-label/dm-mpath-boot"; then
systemctl cat boot.mount
fatal "boot is not mounted by /dev/disk/by-label/dm-mpath-boot"
fi
ok "boot mounted from /dev/disk/by-label/dm-mpath-boot"
else
if ! systemctl cat boot.mount | grep -q "What=/dev/disk/by-uuid"; then
systemctl cat boot.mount
fatal "boot is not mounted by UUID as expected"
fi
ok "boot mounted by UUID"
fi
ok "boot mounted by UUID"

case "${AUTOPKGTEST_REBOOT_MARK:-}" in
"")
Expand Down
1 change: 1 addition & 0 deletions tests/kola/root-reprovision/luks/multipath/config.ign
1 change: 1 addition & 0 deletions tests/kola/root-reprovision/luks/multipath/data
24 changes: 24 additions & 0 deletions tests/kola/root-reprovision/luks/multipath/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
## kola:
## # This test reprovisions the rootfs.
## tags: "reprovision"
## # This uses additionalDisks, which is QEMU only
## platforms: qemu
## # Root reprovisioning requires at least 4GiB of memory.
## minMemory: 4096
## # A TPM backend device is not available on s390x to suport TPM.
## architectures: "! s390x"
## # This test includes a lot of disk I/O and needs a higher
## # timeout value than the default.
## timeoutMin: 15
## description: Verify that LUKS on a mpath disks works.
## primaryDisk: ":mpath"
## appendKernelArgs: "rd.multipath=default"

set -xeuo pipefail

# shellcheck disable=SC1091
. "$KOLA_EXT_DATA/commonlib.sh"

# run the rest of the tests
. $KOLA_EXT_DATA/luks-test.sh

0 comments on commit a19c7d0

Please sign in to comment.