Skip to content

Commit f6371b6

Browse files
jlebontravier
authored andcommitted
kola/testiso: make volume ID test arch-independent
The actual backing device used for the live ISO is arch-dependent. For example on aarch64, it actually just looks like another virtio disk (e.g. `/dev/vdb`). But we know that it must be mounted at `/run/media/iso`, so key off of that instead to find the backing device. While we're here, constrain this check to tests that actually mount the live ISO. Fixes 06da492 ("kola/testiso: test volume ID has OS name prefix").
1 parent 3b5f710 commit f6371b6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mantle/cmd/kola/testiso.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,13 @@ var verifyIsoVolumeId = `[Unit]
272272
Description=Verify ISO Volume ID
273273
OnFailure=emergency.target
274274
OnFailureJobMode=isolate
275+
# only if we're actually mounting the ISO
276+
ConditionPathIsMountPoint=/run/media/iso
275277
[Service]
276278
Type=oneshot
277279
RemainAfterExit=yes
278-
ExecStart=bash -c "[[ $(lsblk -no LABEL /dev/sr0) == %s-* ]]"
280+
# the backing device name is arch-dependent, but we know it's mounted on /run/media/iso
281+
ExecStart=bash -c "[[ $(findmnt -no LABEL /run/media/iso) == %s-* ]]"
279282
[Install]
280283
RequiredBy=coreos-installer.target`
281284

0 commit comments

Comments
 (0)