From df46ba4cf9f95014eef26afa5324197d30d77dd1 Mon Sep 17 00:00:00 2001 From: Antonio Quartulli Date: Fri, 11 Sep 2026 14:13:02 +0200 Subject: Testsuite: T9301: read the console type where GRUB keeps it The installer writes the GRUB defaults to the persistence partition, and on a running image the /boot of the booted image is not that partition, so the check never found the file and declared the image unusable. Resolve the persistence directory the way vyos.system.grub does instead of assuming "/". --- scripts/check-qemu-install | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install index 57ece12a..58c45f39 100755 --- a/scripts/check-qemu-install +++ b/scripts/check-qemu-install @@ -739,8 +739,16 @@ def basic_cli_tests(c): c.expect(rf'set system console device {console_dev} kernel\r\r\nset system console device {console_dev} speed \'{re.escape(console_speed)}\'') c.expect(op_mode_prompt) - # Validate GRUB has the right console_type defined - c.sendline('cat /boot/grub/grub.cfg.d/20-vyos-defaults-autoload.cfg | grep "set console_type"') + # Validate GRUB has the right console_type defined. The GRUB configuration + # lives on the persistence partition, which is not the running image's + # /boot - resolve it the way vyos.system.grub does. + persistence = get_cmd_output( + c, + 'python3 -c "from vyos.system.disk import find_persistence;' + ' print(find_persistence())"', + ) + c.sendline(f'grep "set console_type" ' + f'{persistence}/boot/grub/grub.cfg.d/20-vyos-defaults-autoload.cfg') c.expect(rf'set console_type="{re.escape(console_type)}"') c.expect(op_mode_prompt) -- cgit v1.2.3