Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions qubes/tests/integ/grub.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ def setUp(self):
supported = True
elif self.template.startswith("debian-"):
supported = True
elif self.template.startswith("archlinux"):
supported = True
if not supported:
self.skipTest(
"Template {} not supported by this test".format(self.template)
Expand Down Expand Up @@ -76,6 +78,12 @@ def install_packages(self, vm):
cmd_install1 += " dracut"
cmd_install2 += " && dracut -f"
cmd_update_grub = "mkdir -p /boot/grub && update-grub2"
elif self.template.startswith("archlinux"):
cmd_install1 = (
"pacman -S --noconfirm linux grub && grub-install /dev/xvda"
)
cmd_install2 = "pacman -S --noconfirm qubes-vm-kernel-support"
cmd_update_grub = "grub-mkconfig -o /boot/grub/grub.cfg"
else:
assert False, "Unsupported template?!"

Expand All @@ -102,6 +110,11 @@ def get_kernel_version(self, vm):
"dpkg-query --showformat='${Package}\\n' --show "
"'linux-image-*-amd64'|sort -V|tail -1|cut -d - -f 3-"
)
elif self.template.startswith("archlinux"):
cmd_get_kernel_version = (
"pacman -Q linux|sort -V|tail -1|cut -d ' ' -f 2"
"|sed 's/\.arch/-arch/'"
)
else:
raise RuntimeError("Unsupported template?!")

Expand Down Expand Up @@ -226,6 +239,13 @@ def setUp(self):
"Fedora kernel is compressed with zstd "
"which is not supported by pvgrub2"
)
if "archlinux" in self.template:
# requires a zstd decompression filter in grub
# (see grub_file_filter_id enum in grub sources)
self.skipTest(
"Archlinux kernel is compressed with zstd "
"which is not supported by pvgrub2"
)
super().setUp()


Expand Down