On Thu, Jun 05, 2025 at 20:09:22 -0400, Aaron M. Brown wrote:
Please describe the configuration that this is testing in the commit
messsage.
Signed-off-by: Aaron M. Brown <aaronmbr(a)linux.ibm.com>
---
...onsole-virtio-vioserial.x86_64-latest.args | 44 +++++++++++++
...console-virtio-vioserial.x86_64-latest.xml | 63 +++++++++++++++++++
.../console-virtio-vioserial.xml | 48 ++++++++++++++
tests/qemuxmlconftest.c | 1 +
4 files changed, 156 insertions(+)
create mode 100644 tests/qemuxmlconfdata/console-virtio-vioserial.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/console-virtio-vioserial.x86_64-latest.xml
create mode 100644 tests/qemuxmlconfdata/console-virtio-vioserial.xml
qemuxmlconftest fails after applying this patch. Note that build
including test suite must be successful after each patch:
https://www.libvirt.org/hacking.html#preparing-patches
"If you're going to submit multiple patches, the automated tests must
pass after each patch, not just after the last one."
But the good thing is that this patch will actually show what the
difference will be and will make good example what your patch is fixing.
To comply with the above you'll need to regenerate output after this
patch, thus having broken [1] outputs as example until the patch that
actually fixes it.
Please describe in the commit message what's wrong with the test data.
[1] The diff to make this pass tests is:
diff --git a/tests/qemuxmlconfdata/console-virtio-vioserial.x86_64-latest.args
b/tests/qemuxmlconfdata/console-virtio-vioserial.x86_64-latest.args
index d317b3bf3a..f987168477 100644
--- a/tests/qemuxmlconfdata/console-virtio-vioserial.x86_64-latest.args
+++ b/tests/qemuxmlconfdata/console-virtio-vioserial.x86_64-latest.args
@@ -33,11 +33,11 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-chardev pty,id=charserial0 \
-device
'{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}'
\
-chardev pty,id=charconsole1 \
--device
'{"driver":"virtconsole","bus":"virtio-serial0.0","nr":1,"chardev":"charconsole1","id":"console1"}'
\
+-device
'{"driver":"virtconsole","bus":"virtio-serial0.0","nr":0,"chardev":"charconsole1","id":"console1"}'
\
-chardev pty,id=charconsole2 \
--device
'{"driver":"virtconsole","bus":"virtio-serial0.0","nr":2,"chardev":"charconsole2","id":"console2"}'
\
+-device
'{"driver":"virtconsole","bus":"virtio-serial0.0","nr":0,"chardev":"charconsole2","id":"console2"}'
\
-chardev pty,id=charconsole3 \
--device
'{"driver":"virtconsole","bus":"virtio-serial0.0","nr":3,"chardev":"charconsole3","id":"console3"}'
\
+-device
'{"driver":"virtconsole","bus":"virtio-serial0.0","nr":0,"chardev":"charconsole3","id":"console3"}'
\
-audiodev
'{"id":"audio1","driver":"none"}' \
-device
'{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}'
\
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
diff --git a/tests/qemuxmlconfdata/console-virtio-vioserial.x86_64-latest.xml
b/tests/qemuxmlconfdata/console-virtio-vioserial.x86_64-latest.xml
index c63a950ea0..acee9999af 100644
--- a/tests/qemuxmlconfdata/console-virtio-vioserial.x86_64-latest.xml
+++ b/tests/qemuxmlconfdata/console-virtio-vioserial.x86_64-latest.xml
@@ -43,15 +43,15 @@
</console>
<console type='pty'>
<target type='virtio' port='1'/>
- <address type='virtio-serial' controller='0' bus='0'
port='1'/>
+ <address type='virtio-serial' controller='0' bus='0'
port='0'/>
</console>
<console type='pty'>
<target type='virtio' port='2'/>
- <address type='virtio-serial' controller='0' bus='0'
port='2'/>
+ <address type='virtio-serial' controller='0' bus='0'
port='0'/>
</console>
<console type='pty'>
<target type='virtio' port='3'/>
- <address type='virtio-serial' controller='0' bus='0'
port='3'/>
+ <address type='virtio-serial' controller='0' bus='0'
port='0'/>
</console>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
Which shows that we'd assign port 0 to everything.