xref: /qemu/tests/qtest/ac97-test.c (revision d7b50c0cc052f705eceb17018ff36a453a6c60c7)
1*d7b50c0cSAndreas Färber /*
2*d7b50c0cSAndreas Färber  * QTest testcase for AC97
3*d7b50c0cSAndreas Färber  *
4*d7b50c0cSAndreas Färber  * Copyright (c) 2014 SUSE LINUX Products GmbH
5*d7b50c0cSAndreas Färber  *
6*d7b50c0cSAndreas Färber  * This work is licensed under the terms of the GNU GPL, version 2 or later.
7*d7b50c0cSAndreas Färber  * See the COPYING file in the top-level directory.
8*d7b50c0cSAndreas Färber  */
9*d7b50c0cSAndreas Färber 
10*d7b50c0cSAndreas Färber #include <glib.h>
11*d7b50c0cSAndreas Färber #include <string.h>
12*d7b50c0cSAndreas Färber #include "libqtest.h"
13*d7b50c0cSAndreas Färber #include "qemu/osdep.h"
14*d7b50c0cSAndreas Färber 
15*d7b50c0cSAndreas Färber /* Tests only initialization so far. TODO: Replace with functional tests */
16*d7b50c0cSAndreas Färber static void nop(void)
17*d7b50c0cSAndreas Färber {
18*d7b50c0cSAndreas Färber }
19*d7b50c0cSAndreas Färber 
20*d7b50c0cSAndreas Färber int main(int argc, char **argv)
21*d7b50c0cSAndreas Färber {
22*d7b50c0cSAndreas Färber     int ret;
23*d7b50c0cSAndreas Färber 
24*d7b50c0cSAndreas Färber     g_test_init(&argc, &argv, NULL);
25*d7b50c0cSAndreas Färber     qtest_add_func("/ac97/nop", nop);
26*d7b50c0cSAndreas Färber 
27*d7b50c0cSAndreas Färber     qtest_start("-device AC97");
28*d7b50c0cSAndreas Färber     ret = g_test_run();
29*d7b50c0cSAndreas Färber 
30*d7b50c0cSAndreas Färber     qtest_end();
31*d7b50c0cSAndreas Färber 
32*d7b50c0cSAndreas Färber     return ret;
33*d7b50c0cSAndreas Färber }
34