test: boot a per-run copy of the USB image — runs must not inherit leftovers
The guest mutates its boot volume (fat tests create files, the logger writes /var/log) and QEMU is hard-killed after a match, so booting the build artifact in place let one run's leftovers fail the next — a stale TESTDIR tripping the mkdir-duplicate refusal was the lone 87/88 failure in an otherwise green suite — and dirtied the build cache's own output. Each case now boots a fresh copy in the work directory.
This commit is contained in:
parent
d8cf533b73
commit
4091ea6912
|
|
@ -734,7 +734,14 @@ def run_case(arch, case):
|
|||
|
||||
# The bootable FAT32 USB image the build produced (tools/make-fat-image.py),
|
||||
# presented to the guest as a usb-storage device (see qemu_args).
|
||||
boot_volume = os.path.join(REPO, "zig-out", "danos-usb.img")
|
||||
# Boot a per-run COPY of the image: the guest MUTATES its boot volume (the
|
||||
# fat tests create/delete files; the logger writes /var/log), and QEMU is
|
||||
# hard-killed after a match — booting the build artifact in place let one
|
||||
# run's leftovers fail the next (a stale TESTDIR trips the mkdir-duplicate
|
||||
# refusal) and dirtied the build cache's own output.
|
||||
built_volume = os.path.join(REPO, "zig-out", "danos-usb.img")
|
||||
boot_volume = os.path.join(WORK, "boot-volume.img")
|
||||
shutil.copy(built_volume, boot_volume)
|
||||
vars_fd = os.path.join(WORK, "vars.fd")
|
||||
shutil.copy(arch["ovmf_vars"], vars_fd)
|
||||
serial = os.path.join(WORK, "serial.log")
|
||||
|
|
|
|||
Loading…
Reference in New Issue