virt-acpi-build: add always-on property for timer
[qemu/ar7.git] / tests / e1000-test.c
blob7ca6d7e72efbb49db2597652f24389671f70577b
1 /*
2 * QTest testcase for e1000 NIC
4 * Copyright (c) 2013-2014 SUSE LINUX Products GmbH
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 */
10 #include <glib.h>
11 #include <string.h>
12 #include "libqtest.h"
13 #include "qemu/osdep.h"
15 /* Tests only initialization so far. TODO: Replace with functional tests */
16 static void test_device(gconstpointer data)
18 const char *model = data;
19 QTestState *s;
20 char *args;
22 args = g_strdup_printf("-device %s", model);
23 s = qtest_start(args);
25 if (s) {
26 qtest_quit(s);
28 g_free(args);
31 static const char *models[] = {
32 "e1000",
33 "e1000-82540em",
34 "e1000-82544gc",
35 "e1000-82545em",
38 int main(int argc, char **argv)
40 int i;
42 g_test_init(&argc, &argv, NULL);
44 for (i = 0; i < ARRAY_SIZE(models); i++) {
45 char *path;
47 path = g_strdup_printf("e1000/%s", models[i]);
48 qtest_add_data_func(path, models[i], test_device);
51 return g_test_run();