qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Lei Li <lilei@linux.vnet.ibm.com>
To: Stefan Weil <sw@weilnetz.de>, Richard Henderson <rth@twiddle.net>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [RFC] TCG unit testing
Date: Tue, 27 Aug 2013 11:18:52 +0800	[thread overview]
Message-ID: <521C1A9C.8070901@linux.vnet.ibm.com> (raw)
In-Reply-To: <5217C94F.6010607@weilnetz.de>

On 08/24/2013 04:42 AM, Stefan Weil wrote:
> Am 23.08.2013 21:47, schrieb Richard Henderson:
>> I've been thinking for a while about how to reliably test TCG backends, and
>> maybe how to do regression testing on them.  Having to begin the test from a
>> guest binary, especially considering the vast cross-compilation problem, is
>> pretty much a non-starter.
>>
>> I've been thinking of a truly stripped down target for the purpose, with a
>> special-purpose machine loop and main to go with it.  I.e. avoid vl.c.
>>
>> My current idea is that the test file consists of 3 sections: guest memory
>> layout, raw TBs, and expected results.  Perhaps best explained with some examples:
>>
>> (1a) I've split up this test into two TBs to prevent some constant folding.
>> (1b) The guest machine should have enough registers to make it easy to perform
>> lots of tests at once.  Even better if we can avoid the complication of memory.
>>
> [...]
>> Thoughts?  Anything that we ought to be testing that I haven't thought of here,
>> and that this sort of structure couldn't support?
>>
>> It may be some time before I can progress this enough to usefulness, but I
>> wanted to get this written down while it is fresh in my head.
>>
>>
>> r~
> Since the addition of the TCG interpreter backend, there exist two
> backends for each supported host. It is possible to run user code
> with well defined instruction order (no asynchronous events like
> interrupts) with both backends and to compare the execution
> flow. I did that while developing TCI. The process can be reversed:
> TCI could be used as reference to test any other backend.
>
> Another approach for testing TCG backends might work like this:
>
> Modifying QEMU so that it is possible to feed the TCG backend
> with single TCG opcodes would allow testing some part of the
> processing chain:
>
> target opcodes -> tcg opcodes -> host opcodes
>                    <------------------------->

Really nice if we could support this!

>
> Regards,
> Stefan
>
>


-- 
Lei

  parent reply	other threads:[~2013-08-27  3:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-23 19:47 [Qemu-devel] [RFC] TCG unit testing Richard Henderson
2013-08-23 20:42 ` Stefan Weil
2013-08-23 21:18   ` Richard Henderson
2013-08-25 17:13     ` Peter Maydell
2013-08-25 19:45     ` Stefan Weil
2013-09-10 21:34     ` [Qemu-devel] [RFC] TCI for ARM and other hosts with aligned args (was: Re: [RFC] TCG unit testing) Stefan Weil
2013-09-10 21:52       ` [Qemu-devel] [RFC] TCI for ARM and other hosts with aligned args Richard Henderson
2013-09-10 22:04         ` Stefan Weil
2013-09-10 22:22           ` Peter Maydell
2013-09-11  5:05             ` Stefan Weil
2013-09-10 21:57       ` [Qemu-devel] [RFC] TCI for ARM and other hosts with aligned args (was: Re: [RFC] TCG unit testing) Peter Maydell
2013-08-27  3:18   ` Lei Li [this message]
2013-09-02 16:07 ` [Qemu-devel] [RFC] TCG unit testing Aurelien Jarno
2013-09-07  2:38   ` Rob Landley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=521C1A9C.8070901@linux.vnet.ibm.com \
    --to=lilei@linux.vnet.ibm.com \
    --cc=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).