On a Friday in 2025, Laine Stump wrote:
On 9/9/25 8:05 AM, Ján Tomko via Devel wrote:
From: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com> --- ...t-user-fs-ccw.s390x-latest.virtiofsd0.args | 3 ++ ...fs-fd-memory.x86_64-latest.virtiofsd0.args | 9 ++++++ ...fd-openfiles.x86_64-latest.virtiofsd0.args | 10 ++++++ ...fs-hugepages.x86_64-latest.virtiofsd0.args | 3 ++ ...fs-hugepages.x86_64-latest.virtiofsd1.args | 3 ++ ...-fs-readonly.x86_64-latest.virtiofsd0.args | 6 ++++ tests/qemuxmlconftest.c | 32 +++++++++++++++++++ 7 files changed, 66 insertions(+) create mode 100644 tests/qemuxmlconfdata/vhost-user-fs-ccw.s390x-latest.virtiofsd0.args create mode 100644 tests/qemuxmlconfdata/vhost-user-fs-fd-memory.x86_64-latest.virtiofsd0.args create mode 100644 tests/qemuxmlconfdata/vhost-user-fs-fd-openfiles.x86_64-latest.virtiofsd0.args create mode 100644 tests/qemuxmlconfdata/vhost-user-fs-hugepages.x86_64-latest.virtiofsd0.args create mode 100644 tests/qemuxmlconfdata/vhost-user-fs-hugepages.x86_64-latest.virtiofsd1.args create mode 100644 tests/qemuxmlconfdata/vhost-user-fs-readonly.x86_64-latest.virtiofsd0.args
diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c index 7280176de1..aaca9b6c05 100644 --- a/tests/qemuxmlconftest.c +++ b/tests/qemuxmlconftest.c @@ -19,6 +19,8 @@ # include "qemu/qemu_passt.h" # include "qemu/qemu_process.h" # include "qemu/qemu_slirp.h" +# include "qemu/qemu_virtiofs.h" +# include "qemu/qemu_vhost_user.h" # include "datatypes.h" # include "conf/storage_conf.h" # include "virfilewrapper.h" @@ -456,6 +458,21 @@ testCompareXMLToArgvCreateArgs(virQEMUDriver *drv, vsockPriv->vhostfd = 6789; } + for (i = 0; i < vm->def->nfss; i++) { + unsigned long long ver = 0; + virDomainFSDef *fs = vm->def->fss[i]; + + virStringParseVersion(&ver, info->args.capsver, false); + + if (fs->fsdriver == VIR_DOMAIN_FS_DRIVER_TYPE_VIRTIOFS && !fs->sock) { + /* QEMU 8.0.0 was the first release without virtiofsd included */ + if (ver != 0 && ver < 8 * 1000 * 1000) + continue; + virBitmapSetBitExpand(fs->caps, QEMU_VHOST_USER_FS_FEATURE_SEPARATE_OPTIONS); + } + }
I also won't pretend that I understand why this is here (and yes, that *is* for a lack of trying). :-)
I think it's a sign of the comment being too laconic and/or missing commit message. How about: /* QEMU 8.0.0 was the first release without virtiofsd included. Assume that from that version, the Rust version of virtiofsd which supports separate options is used. */ and for the commit message: Fake the capabilities based on the QEMU version so that we can test the command line for both the C version of virtiofsd (removed in QEMU 8.0.0) and the Rust version. Jano
+ + for (i = 0; i < vm->def->ntpms; i++) { if (vm->def->tpms[i]->type != VIR_DOMAIN_TPM_TYPE_EMULATOR) continue;