qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Christophe de Dinechin" <dinechin@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	"Oleinik, Alexander" <alxndr@bu.edu>,
	"Pavel Dovgalyuk" <Pavel.Dovgaluk@ispras.ru>,
	"Artem Pisarenko" <artem.k.pisarenko@gmail.com>
Subject: Re: How to fuzz devices that use timers?
Date: Thu, 28 May 2020 12:43:04 +0200	[thread overview]
Message-ID: <dc0eed62-566a-3195-1f55-12f15a8ea04c@redhat.com> (raw)
In-Reply-To: <A624C443-3525-43A6-A221-BD29BE67B891@redhat.com>

On 28/05/20 11:52, Christophe de Dinechin wrote:
> 
> Since we run the fuzzer with the QTest accelerator, my first idea was to
> check for 'if (qtest_enabled())' in the timer code, and directly expire
> a timer instead of scheduling it. This way we can test reproducers.
> However various tests require/verify precise timing, so this would break
> various qtests.

There is a clock_step command that advance the QEMU_CLOCK_VIRTUAL clock
to the next deadline.  You just have to insert it into the fuzzing input.

Paolo



      reply	other threads:[~2020-05-28 10:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28  9:26 How to fuzz devices that use timers? Philippe Mathieu-Daudé
2020-05-28  9:52 ` Christophe de Dinechin
2020-05-28 10:43   ` Paolo Bonzini [this message]

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=dc0eed62-566a-3195-1f55-12f15a8ea04c@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=Pavel.Dovgaluk@ispras.ru \
    --cc=alex.bennee@linaro.org \
    --cc=alxndr@bu.edu \
    --cc=artem.k.pisarenko@gmail.com \
    --cc=dgilbert@redhat.com \
    --cc=dinechin@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).