File tree Expand file tree Collapse file tree 4 files changed +44
-4
lines changed
tests/kola/root-reprovision/luks Expand file tree Collapse file tree 4 files changed +44
-4
lines changed Original file line number Diff line number Diff line change @@ -29,12 +29,17 @@ if ! grep -q no_read_workqueue <<< "${table}"; then
29
29
fi
30
30
ok " discard and custom option enabled for root LUKS"
31
31
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
32
+ # while we're here, sanity-check that boot is mounted by UUID or by multipath label
33
+ if grep -q " rd.multipath=default" /proc/cmdline; then
34
+ expected_what=/dev/disk/by-label/dm-mpath-boot
35
+ else
36
+ expected_what=/dev/disk/by-uuid
37
+ fi
38
+ if ! systemctl cat boot.mount | grep -q What=" ${expected_what} " ; then
34
39
systemctl cat boot.mount
35
- fatal " boot mounted not by UUID "
40
+ fatal " boot mounted not by ${expected_what} "
36
41
fi
37
- ok " boot mounted by UUID "
42
+ ok " boot mounted by ${expected_what} "
38
43
39
44
case " ${AUTOPKGTEST_REBOOT_MARK:- } " in
40
45
" " )
Original file line number Diff line number Diff line change
1
+ ../config.ign
Original file line number Diff line number Diff line change
1
+ ../data
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # # kola:
3
+ # # # This test reprovisions the rootfs.
4
+ # # tags: "reprovision"
5
+ # # # This uses appendKernelArgs and multipath, 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
+ # Check if the child device is part of the parent device
24
+ srcdev=$( findmnt -nvr /sysroot -o SOURCE)
25
+ parent_device=" /dev/mapper/mpatha"
26
+
27
+ if ! lsblk -pno NAME " $parent_device " | grep -qw " $srcdev " ; then
28
+ fatal " $srcdev is NOT a child of $parent_device ."
29
+ fi
30
+ ok " $srcdev device is part of the parent $parent_device device"
31
+
32
+ # run the rest of the tests
33
+ . $KOLA_EXT_DATA /luks-test.sh
You can’t perform that action at this time.
0 commit comments