Skip to content

Commit

Permalink
tests: use /dev/disk/by-id/coreos-boot-disk instead of /dev/vda
Browse files Browse the repository at this point in the history
Hardcoding `/dev/vda` will break if there are more than one block device
may be attached (like on s390x where we attach another disk to pass in
Ignition). This is why the `/dev/disk/by-id/coreos-boot-disk` symlink
was added. Use it.

While we're here, switch from `platform: qemu` to
`tags: platform-independent` since they should theoretically work on any
platform now (though they are equivalent today).

Closes: coreos/fedora-coreos-tracker#1683
  • Loading branch information
jlebon committed Mar 11, 2024
1 parent 90f984d commit 56d8fef
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion tests/kola/root-reprovision/swap-before-root/config.bu
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 1.4.0

storage:
disks:
- device: /dev/vda
- device: /dev/disk/by-id/coreos-boot-disk
partitions:
- number: 4
label: swap
Expand Down
4 changes: 1 addition & 3 deletions tests/kola/root-reprovision/swap-before-root/test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash
## kola:
## # This test's config manually references /dev/vda and is thus QEMU only
## platforms: qemu
## # Root reprovisioning requires at least 4GiB of memory.
## minMemory: 4096
## # This test includes a lot of disk I/O and needs a higher
Expand All @@ -11,7 +9,7 @@
## # legal but usually not intended, so Butane warns about it.
## allowConfigWarnings: true
## # This test reprovisions the rootfs.
## tags: reprovision
## tags: reprovision platform-independent
## description: Verify the root reprovision and swap enabled are supported.

set -xeuo pipefail
Expand Down
2 changes: 1 addition & 1 deletion tests/kola/var-mount/luks/config.bu
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ variant: fcos
version: 1.3.0
storage:
disks:
- device: /dev/vda
- device: /dev/disk/by-id/coreos-boot-disk
partitions:
- label: var
size_mib: 1000
Expand Down
3 changes: 1 addition & 2 deletions tests/kola/var-mount/luks/test.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/bin/bash
## kola:
## # Restrict to qemu for now because the primary disk path is platform-dependent
## platforms: qemu
## architectures: "! s390x"
## description: Verify that reprovision disk with luks works.
## tags: platform-independent

set -xeuo pipefail

Expand Down
2 changes: 1 addition & 1 deletion tests/kola/var-mount/simple/config.bu
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ variant: fcos
version: 1.3.0
storage:
disks:
- device: /dev/vda
- device: /dev/disk/by-id/coreos-boot-disk
partitions:
- label: var
guid: 63194b49-e4b7-43f9-9a8b-df0fd8279bb7
Expand Down
4 changes: 1 addition & 3 deletions tests/kola/var-mount/simple/test.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/bin/bash
## kola:
## platforms: qemu
## description: Verify that provision disk with guid works.
#
# Restrict to qemu for now because the primary disk path is platform-dependent
## tags: platform-independent

set -xeuo pipefail

Expand Down

0 comments on commit 56d8fef

Please sign in to comment.