From: Thomas Huth <thuth@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>, mst@redhat.com
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCHv2 2/4] tests/pxe-test: Use table of testcases rather than open-coding
Date: Mon, 18 Dec 2017 11:34:07 +0100 [thread overview]
Message-ID: <c791d1f7-d10c-9c8e-70d1-b600125d859f@redhat.com> (raw)
In-Reply-To: <20171218100404.4427-3-david@gibson.dropbear.id.au>
On 18.12.2017 11:04, David Gibson wrote:
> Currently pxe-tests open codes the list of tests for each architecture.
> This changes it to use tables of test parameters, somewhat similar to
> boot-serial-test.
>
> This adds the machine type into the table as well, giving us the ability
> to perform tests on multiple machine types for architectures where there's
> more than one machine type that matters.
>
> NOTE: This changes the names of the tests in the output, to include the
> machine type and IPv4 vs. IPv6. I'm not sure if this has the
> potential to break existing tooling.
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> tests/pxe-test.c | 87 ++++++++++++++++++++++++++++++++++++++++++--------------
> 1 file changed, 65 insertions(+), 22 deletions(-)
>
> diff --git a/tests/pxe-test.c b/tests/pxe-test.c
> index eb70aa2bc6..8c310a8129 100644
> --- a/tests/pxe-test.c
> +++ b/tests/pxe-test.c
> @@ -22,14 +22,52 @@
>
> static char disk[] = "tests/pxe-test-disk-XXXXXX";
>
> -static void test_pxe_one(const char *params, bool ipv6)
> +typedef struct testdef {
> + const char *machine; /* Machine type */
> + const char *model; /* NIC device model */
> + const char *devopts; /* Device options */
> +} testdef_t;
[...]
> +static testdef_t s390x_tests[] = {
> + { "s390-ccw-virtio", "virtio-net-ccw", ",bootindex=1" },
> + { NULL },
> +};
> +
> +static void test_pxe_one(const testdef_t *test, bool ipv6)
> {
> char *args;
>
> - args = g_strdup_printf("-machine accel=kvm:tcg -nodefaults -boot order=n "
> - "-netdev user,id=" NETNAME ",tftp=./,bootfile=%s,"
> - "ipv4=%s,ipv6=%s %s", disk, ipv6 ? "off" : "on",
> - ipv6 ? "on" : "off", params);
> + args = g_strdup_printf(
> + "-machine %s,accel=kvm:tcg -nodefaults -boot order=n "
> + "-netdev user,id=" NETNAME ",tftp=./,bootfile=%s,ipv4=%s,ipv6=%s "
> + "-device %s%s,netdev=" NETNAME,
> + test->machine, disk, ipv6 ? "off" : "on", ipv6 ? "on" : "off",
> + test->model, test->devopts ? test->devopts : "");
Looking at this again, I think we could also simply always add the
"bootindex=1" to the args string - this should not hurt, rather might
help to boot faster, and then you could get rid of the"devopts" field in
the testdef_t struct.
Anyway, with or without that modification:
Reviewed-by: Thomas Huth <thuth@redhat.com>
next prev parent reply other threads:[~2017-12-18 10:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-18 10:04 [Qemu-devel] [PATCHv2 0/4] Improvements to pxe-test David Gibson
2017-12-18 10:04 ` [Qemu-devel] [PATCHv2 1/4] tests/pxe-test: Remove unnecessary special case test functions David Gibson
2017-12-18 10:04 ` [Qemu-devel] [PATCHv2 2/4] tests/pxe-test: Use table of testcases rather than open-coding David Gibson
2017-12-18 10:34 ` Thomas Huth [this message]
2017-12-19 4:42 ` David Gibson
2017-12-18 10:04 ` [Qemu-devel] [PATCHv2 3/4] tests/pxe-test: Test net booting over IPv6 in some cases David Gibson
2017-12-18 10:35 ` Thomas Huth
2017-12-18 10:04 ` [Qemu-devel] [PATCHv2 4/4] tests/pxe-test: Add some extra tests David Gibson
2017-12-18 10:39 ` Thomas Huth
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=c791d1f7-d10c-9c8e-70d1-b600125d859f@redhat.com \
--to=thuth@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/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).