On Fri, Oct 16, 2026 at 10:15:05AM +0200, Michal Prívozník wrote:
> On 10/15/26 17:07, Magnus Kulke wrote:
> > On Thu, Oct 15, 2026 at 01:57:05PM +0200, Michal Prívozník wrote:
> >> On 10/12/26 13:20, Magnus Kulke wrote:
> >> I see where you're coming from, but this is not the correct test. This
> >> should be another test case (or an existing one modified) to
> >> qemuxmlconftest. There, mocking is used, i.e. there's an alternative
> >> implementation of qemuInterfaceOpenVhostNet() that's used from the test
> >> binary. Unfortunately, the alternative implementation does not honor the
> >> check from 1/2.
> >>
> > 
> >> We have two options here:
> >>
> >> 1) I'll merge just your first patch, or
> >> 2) I'll post patches to make test suite have the same check as the
> >> production code, and you'll rebase your patches on top.
> >>
> > 
> > thanks for the review. yes, I figured that there was a proper place to add
> > the test, but I didn't find it at first glance. I'm fine with dropping
> > the test commit and merging 1/2 (i.e. option 1). If I should add a test
> > case later once qemuxmlconftest is able to cover it, you can cc me.
> > 
> > best,
> > 
> > magnus
> 
> Alright, I've just merged the necessary change to the mock [1]. What you
> can do now is:
> 
> 1) have a patch before 1/2 that adds an <interface/> to
> tests/qemuxmlconfdata/mshv-x86_64-q35-headless.xml. For instance the
> following XML seems okay:
> 
> <interface type='ethernet'>
>   <mac address='52:54:00:e5:48:5a'/>
>   <model type='virtio'/>
>   <driver name='vhost' ioeventfd='on' queues='5'/>
> </interface>
> 
> Do not forget to regenerate other files after that:
> 
> VIR_TEST_REGENERATE_OUTPUT=1 ./qemuxmlconftest
> 
> 2) For your original patch 1/2, you'll need to change now duplicate if()
> statement inside of qemuInterfaceOpenVhostNet() in
> tests/qemuxml2argvmock.c. After this, you'll too need to regenerate the
> file, BUT the diff will show the original change in action.
> 
> Hope this helps.
> 
> Michal
> 
> 1:
> https://gitlab.com/libvirt/libvirt/-/commit/6e1a9eae6ed34cc3b902f5c6e7379a2aa5d002fc

ok, thanks. I think I understood, let me issue a v2.

Reply via email to