summaryrefslogtreecommitdiff
path: root/scripts/check-qemu-install
AgeCommit message (Collapse)Author
8 daysMerge pull request #1319 from c-po/qemu-serial-timeoutViacheslav Hletenko
smoketest: T9402: stop navigating the installed system's GRUB menu
8 daysTestsuite: T861: boot VyOS CA signed images as-is in Secure Boot testChristian Breunig
The Secure Boot test always disabled Secure Boot in the UEFI and enrolled a Machine Owner Key. That only applies to images signed with a custom certificate - an image signed by the VyOS CA is already trusted and must boot without any firmware changes. If the custom signing key pair is present in the build tree, the MOK workflow is used as before. Otherwise the image boots with Secure Boot enabled from the start, and the Kernel signature is verified against the VyOS CA issuer and signer via "show secure-boot detail", which requires a matching vyos-1x. The make target is renamed from testsb to test-secure-boot.
8 dayssmoketest: T9402: stop navigating the installed system's GRUB menuChristian Breunig
The QEMU smoketest selected the serial console on the installed system by sending timed arrow keys and Enter through the GRUB menus. Under host load those keys raced the five second auto-boot countdown or got lost, so tests failed at random. Earlier fixes only treated symptoms. T8147 doubled the menu timeout. T9099 added checks after each submenu to fail fast. T9214 first sent the first key earlier and then ignored a lost race on the top menu. The installer already makes the serial console the default, and raw images take it from the build flavor, so the default entry boots the right console. The harness now only waits for GRUB and lets it boot. The existing console checks still verify the setting. Live ISO menus are unchanged.
8 dayssmoketest: T9402: extend timeout for "install image" to finishChristian Breunig
After the last installer question the QEMU smoketest waits for the operational mode prompt with the default timeout of 60 seconds. Installing GRUB and unmounting the target, which flushes the copied image to disk, can take longer on large images, slow storage or loaded CI hosts. A working install was then reported as failed. Raise this wait to 300 seconds.
2026-09-16T9014: use tpm-tis-device for arm64 QEMU smoketestsChristian Breunig
The ISA "tpm-tis" device only exists on x86 machines. The arm64 "virt" machine exposes the TPM via MMIO and a device-tree node, which QEMU models as "tpm-tis-device" instead.
2026-09-12Testsuite: T9301: read the console type where GRUB keeps itAntonio Quartulli
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 "/".
2026-09-12Testsuite: T7575: strip terminal escapes when parsing console outputChristian Breunig
Commit c7eef9dd ("Testsuite: T8375: verify proper serial console settings") read console_type/console_num/console_speed from flavor.json by taking the last non-empty line of the raw pexpect buffer, then interpolated those values unescaped into c.expect() patterns. That stayed harmless until commit 0505dc09 ("vbash: T7575: vyatta-bash 5.2.37 using build system") rebased vyatta-bash onto Debian bash 5.2.37, where readline enables bracketed-paste mode by default. The shell now emits \x1b[?2004h around every prompt, that sequence got parsed as console_type, and its "[" opened an unterminated character class: re.error: unterminated character set at position 27 Add a get_cmd_output() helper that strips terminal control sequences and the echoed command before returning the last output line, hoist the ANSI regex to module scope for reuse, validate the parsed values, and re.escape() everything interpolated into a regular expression.
2026-09-07live-boot: T5475: replace the forked live-boot package with Debian'sChristian Breunig
VyOS carried a fork of Debian's live-boot, based on release 1:20151213, purely to add a handful of VyOS specific behaviours. The fork is retired here in favour of Debian's own live-boot plus a drop-in component. live-boot's frontend sources every /lib/live/boot/????-* file in glob order, so 9991-vyos.sh is read after all upstream components and can both translate the vyos-union= kernel parameter and redefine three helpers. An initramfs-tools hook copies the multiarch klibc libraries that upstream's non-multiarch glob never matches, and a live-top shim runs mdadm, which boot=live otherwise skips entirely, leaving RAID arrays unassembled.
2026-09-04Testsuite: T9276: RAID1 test sporadically fails due to timeout violationChristian Breunig
Re-partitioning a disk and adding it back to the array can take significantly longer then the default pexpect timeout of 30 seconds.
2026-08-17Testsuite: T9014: restrict to amd64/arm64 and require --uefi on arm64Christian Breunig
QEMU_CONFIG only defines profiles for amd64 and arm64, and arm64 guests only boot via UEFI, so fail fast with a clear message instead of running into an unsupported-architecture error deep into the install.
2026-08-17Merge pull request #1268 from c-po/boot-ifname-race-2Christian Breunig
Testsuite: T3871: extend testifname with diagnostics and mac-order regression
2026-08-17Merge pull request #1271 from c-po/smoketest-raid-uefiAndrii Klymenko
Testsuite: T9217: use separate SCSI controller for RAID-1 UEFI testcase
2026-08-17Testsuite: T9217: use separate SCSI controller for RAID-1 UEFI testcaseChristian Breunig
"make testraid -- --uefi" fails. Install and first boot succeed normally under UEFI, but the test then simulates a failed RAID-1 member by wiping the primary disk and rebooting off the surviving mirror disk. That reboot never reaches a login prompt. OVMF only honors QEMU's per-device "bootindex" when disks sit behind separate PCI controllers; sharing one virtio-scsi-pci controller via SCSI LUN makes it always boot LUN 0 regardless of bootindex.
2026-08-16Testsuite: T9214: make GRUB console-select navigation non-fatal on auto-boot ↵Christian Breunig
race Commit 7c33698e ("Testsuite: T9214: fix GRUB auto-boot race in console-select navigation") narrowed the race between GRUB's own auto-boot countdown and this script's post-install "Boot options" navigation, but did not close it: the countdown is timed from when GRUB itself draws the menu, not from when this script's regex match on the menu banner returns, so under host load GRUB can still auto-boot before we react. When that happens, the subsequent child.expect('Select console type', ...) blocks for the full timeout waiting for a submenu that was never entered, then raises and aborts the test even though the default entry already booted a working serial console (the installer always answers 'S' to the console-type prompt). Wrap the submenu navigation in a try/except so losing this race just logs a warning and falls through instead of crashing, letting the already-auto-booted default entry carry on into the login wait that already tolerates this case.
2026-08-15Testsuite: T3871: extend testifname with diagnostics and mac-order regressionChristian Breunig
Add diagnostic CLI/log output after each reboot in --ifnametest so a failure shows hw-id bindings, interface state and kernel/naming log lines directly on the console instead of only the final MAC-mapping exception. Split the single reboot into independent scenarios, since a pending node (hw-id cleared, node kept) only auto-resolves when it's the sole candidate of its type in that boot: - full interface delete, verifying it backfills its own gap - hw-id-only delete, verifying the pending node reclaims its own hardware - a deterministic MAC-order-mismatch case (swapped eth1/eth2 hw-id, simulating an already-provisioned box) combined with a delete + hw-id-clear in the same boot, verifying the settings-bearing node is never silently bound to the other freed NIC's hardware Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-14Testsuite: T9214: fix GRUB auto-boot race in console-select navigationChristian Breunig
Commit 2d525e9a88 ("Testsuite: T9099: harden GRUB console-select navigation with expect() check") added expect() checks after each GRUB submenu transition in BOOTLOADERchooseSerialConsole(), but did not fix the underlying race it described: on the installed system, BOOTLOADER_LOAD_TMO (5s) is slept before the first KEY_DOWN is sent, while that system's top-level GRUB menu auto-boots its default entry after the same 5s with no margin. Under host load the countdown could win, so GRUB booted straight past "Boot options" and the new child.expect('Select console type', ...) then blocked for the full BOOTLOADER_TMO waiting for text that would never appear. Send the first navigation key immediately after the GRUB banner is detected instead of sleeping first, so the auto-boot countdown is cancelled right away rather than raced against.
2026-08-06Testsuite: T3871: add testifname Makefile targetChristian Breunig
Testcase removes NIC definition entirely and on a second NIC drops only the hw-id node. Testcase is there to verify proper ordering which simulates a NIC replacement.
2026-08-06Testsuite: T3871: change testcase to use multiple NIC driversChristian Breunig
Extend testcase to use multiple differen virtual NIC drivers to also see if they are always placed in the same order - given my ascending MAC addresses.
2026-07-23T9124: Fix smoketest file checksarthurdev
The prior expect of 'No such file or directory' can prevent smoketests from completing if test fails with that same error
2026-07-23Testsuite: T9021: answer question during test for bash_history migrationChristian Breunig
2026-07-17Testsuite: T9099: harden GRUB console-select navigation with expect() checksChristian Breunig
BOOTLOADERchooseSerialConsole() sent fixed DOWN/ENTER keystrokes with blind sleeps to navigate the post-install GRUB "Boot options" and "Select console type" submenus. Under host load, a dropped keystroke could land navigation one level too deep (e.g. "Select boot mode" instead of "Select console type"). GRUB submenus never time out on their own, so the VM sat there until the unrelated 600s login wait in loginVM() expired, producing a confusing pexpect.TIMEOUT far from the real cause. Add child.expect() checks after each submenu transition to confirm the expected menu actually rendered before sending the next keypress, so a misnavigation now fails fast and points at the right step.
2026-06-02Testsuite: T8602: fix NameError: name 'nested_payload_iso_path' is not definedChristian Breunig
2026-06-02Testsuite: T8602: add QEMU smoketest for add-system-image over HTTP (default ↵Christian Breunig
+ VRF) Extend check-qemu-install with --test-image-update: build a nested installer ISO as a second CD-ROM, serve the inner image over HTTP, and exercise add/delete system image in the default routing context and in a named VRF. Add make test-image-update and ignore/clean nested_installer_payload.iso artefacts.
2026-06-02Makefile: T8602: move validation if ISO exists into individual scriptsChristian Breunig
Sometimes I do call scripts/check-qemu-install directly without the Makefile wrapper, thus it should be ensured that the ISO image exists also from within the test-case launcher, too.
2026-06-02Testsuite: T8602: check for mutually exclusive primary testcase selectorsChristian Breunig
2026-06-02Testsuite: T8602: stop "cat" abuseChristian Breunig
Abusing cats is a prevalent problem in the Linux user community. Users, ranging from know-nothing neophytes to all-knowing professionals, engage in cat abuse on a daily basis, whether in their scripts or simple terminal commands. https://rseragon.github.io/posts/cat-abuse/
2026-06-02Testsuite: T8602: increase Terminal width and length to 160/60Christian Breunig
2026-06-02Makefile: T8602: configtests always require vyos-configdChristian Breunig
There is no need in keeping the old --configd option when starting the smoketests. VyOS heavily relies on vyos-configd and derivates, so there is no need anymore to disable it for our smoketests.
2026-06-01Revert "T8542: Add functionality to generate SBOM file from ISO image"Christian Breunig
This reverts commit 194f38b2d9582110d14b21b67e48ed13b58152f9.
2026-06-01Revert "T8542: Add functionality to generate SBOM file from ISO image"Christian Breunig
This reverts commit 16ced6d41f030f5621e667abfe0e35aa498bc71b.
2026-06-01Revert "T8542: Add functionality to generate SBOM file from ISO image"Christian Breunig
This reverts commit d84d127f91186082df2a786c7e20fe2af55dfa3b.
2026-06-01Revert "T8542: Add functionality to generate SBOM file from ISO image"Christian Breunig
This reverts commit 3c3df90237c39caa1e5f7e2cf3180fa4f5f4b0bb.
2026-06-01Revert "T8542: Add functionality to generate SBOM file from ISO image. Get ↵Christian Breunig
Syft from the CDN to prevent a possible supply chain attack" This reverts commit a0f74b5a2565956ce405b7185842cbdd0b4f1768.
2026-05-08Merge branch 'current' into T8542-SBOM-currentAndrii Klymenko
2026-05-08T8542: Add functionality to generate SBOM file from ISO image. Get Syft from ↵asklymenko
the CDN to prevent a possible supply chain attack
2026-05-06Testsuite: T8147: increase GRUB timeout on startup to choose serial consoleChristian Breunig
Systems under heavy load might require more time to init the VM
2026-05-06Testsuite: T8147: properly close pexpect childChristian Breunig
2026-05-06Testsuite: T8147: add common waitForLogin() helperChristian Breunig
2026-05-06Testsuite: T8147: must run as root to start QEMU VMsChristian Breunig
2026-05-06Testsuite: T8147: use common clearTPM() handlerChristian Breunig
Avoid duplicated code when working with TPM
2026-04-23T8542: Add functionality to generate SBOM file from ISO imageAndrii Klymenko
Add additional validation step to ensure that the transfer drive is unmounted successfully. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-23T8542: Add functionality to generate SBOM file from ISO imageAndrii Klymenko
Apply suggestion, add validation that the Syft binary was copied with success. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-23T8542: Add functionality to generate SBOM file from ISO imageAndrii Klymenko
Exclude the transfer directory from scan.
2026-04-21T8542: Add functionality to generate SBOM file from ISO imageAndrii Klymenko
Use the Syft util to generate SBOM files in both CycloneDX and SPDX format. This process includes creating a transfer disk to copy the Syft util from the host machine and copy the scan results back to the host machine.
2026-04-20Testsuite: T8375: do not run serial console GRUB tests without serial consoleChristian Breunig
It does not make sense to test the serial console autodeteaction on a flavor which uses a VGA console like PROXMOX. If console_type is a VGA console, bail out early from the tests.
2026-04-14T8460: Add CPU isolation option to QEMU install checks for VPP-related testsNataliia Solomko
2026-04-05Testsuite: T8375: verify proper serial console settingsChristian Breunig
Now that the serial console definition is dynamically generated by the image installer, depending on the flavor data, it is time to validate the resulting CLI nodes and GRUB config.
2026-04-05Testsuite: T8375: use more specific "option kernel" search path in conf commandsChristian Breunig
As there is also "set system console device <DEV> kernel", use a more specific match criteria to avoid false positives.
2026-03-26T8410: Fix typos and mistakes in scripts and commentsViacheslav Hletenko
Fix typos and mistakes in the comments No functional changes
2026-03-10T8373: check-qemu-install: increase BOOTLOADER_SLEEP timeAlex Kudentsov