Skip to content

Commit a19c7d0

Browse files
Adding the external kola test for luks + multipath case
Signed-off-by: Poorna Gottimukkula <[email protected]>
1 parent 8ee4035 commit a19c7d0

File tree

4 files changed

+39
-5
lines changed

4 files changed

+39
-5
lines changed

tests/kola/root-reprovision/luks/data/luks-test.sh

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,20 @@ if ! grep -q no_read_workqueue <<< "${table}"; then
2929
fi
3030
ok "discard and custom option enabled for root LUKS"
3131

32-
# while we're here, sanity-check that boot is mounted by UUID
33-
if ! systemctl cat boot.mount | grep -q What=/dev/disk/by-uuid; then
34-
systemctl cat boot.mount
35-
fatal "boot mounted not by UUID"
32+
# while we're here, sanity-check that boot is mounted by UUID or dm-mpath-boot
33+
if grep -q "rd.multipath=default" /proc/cmdline; then
34+
if ! systemctl cat boot.mount | grep -q "What=/dev/disk/by-label/dm-mpath-boot"; then
35+
systemctl cat boot.mount
36+
fatal "boot is not mounted by /dev/disk/by-label/dm-mpath-boot"
37+
fi
38+
ok "boot mounted from /dev/disk/by-label/dm-mpath-boot"
39+
else
40+
if ! systemctl cat boot.mount | grep -q "What=/dev/disk/by-uuid"; then
41+
systemctl cat boot.mount
42+
fatal "boot is not mounted by UUID as expected"
43+
fi
44+
ok "boot mounted by UUID"
3645
fi
37-
ok "boot mounted by UUID"
3846

3947
case "${AUTOPKGTEST_REBOOT_MARK:-}" in
4048
"")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../config.ign
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../data
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
## kola:
3+
## # This test reprovisions the rootfs.
4+
## tags: "reprovision"
5+
## # This uses additionalDisks, which is QEMU only
6+
## platforms: qemu
7+
## # Root reprovisioning requires at least 4GiB of memory.
8+
## minMemory: 4096
9+
## # A TPM backend device is not available on s390x to suport TPM.
10+
## architectures: "! s390x"
11+
## # This test includes a lot of disk I/O and needs a higher
12+
## # timeout value than the default.
13+
## timeoutMin: 15
14+
## description: Verify that LUKS on a mpath disks works.
15+
## primaryDisk: ":mpath"
16+
## appendKernelArgs: "rd.multipath=default"
17+
18+
set -xeuo pipefail
19+
20+
# shellcheck disable=SC1091
21+
. "$KOLA_EXT_DATA/commonlib.sh"
22+
23+
# run the rest of the tests
24+
. $KOLA_EXT_DATA/luks-test.sh

0 commit comments

Comments
 (0)