Skip to content

Commit 810f537

Browse files
SludgeGirlmartinpitt
authored andcommitted
test: Add support for suse to cpu migitgation tests
1 parent 3be92ce commit 810f537

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/verify/check-system-info

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,9 @@ echo dummy > /boot/vmlinuz-42.0.0; mkdir -p /lib/modules/42.0.0/
549549
if type update-grub >/dev/null 2>&1; then
550550
update-grub # Debian/Ubuntu
551551
grep -q 'linux.*/vmlinuz-42.0.0.*nosmt' /boot/grub*/grub.cfg
552+
elif type update-bootloader >/dev/null 2>&1; then
553+
update-bootloader # suse
554+
grep -q 'linux.*/vmlinuz-42.0.0.*nosmt' /boot/grub*/grub.cfg
552555
else
553556
cp -a /boot/grub2/grubenv /boot/grub2/grubenv.prev
554557
kernel-install add 42.0.0 /boot/vmlinuz-42.0.0 2>/dev/null
@@ -562,6 +565,8 @@ fi
562565
rm /boot/vmlinuz-42.0.0
563566
if type update-grub >/dev/null 2>&1; then
564567
update-grub # Debian/Ubuntu
568+
elif type update-bootloader >/dev/null 2>&1; then
569+
update-bootloader # suse
565570
else
566571
kernel-install remove 42.0.0 /boot/vmlinuz-42.0.0
567572
# HACK: https://bugzilla.redhat.com/show_bug.cgi?id=2078359 and https://bugzilla.redhat.com/show_bug.cgi?id=2078379
@@ -615,6 +620,8 @@ fi
615620
m.execute('mv /etc/default/grub /etc/default/grub.bak || true')
616621
m.write('/tmp/grubby', '#!/bin/sh\necho 0')
617622
m.execute('[ ! -f /usr/sbin/grubby ] || mount --bind /tmp/grubby /usr/sbin/grubby')
623+
m.write('/tmp/update-bootloader', '#!/bin/sh\necho 0')
624+
m.execute('[ ! -f /usr/sbin/update-bootloader ] || mount --bind /tmp/update-bootloader /usr/sbin/update-bootloader')
618625
m.execute('systemctl stop rpm-ostreed.service || true; systemctl mask rpm-ostreed.service')
619626
self.login_and_go('/system/hwinfo')
620627
b.click('#hwinfo button:contains("Mitigations")')

0 commit comments

Comments
 (0)