aboutsummaryrefslogtreecommitdiff
path: root/tests/e1000-test.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-11-07 18:25:10 +0100
committerAndreas Färber <afaerber@suse.de>2014-02-14 16:22:33 +0100
commita21baf7999f5b0b3aca72c6f6d88901151392ca7 (patch)
treebcf9a33efc3d378c6804f957b4748b58757e63dc /tests/e1000-test.c
parent9fe451a08e7f232448676a3a7cea002642720a1f (diff)
tests: Add e1000 qtest
Cc: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'tests/e1000-test.c')
-rw-r--r--tests/e1000-test.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/e1000-test.c b/tests/e1000-test.c
new file mode 100644
index 0000000000..a8ba2fc0a8
--- /dev/null
+++ b/tests/e1000-test.c
@@ -0,0 +1,33 @@
+/*
+ * QTest testcase for e1000 NIC
+ *
+ * Copyright (c) 2013-2014 SUSE LINUX Products GmbH
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include <glib.h>
+#include <string.h>
+#include "libqtest.h"
+#include "qemu/osdep.h"
+
+/* Tests only initialization so far. TODO: Replace with functional tests */
+static void nop(void)
+{
+}
+
+int main(int argc, char **argv)
+{
+ int ret;
+
+ g_test_init(&argc, &argv, NULL);
+ qtest_add_func("/e1000/nop", nop);
+
+ qtest_start("-device e1000");
+ ret = g_test_run();
+
+ qtest_end();
+
+ return ret;
+}