]> Git Repo - qemu.git/blame - tests/eepro100-test.c
Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging
[qemu.git] / tests / eepro100-test.c
CommitLineData
92838a19
AF
1/*
2 * QTest testcase for eepro100 NIC
3 *
4 * Copyright (c) 2013-2014 SUSE LINUX Products GmbH
5 *
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
8 */
9
681c28a3 10#include "qemu/osdep.h"
92838a19 11#include <glib.h>
92838a19 12#include "libqtest.h"
92838a19
AF
13
14static void test_device(gconstpointer data)
15{
16 const char *model = data;
17 QTestState *s;
18 char *args;
19
20 args = g_strdup_printf("-device %s", model);
21 s = qtest_start(args);
22
23 /* Tests only initialization so far. TODO: Implement functional tests */
24
25 if (s) {
26 qtest_quit(s);
27 }
28 g_free(args);
29}
30
31static const char *models[] = {
32 "i82550",
33 "i82551",
34 "i82557a",
35 "i82557b",
36 "i82557c",
37 "i82558a",
38 "i82558b",
39 "i82559a",
40 "i82559b",
41 "i82559c",
42 "i82559er",
43 "i82562",
44 "i82801",
45};
46
47int main(int argc, char **argv)
48{
49 int i;
50
51 g_test_init(&argc, &argv, NULL);
52
53 for (i = 0; i < ARRAY_SIZE(models); i++) {
54 char *path;
55
53f77e45
AF
56 path = g_strdup_printf("eepro100/%s", models[i]);
57 qtest_add_data_func(path, models[i], test_device);
92838a19
AF
58 }
59
60 return g_test_run();
61}
This page took 0.105136 seconds and 4 git commands to generate.