From: David Gibson <david@gibson.dropbear.id.au>
To: Laurent Vivier <lvivier@redhat.com>
Cc: qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>,
Thomas Huth <thuth@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] tests: minor cleanups in usb-hcd-uhci-test
Date: Fri, 7 Oct 2016 10:49:12 +1100 [thread overview]
Message-ID: <20161006234912.GF18490@umbus.fritz.box> (raw)
In-Reply-To: <1475765448-18949-1-git-send-email-lvivier@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2346 bytes --]
On Thu, Oct 06, 2016 at 04:50:48PM +0200, Laurent Vivier wrote:
> Two minor cleanups:
> - exit gracefully in case on unsupported target,
> - put machine command line in a constant to avoid
> to duplicate it.
>
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
I'm not sure if I should take this through my tree or not.
> ---
> tests/usb-hcd-uhci-test.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/tests/usb-hcd-uhci-test.c b/tests/usb-hcd-uhci-test.c
> index 4b951ce..e956b9c 100644
> --- a/tests/usb-hcd-uhci-test.c
> +++ b/tests/usb-hcd-uhci-test.c
> @@ -77,6 +77,9 @@ static void test_usb_storage_hotplug(void)
> int main(int argc, char **argv)
> {
> const char *arch = qtest_get_arch();
> + const char *cmd = "-device piix3-usb-uhci,id=uhci,addr=1d.0"
> + " -drive id=drive0,if=none,file=/dev/null,format=raw"
> + " -device usb-tablet,bus=uhci.0,port=1";
> int ret;
>
> g_test_init(&argc, &argv, NULL);
> @@ -87,13 +90,13 @@ int main(int argc, char **argv)
> qtest_add_func("/uhci/pci/hotplug/usb-storage", test_usb_storage_hotplug);
>
> if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
> - qs = qtest_pc_boot("-device piix3-usb-uhci,id=uhci,addr=1d.0"
> - " -drive id=drive0,if=none,file=/dev/null,format=raw"
> - " -device usb-tablet,bus=uhci.0,port=1");
> + qs = qtest_pc_boot(cmd);
> } else if (strcmp(arch, "ppc64") == 0) {
> - qs = qtest_spapr_boot("-device piix3-usb-uhci,id=uhci,addr=1d.0"
> - " -drive id=drive0,if=none,file=/dev/null,format=raw"
> - " -device usb-tablet,bus=uhci.0,port=1");
> + qs = qtest_spapr_boot(cmd);
> + } else {
> + g_printerr("usb-hcd-uhci-test tests are only "
> + "available on x86 or ppc64\n");
> + exit(EXIT_FAILURE);
> }
> ret = g_test_run();
> qtest_shutdown(qs);
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-10-07 0:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-06 14:50 [Qemu-devel] [PATCH] tests: minor cleanups in usb-hcd-uhci-test Laurent Vivier
2016-10-06 23:49 ` David Gibson [this message]
2016-10-07 8:40 ` Gerd Hoffmann
2016-10-08 8:27 ` David Gibson
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=20161006234912.GF18490@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=kraxel@redhat.com \
--cc=lvivier@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.