Skip to content

Commit

Permalink
tests/fuzz: Extract ioport_fuzz_qtest() method
Browse files Browse the repository at this point in the history
Extract generic ioport_fuzz_qtest() method from
i440fx_fuzz_qtest(). This will help to write tests
not specific to the i440FX controller.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200514143433.18569-7-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  • Loading branch information
philmd authored and stefanhaRH committed May 15, 2020
1 parent 84cb0a6 commit 6fb5f08
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/qtest/fuzz/i440fx_fuzz.c
Expand Up @@ -39,7 +39,7 @@ enum action_id {
ACTION_MAX
};

static void i440fx_fuzz_qtest(QTestState *s,
static void ioport_fuzz_qtest(QTestState *s,
const unsigned char *Data, size_t Size) {
/*
* loop over the Data, breaking it up into actions. each action has an
Expand Down Expand Up @@ -84,10 +84,17 @@ static void i440fx_fuzz_qtest(QTestState *s,
flush_events(s);
}

static void i440fx_fuzz_qtest(QTestState *s,
const unsigned char *Data,
size_t Size)
{
ioport_fuzz_qtest(s, Data, Size);
}

static void pciconfig_fuzz_qos(QTestState *s, QPCIBus *bus,
const unsigned char *Data, size_t Size) {
/*
* Same as i440fx_fuzz_qtest, but using QOS. devfn is incorporated into the
* Same as ioport_fuzz_qtest, but using QOS. devfn is incorporated into the
* value written over Port IO
*/
struct {
Expand Down

0 comments on commit 6fb5f08

Please sign in to comment.