diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-06-09 15:00:21 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-06-09 15:00:21 +0100 |
commit | 4a331bb33bdf112ba95470e5d6ea3561b049c280 (patch) | |
tree | 02ceecff81d33e73b19fd2dc38eb7a8e78a19ea2 /tests | |
parent | 5dfc05cb1d342f081df7009703559b29dadc33e9 (diff) | |
parent | 7efea763772c815ad6220d5ea7a46447329f6015 (diff) |
Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into staging
Net patches
# gpg: Signature made Mon 09 Jun 2014 14:41:34 BST using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>"
* remotes/stefanha/tags/net-pull-request:
e1000: remove broken support for 82573L
tests: e1000: test additional device IDs
e1000: allow command-line selection of card model
vmxnet3: fix msix vectors unuse
net: xilinx_ethlite: Fix Rx-pong interrupt
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/e1000-test.c | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/tests/e1000-test.c b/tests/e1000-test.c index a8ba2fc0a8..81f164d9e9 100644 --- a/tests/e1000-test.c +++ b/tests/e1000-test.c @@ -13,21 +13,40 @@ #include "qemu/osdep.h" /* Tests only initialization so far. TODO: Replace with functional tests */ -static void nop(void) +static void test_device(gconstpointer data) { + const char *model = data; + QTestState *s; + char *args; + + args = g_strdup_printf("-device %s", model); + s = qtest_start(args); + + if (s) { + qtest_quit(s); + } + g_free(args); } +static const char *models[] = { + "e1000", + "e1000-82540em", + "e1000-82544gc", + "e1000-82545em", +}; + int main(int argc, char **argv) { - int ret; + int i; g_test_init(&argc, &argv, NULL); - qtest_add_func("/e1000/nop", nop); - qtest_start("-device e1000"); - ret = g_test_run(); + for (i = 0; i < ARRAY_SIZE(models); i++) { + char *path; - qtest_end(); + path = g_strdup_printf("/%s/e1000/%s", qtest_get_arch(), models[i]); + g_test_add_data_func(path, models[i], test_device); + } - return ret; + return g_test_run(); } |