| Age | Commit message (Collapse) | Author |
|
smoketest: T9402: stop navigating the installed system's GRUB menu
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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 "/".
|
|
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.
|
|
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.
|
|
Re-partitioning a disk and adding it back to the array can take significantly
longer then the default pexpect timeout of 30 seconds.
|
|
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.
|
|
Testsuite: T3871: extend testifname with diagnostics and mac-order regression
|
|
Testsuite: T9217: use separate SCSI controller for RAID-1 UEFI testcase
|
|
"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.
|
|
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.
|
|
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>
|
|
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.
|
|
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.
|
|
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.
|
|
The prior expect of 'No such file or directory' can prevent smoketests from completing if test fails with that same error
|
|
|
|
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.
|
|
|
|
+ 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.
|
|
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.
|
|
|
|
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/
|
|
|
|
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.
|
|
This reverts commit 194f38b2d9582110d14b21b67e48ed13b58152f9.
|
|
This reverts commit 16ced6d41f030f5621e667abfe0e35aa498bc71b.
|
|
This reverts commit d84d127f91186082df2a786c7e20fe2af55dfa3b.
|
|
This reverts commit 3c3df90237c39caa1e5f7e2cf3180fa4f5f4b0bb.
|
|
Syft from the CDN to prevent a possible supply chain attack"
This reverts commit a0f74b5a2565956ce405b7185842cbdd0b4f1768.
|
|
|
|
the CDN to prevent a possible supply chain attack
|
|
Systems under heavy load might require more time to init the VM
|
|
|
|
|
|
|
|
Avoid duplicated code when working with TPM
|
|
Add additional validation step to ensure that the transfer drive is unmounted successfully.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
|
Apply suggestion, add validation that the Syft binary was copied with success.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
|
Exclude the transfer directory from scan.
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
As there is also "set system console device <DEV> kernel", use a more specific
match criteria to avoid false positives.
|
|
Fix typos and mistakes in the comments
No functional changes
|
|
|