Re: [PATCH kvm-unit-tests] arm: Add PL031 test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 11 Jul 2019 09:52:42 +0200
Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:

Hi,

> On 11/07/19 07:49, Alexander Graf wrote:
> >> I agree that it would belong more in qtest, but tests in not exactly the
> >> right place is better than no tests.  
> > 
> > The problem with qtest is that it tests QEMU device models from a QEMU
> > internal view.  
> 
> Not really: fundamentally it tests QEMU device models with stimuli that
> come from another process in the host, rather than code that runs in a
> guest.  It does have hooks into QEMU's internal view (mostly to
> intercept interrupts and advance the clocks), but the main feature of
> the protocol is the ability to do memory reads and writes.
> 
> > I am much more interested in the guest visible side of things. If
> > kvmtool wanted to implement a PL031, it should be able to execute the
> > same test that we run against QEMU, no?  

One of the design goals of kvmtool is to get away with as little emulation
as possible, in favour of paravirtualisation (so it's just virtio and not
IDE/flash). So a hardware RTC emulation sounds dispensable in this context.
 
> Well, kvmtool could also implement the qtest protocol; perhaps it should
> (probably as a different executable that shares the device models with
> the main kvmtool executable).  There would still be issues in reusing
> code from the QEMU tests, since it has references to QEMU command line
> options.

I had some patches to better abstract kvm-unit-tests from QEMU, basically
by splitting up extra_params into more generic options like memsize and
command_line, then translating them.
Sounds like the time to revive them.

> > If kvm-unit-test is the wrong place for it, we would probably want to
> > have a separate testing framework for guest side unit tests targeting
> > emulated devices.
> > 
> > Given how nice the kvm-unit-test framework is though, I'd rather rename
> > it to "virt-unit-test" than reinvent the wheel :).  
> 
> Definitely, or even just "hwtest". :)  With my QEMU hat I would prefer
> the test to be a qtest, but with my kvm-unit-tests hat on I see no
> reason to reject this test.  Sorry if this was not clear.

Fair enough, at the moment we have to trigger kvmtool tests manually
anyway. Just wanted to know what the idea is here, which I think you
answered.

Thanks,
Andre.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux