Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[qa] Work around QEMU bug in handling "-set" command-line option
Newer versions of QEMU (observed with QEMU 7.2.1 on Fedora 38) seem not to be able to handle the "-set netdev.hostnet0.bootfile=..." command-line option that we use to specify the per-test boot URL. The error message observed is: qemu-system-x86_64: ...: there is no netdev "hostnet0" defined Adding debug prints to a test build of QEMU shows that at the point that the "-set" option is handled, the list of netdevs is empty. This appears therefore to be a bug in the order of processing command-line options. The precise root cause has not been identified, since QEMU's command-line parsing logic is fairly arcane and relies heavily on autogenerated code fragments. Work around the problem by creating a wrapper script that strips the "-set netdev.hostnet0.bootfile=..." option and instead injects the bootfile as part of the "-netdev" option found earlier in the same command line. (In an ideal world, libvirt would provide a clean way to specify the bootfile or other options for a "user" network interface, but such a mechanism does not seem to exist at present.) Signed-off-by: Michael Brown <[email protected]>
- Loading branch information