Skip to content

Commit 0834246

Browse files
committed
testing/mdadm: Add guess test
The test checks that guess only adds mdadm and does not add multipath, luks, lvm. In the testcase the /sys/../dm/uuid is empty, which previously broke the logic. Signed-off-by: Alexey Gladkov <[email protected]>
1 parent cf60c9f commit 0834246

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
mi-bug-report: WARNING: There are no modules in the directory: /lib/modules/6.6.41-un-def-alt0.p11.1/kernel
2+
RUN: guess/root/action
3+
TRACE function: source=features/mdadm/guess/device: main guess_variable: MDADM_EXTRA_PROGS mdmon
4+
TRACE function: source=features/mdadm/guess/device: main guess_modalias: md-raid0
5+
TRACE function: source=features/mdadm/guess/device: main guess_modalias: efivarfs
6+
TRACE function: source=features/mdadm/guess/device: main guess_feature: mdadm
7+
TRACE function: source=features/mdadm/guess/device: main guess_variable: GENERATE_UDEV_RULES_FOR_MD_DEVICE 9:126
8+
TRACE function: source=features/devmapper/guess/device: main guess_feature: devmapper
9+
TRACE function: source=features/rootfs/guess/fstype: main guess_modalias: fs-ext4
10+
RUN: guess-config
11+
GENERATE_UDEV_RULES_FOR_MD_DEVICE = \
12+
9:126
13+
MDADM_EXTRA_PROGS = \
14+
mdmon
15+
MOUNTPOINTS = \
16+
/
17+
18+
MODULES_ADD += \
19+
efivarfs fs-ext4 md-raid0 \
20+
pci:v00002646d00005017sv00002646sd00005017bc01sc08i02 \
21+
pci:v00002646d0000501Dsv00002646sd0000501Dbc01sc08i02 \
22+
pci:v00008086d0000464Dsv00000000sd00000000bc06sc04i00 \
23+
pci:v00008086d0000467Fsv00008086sd00000000bc01sc04i00 \
24+
pci:v00008086d00007AC4sv00000000sd00000000bc06sc04i00 \
25+
pci:v00008086d00007AC8sv00000000sd00000000bc06sc04i00
26+
27+
FEATURES += \
28+
add-modules add-udev-rules devmapper mdadm rootfs
29+
30+
rc=0
Binary file not shown.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash -eu
2+
3+
[ -z "${IGNORE_UNPRIV_USERNS_TESTS-}" ] ||
4+
exit 127
5+
6+
cwd="${0%/*}"
7+
8+
export GUESS_SUFFIX=add:guess-root
9+
export TEST_GUESS_ACTIONS="guess/root/action guess-config"
10+
11+
export RESOLVE_MODALIAS=
12+
export KERNEL_CONFIG=/dev/null
13+
14+
export MAKE_INITRD_TRACE=1
15+
export MAKE_INITRD_TRACE_PIDS=
16+
export MAKE_INITRD_TRACE_EXECUTE_PATTERNS='guess/root/action'
17+
export MAKE_INITRD_TRACE_SRC_PATTERNS='features/*/guess/* features/rootfs/guess/fstype'
18+
export MAKE_INITRD_TRACE_RUN_PATTERNS='*'
19+
20+
utils/mi-bug-report "$cwd/rootfs.tar.xz" -- \
21+
.build/dest/usr/sbin/make-initrd --no-depmod -k '6.6.41-un-def-alt0.p11.1' test-guess

0 commit comments

Comments
 (0)