Skip to content

Commit

Permalink
kola: tests: partition_on_boot_disk: Tweak fs labels and create file
Browse files Browse the repository at this point in the history
Switch filesystem label to VAR to follow the same convention as other core
filesystems (ROOT/EFI/OEM). The testcase has also been extended to make sure
creating files in /var works.

Signed-off-by: Jeremi Piotrowski <[email protected]>
  • Loading branch information
jepio committed Nov 23, 2023
1 parent 1bea94d commit 054a51c
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions kola/tests/ignition/filesystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ systemd:
})

register.Register(&register.Test{
// Note: As long as the initrd does not mount /var for early
// preparations, the resulting system has a few issues, so this setup is
// not fully supported yet
Name: "cl.ignition.partition_on_boot_disk",
Run: testPartitionOnBootDisk,
ClusterSize: 0,
Expand Down Expand Up @@ -456,18 +459,23 @@ storage:
number: 10
start: '9GiB'
filesystems:
- name: var
- name: VAR
mount:
device: /dev/disk/by-partlabel/VAR
format: xfs
label: var
label: VAR
files:
- filesystem: VAR
path: /hello
mode: 0644
contents:
inline: world
- filesystem: root
path: /etc/fstab
mode: 0644
contents:
inline: |
/dev/disk/by-label/var /var xfs defaults 0 0
/dev/disk/by-label/VAR /var xfs defaults 0 0
`)

func testPartitionOnBootDisk(c cluster.TestCluster) {
Expand All @@ -482,6 +490,7 @@ func testPartitionOnBootDisk(c cluster.TestCluster) {

c.MustSSH(m, "mountpoint /var")
c.MustSSH(m, "ls -la /dev/disk/by-partlabel/VAR")
c.MustSSH(m, "ls -la /dev/disk/by-label/var")
c.MustSSH(m, "ls -la /dev/disk/by-label/VAR")
c.AssertCmdOutputContains(m, "findmnt /var", "xfs")
c.AssertCmdOutputContains(m, "cat /var/hello", "world")
}

0 comments on commit 054a51c

Please sign in to comment.