pc: Add 2.7 machine
[qemu.git] / tests / intel-hda-test.c
blobb0ca7e042a76f956dafed74c4c124669f0f10e8d
1 /*
2 * QTest testcase for Intel HDA
4 * Copyright (c) 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 "qemu/osdep.h"
11 #include "libqtest.h"
13 #define HDA_ID "hda0"
14 #define CODEC_DEVICES " -device hda-output,bus=" HDA_ID ".0" \
15 " -device hda-micro,bus=" HDA_ID ".0" \
16 " -device hda-duplex,bus=" HDA_ID ".0"
18 /* Tests only initialization so far. TODO: Replace with functional tests */
19 static void ich6_test(void)
21 qtest_start("-device intel-hda,id=" HDA_ID CODEC_DEVICES);
22 qtest_end();
25 static void ich9_test(void)
27 qtest_start("-machine q35 -device ich9-intel-hda,bus=pcie.0,addr=1b.0,id="
28 HDA_ID CODEC_DEVICES);
29 qtest_end();
32 int main(int argc, char **argv)
34 int ret;
36 g_test_init(&argc, &argv, NULL);
37 qtest_add_func("/intel-hda/ich6", ich6_test);
38 qtest_add_func("/intel-hda/ich9", ich9_test);
40 ret = g_test_run();
42 return ret;