* [Qemu-devel] QTest with TCG?
@ 2013-04-15 18:23 Edgar E. Iglesias
2013-04-15 19:03 ` Anthony Liguori
0 siblings, 1 reply; 4+ messages in thread
From: Edgar E. Iglesias @ 2013-04-15 18:23 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, anthony
Hi,
I would like to use qtest for testing hw-models in combination with firmware.
At the moment I'm using the following patch to allow qtest to run without
accel=qtest. I'm mostly interested in the mem access functions and the
interrupt interception. I guess time stepping wouldnt work without
accel=qtest, but maybe that could be an acceptable limitation.
Is there anything in principle with such a setup that would cause problems?
Thanks,
Edgar
commit 947414a56e256139a510a034c02ac277ad577272
Author: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Date: Wed Apr 10 20:32:17 2013 +0200
Allow qtest to be used together with a virtual CPU
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
diff --git a/vl.c b/vl.c
index c566caf..0dbac29 100644
--- a/vl.c
+++ b/vl.c
@@ -4143,6 +4143,10 @@ int main(int argc, char **argv, char **envp)
configure_accelerator();
+ if (!qtest_enabled() && qtest_chrdev) {
+ qtest_init();
+ }
+
machine_opts = qemu_opts_find(qemu_find_opts("machine"), 0);
if (machine_opts) {
kernel_filename = qemu_opt_get(machine_opts, "kernel");
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] QTest with TCG?
2013-04-15 18:23 [Qemu-devel] QTest with TCG? Edgar E. Iglesias
@ 2013-04-15 19:03 ` Anthony Liguori
2013-04-16 5:11 ` Paolo Bonzini
0 siblings, 1 reply; 4+ messages in thread
From: Anthony Liguori @ 2013-04-15 19:03 UTC (permalink / raw)
To: Edgar E. Iglesias, qemu-devel; +Cc: Paolo Bonzini
"Edgar E. Iglesias" <edgar.iglesias@gmail.com> writes:
> Hi,
>
> I would like to use qtest for testing hw-models in combination with firmware.
>
> At the moment I'm using the following patch to allow qtest to run without
> accel=qtest. I'm mostly interested in the mem access functions and the
> interrupt interception. I guess time stepping wouldnt work without
> accel=qtest, but maybe that could be an acceptable limitation.
>
> Is there anything in principle with such a setup that would cause
> problems?
Interesting. No, I can't think of any problems in principle with doing
this. It was not a use case I had considered.
Regards,
Anthony Liguori
>
> Thanks,
> Edgar
>
>
> commit 947414a56e256139a510a034c02ac277ad577272
> Author: Edgar E. Iglesias <edgar.iglesias@gmail.com>
> Date: Wed Apr 10 20:32:17 2013 +0200
>
> Allow qtest to be used together with a virtual CPU
>
> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
>
> diff --git a/vl.c b/vl.c
> index c566caf..0dbac29 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -4143,6 +4143,10 @@ int main(int argc, char **argv, char **envp)
>
> configure_accelerator();
>
> + if (!qtest_enabled() && qtest_chrdev) {
> + qtest_init();
> + }
> +
> machine_opts = qemu_opts_find(qemu_find_opts("machine"), 0);
> if (machine_opts) {
> kernel_filename = qemu_opt_get(machine_opts, "kernel");
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] QTest with TCG?
2013-04-15 19:03 ` Anthony Liguori
@ 2013-04-16 5:11 ` Paolo Bonzini
2013-04-16 7:48 ` Edgar E. Iglesias
0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2013-04-16 5:11 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Edgar E. Iglesias, qemu-devel
Il 15/04/2013 21:03, Anthony Liguori ha scritto:
> "Edgar E. Iglesias" <edgar.iglesias@gmail.com> writes:
>
>> Hi,
>>
>> I would like to use qtest for testing hw-models in combination with firmware.
>>
>> At the moment I'm using the following patch to allow qtest to run without
>> accel=qtest. I'm mostly interested in the mem access functions and the
>> interrupt interception. I guess time stepping wouldnt work without
>> accel=qtest, but maybe that could be an acceptable limitation.
Yes, but using "-icount" would provide more reproducibility perhaps.
>> Is there anything in principle with such a setup that would cause
>> problems?
>
> Interesting. No, I can't think of any problems in principle with doing
> this. It was not a use case I had considered.
Just one thing, how would you synchronize between the firmware and the
testcase?
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] QTest with TCG?
2013-04-16 5:11 ` Paolo Bonzini
@ 2013-04-16 7:48 ` Edgar E. Iglesias
0 siblings, 0 replies; 4+ messages in thread
From: Edgar E. Iglesias @ 2013-04-16 7:48 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, Anthony Liguori
On Tue, Apr 16, 2013 at 07:11:43AM +0200, Paolo Bonzini wrote:
> Il 15/04/2013 21:03, Anthony Liguori ha scritto:
> > "Edgar E. Iglesias" <edgar.iglesias@gmail.com> writes:
> >
> >> Hi,
> >>
> >> I would like to use qtest for testing hw-models in combination with firmware.
> >>
> >> At the moment I'm using the following patch to allow qtest to run without
> >> accel=qtest. I'm mostly interested in the mem access functions and the
> >> interrupt interception. I guess time stepping wouldnt work without
> >> accel=qtest, but maybe that could be an acceptable limitation.
>
> Yes, but using "-icount" would provide more reproducibility perhaps.
Yes, thanks.
>
> >> Is there anything in principle with such a setup that would cause
> >> problems?
> >
> > Interesting. No, I can't think of any problems in principle with doing
> > this. It was not a use case I had considered.
>
> Just one thing, how would you synchronize between the firmware and the
> testcase?
I guess there are various ways depending on the hw/fw setup.
An example is an on chip subsystem with a remote CPU, FW and a collection
of local devices that expose an well defined interface to the rest
of the system. Maybe through specific IPC fifos or by shared
memory. Normally, other CPUs on the system would request operations
through this interface, but in my case I decouple it so that
qtest based testsuites can bang on the interface. So the interface
itself dictates the sync mechanism.
I'm still WIP with this, but currently I'm using a python based
test infrastrucutre and communicating with the DUT through
SHM. Something like a stripped down dumb version of virtio.
Best regards,
Edgar
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-04-16 7:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-15 18:23 [Qemu-devel] QTest with TCG? Edgar E. Iglesias
2013-04-15 19:03 ` Anthony Liguori
2013-04-16 5:11 ` Paolo Bonzini
2013-04-16 7:48 ` Edgar E. Iglesias
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).