* qtest with multiple driver instances
@ 2020-09-24 11:57 Christian Schoenebeck
2020-09-24 13:50 ` Thomas Huth
0 siblings, 1 reply; 5+ messages in thread
From: Christian Schoenebeck @ 2020-09-24 11:57 UTC (permalink / raw)
To: qemu-devel; +Cc: Thomas Huth, Laurent Vivier, Greg Kurz
Hi,
I'm currently puzzled with what looks like a limitation of the qtest
infrastructure: am I right that it's not possible to use multiple instances of
the same driver with qtests?
Purpose: I need to add test cases for the 9p 'local' fs driver. So far we only
have 9p qtests using the 'synth' fs driver. The problem is, both driver
instances would pop up with the same QEMU driver name ("virtio-9p-pci"), and
AFAICS qtests in general reference their driver instance by driver name only,
which must be a) a unique driver name and b) must match the official QEMU
driver name and c) all qtest driver instances are in a global space for all
qtests.
Is there any workaround or something that I didn't see? Like letting qtests
reference a driver instance by PCI address or something?
Right now the only option that I see is a hack: forcing one driver instance to
use a different bus system like e.g. -> "virtio-9p-ccw" vs. "virtio-9p-pci".
Any hint appreciated!
Best regards,
Christian Schoenebeck
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: qtest with multiple driver instances
2020-09-24 11:57 qtest with multiple driver instances Christian Schoenebeck
@ 2020-09-24 13:50 ` Thomas Huth
2020-09-24 14:06 ` Christian Schoenebeck
2020-09-24 14:27 ` Paolo Bonzini
0 siblings, 2 replies; 5+ messages in thread
From: Thomas Huth @ 2020-09-24 13:50 UTC (permalink / raw)
To: Christian Schoenebeck, qemu-devel
Cc: Laurent Vivier, Paolo Bonzini, Emanuele Giuseppe Esposito, Greg Kurz
On 24/09/2020 13.57, Christian Schoenebeck wrote:
> Hi,
>
> I'm currently puzzled with what looks like a limitation of the qtest
> infrastructure: am I right that it's not possible to use multiple instances of
> the same driver with qtests?
>
> Purpose: I need to add test cases for the 9p 'local' fs driver. So far we only
> have 9p qtests using the 'synth' fs driver. The problem is, both driver
> instances would pop up with the same QEMU driver name ("virtio-9p-pci"), and
> AFAICS qtests in general reference their driver instance by driver name only,
> which must be a) a unique driver name and b) must match the official QEMU
> driver name and c) all qtest driver instances are in a global space for all
> qtests.
>
> Is there any workaround or something that I didn't see? Like letting qtests
> reference a driver instance by PCI address or something?
>
> Right now the only option that I see is a hack: forcing one driver instance to
> use a different bus system like e.g. -> "virtio-9p-ccw" vs. "virtio-9p-pci".
>
> Any hint appreciated!
I assume you are referring to the "qos" framework within the qtests? I
hope Laurent, Paolo or Emanuele can help with that question (now all on
CC:)...
Thomas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: qtest with multiple driver instances
2020-09-24 13:50 ` Thomas Huth
@ 2020-09-24 14:06 ` Christian Schoenebeck
2020-09-24 14:27 ` Paolo Bonzini
1 sibling, 0 replies; 5+ messages in thread
From: Christian Schoenebeck @ 2020-09-24 14:06 UTC (permalink / raw)
To: qemu-devel
Cc: Thomas Huth, Laurent Vivier, Paolo Bonzini,
Emanuele Giuseppe Esposito, Greg Kurz
On Donnerstag, 24. September 2020 15:50:43 CEST Thomas Huth wrote:
> On 24/09/2020 13.57, Christian Schoenebeck wrote:
> > Hi,
> >
> > I'm currently puzzled with what looks like a limitation of the qtest
> > infrastructure: am I right that it's not possible to use multiple
> > instances of the same driver with qtests?
> >
> > Purpose: I need to add test cases for the 9p 'local' fs driver. So far we
> > only have 9p qtests using the 'synth' fs driver. The problem is, both
> > driver instances would pop up with the same QEMU driver name
> > ("virtio-9p-pci"), and AFAICS qtests in general reference their driver
> > instance by driver name only, which must be a) a unique driver name and
> > b) must match the official QEMU driver name and c) all qtest driver
> > instances are in a global space for all qtests.
> >
> > Is there any workaround or something that I didn't see? Like letting
> > qtests
> > reference a driver instance by PCI address or something?
> >
> > Right now the only option that I see is a hack: forcing one driver
> > instance to use a different bus system like e.g. -> "virtio-9p-ccw" vs.
> > "virtio-9p-pci".
> >
> > Any hint appreciated!
>
> I assume you are referring to the "qos" framework within the qtests? I
> hope Laurent, Paolo or Emanuele can help with that question (now all on
> CC:)...
>
> Thomas
Yes, it looks like it is based on the qos subsystem underneath, i.e.:
tests/qtest/libqos/qgraph.h
Maybe I can use qos_node_contains() to make 2 "virtio-9p-pci" driver instances
accessible for different qtests? It just seems there is no existing code doing
that already, otherwise I could just copy & paste.
Best regards,
Christian Schoenebeck
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: qtest with multiple driver instances
2020-09-24 13:50 ` Thomas Huth
2020-09-24 14:06 ` Christian Schoenebeck
@ 2020-09-24 14:27 ` Paolo Bonzini
2020-09-24 17:39 ` Christian Schoenebeck
1 sibling, 1 reply; 5+ messages in thread
From: Paolo Bonzini @ 2020-09-24 14:27 UTC (permalink / raw)
To: Thomas Huth, Christian Schoenebeck, qemu-devel
Cc: Laurent Vivier, Emanuele Giuseppe Esposito, Greg Kurz
On 24/09/20 15:50, Thomas Huth wrote:
>> Is there any workaround or something that I didn't see? Like letting qtests
>> reference a driver instance by PCI address or something?
The simplest way around this limitation is to move the -fsdev option
from the .before_cmd_line of the virtio-9p-*'s nodes to the .before
function of the test. You can see an example in qtest/virtio-net-test.c.
It was done like this in virtio-9p simply because we only needed synth
fsdevs.
Paolo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: qtest with multiple driver instances
2020-09-24 14:27 ` Paolo Bonzini
@ 2020-09-24 17:39 ` Christian Schoenebeck
0 siblings, 0 replies; 5+ messages in thread
From: Christian Schoenebeck @ 2020-09-24 17:39 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Thomas Huth, Laurent Vivier,
Emanuele Giuseppe Esposito, Greg Kurz
On Donnerstag, 24. September 2020 16:27:53 CEST Paolo Bonzini wrote:
> On 24/09/20 15:50, Thomas Huth wrote:
> >> Is there any workaround or something that I didn't see? Like letting
> >> qtests
> >> reference a driver instance by PCI address or something?
>
> The simplest way around this limitation is to move the -fsdev option
> from the .before_cmd_line of the virtio-9p-*'s nodes to the .before
> function of the test. You can see an example in qtest/virtio-net-test.c.
Hmm, I keep that in mind. I first try though whether I can make a workaround
by assigning a custom name to .edge_name (QOSGraphEdgeOptions) for each device
instance. I have a feeling this might be simpler.
Thanks Paolo!
Best regards,
Christian Schoenebeck
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-09-24 17:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-24 11:57 qtest with multiple driver instances Christian Schoenebeck
2020-09-24 13:50 ` Thomas Huth
2020-09-24 14:06 ` Christian Schoenebeck
2020-09-24 14:27 ` Paolo Bonzini
2020-09-24 17:39 ` Christian Schoenebeck
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.