From fc9677915cc1273b4757a911f27f2f5038168053 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Fri, 21 Feb 2014 22:19:43 +0100 Subject: tests: Add nvme qtest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Acked-by: Keith Busch Signed-off-by: Andreas Färber --- tests/nvme-test.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 tests/nvme-test.c (limited to 'tests/nvme-test.c') diff --git a/tests/nvme-test.c b/tests/nvme-test.c new file mode 100644 index 0000000000..85768e837b --- /dev/null +++ b/tests/nvme-test.c @@ -0,0 +1,34 @@ +/* + * QTest testcase for NVMe + * + * Copyright (c) 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 +#include +#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("/nvme/nop", nop); + + qtest_start("-drive id=drv0,if=none,file=/dev/null " + "-device nvme,drive=drv0,serial=foo"); + ret = g_test_run(); + + qtest_end(); + + return ret; +} -- cgit v1.2.1