]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxmlconftest: Add missing test for <readonly> attribute of p9-fs devices
authorPeter Krempa <pkrempa@redhat.com>
Mon, 23 Mar 2026 07:57:00 +0000 (08:57 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 24 Mar 2026 16:58:42 +0000 (17:58 +0100)
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/qemuxmlconfdata/fs9p.x86_64-latest.args
tests/qemuxmlconfdata/fs9p.x86_64-latest.xml
tests/qemuxmlconfdata/fs9p.xml

index ece83b6b24f0d23f8179856d1683c1bd3fbd37a6..d1505cce80fba904bbcd844c90a17f1587ad2b16 100644 (file)
@@ -30,6 +30,8 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -device '{"driver":"virtio-9p-pci","id":"fs0","fsdev":"fsdev-fs0","mount_tag":"/import/from/host","bus":"pci.0","addr":"0x2"}' \
 -fsdev local,security_model=mapped,writeout=immediate,id=fsdev-fs1,path=/export/to/guest2 \
 -device '{"driver":"virtio-9p-pci","id":"fs1","fsdev":"fsdev-fs1","mount_tag":"/import/from/host2","bus":"pci.0","addr":"0x3"}' \
+-fsdev local,security_model=mapped,id=fsdev-fs2,path=/export/to/guest-ro,readonly=on \
+-device '{"driver":"virtio-9p-pci","id":"fs2","fsdev":"fsdev-fs2","mount_tag":"/import/from/host-ro","bus":"pci.0","addr":"0x4"}' \
 -audiodev '{"id":"audio1","driver":"none"}' \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
index 91cb445c9fb6a4f8bbb8d823be4dfbfe923ca2cc..f313247eab193c23d7573de7d4629a9eeeef1a18 100644 (file)
       <target dir='/import/from/host2'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </filesystem>
+    <filesystem type='mount' accessmode='mapped'>
+      <driver type='path'/>
+      <source dir='/export/to/guest-ro'/>
+      <target dir='/import/from/host-ro'/>
+      <readonly/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+    </filesystem>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <audio id='1' type='none'/>
index b7475c9f94a1a6e05c6bc84bc5ef72bf3f65e5ed..c82039a9e4a45809ecead2df2a49b81f0dd790b9 100644 (file)
       <source dir='/export/to/guest2'/>
       <target dir='/import/from/host2'/>
     </filesystem>
+    <filesystem accessmode='mapped'>
+      <driver type='path'/>
+      <source dir='/export/to/guest-ro'/>
+      <target dir='/import/from/host-ro'/>
+      <readonly/>
+    </filesystem>
     <memballoon model='none'/>
   </devices>
 </domain>