From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: balaton@eik.bme.hu, "Martin Kletzander" <mkletzan@redhat.com>,
"Daniel P . Berrangé" <berrange@redhat.com>
Subject: [PULL 8/9] tests/qtest: Specify audiodev= and -audiodev
Date: Fri, 22 Sep 2023 17:42:27 +0200 [thread overview]
Message-ID: <20230922154228.304933-9-pbonzini@redhat.com> (raw)
In-Reply-To: <20230922154228.304933-1-pbonzini@redhat.com>
From: Martin Kletzander <mkletzan@redhat.com>
This will enable removing deprecated default audiodev support.
I did not figure out how to make the audiodev represented as an
interface node, so this is a workaround. I am not sure what would be
the proper way.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <6e7f2808dd40679a415812767b88f2a411fc137f.1650874791.git.mkletzan@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
tests/qtest/es1370-test.c | 3 ++-
tests/qtest/fuzz/generic_fuzz_configs.h | 6 ++++--
tests/qtest/intel-hda-test.c | 15 ++++++++++-----
3 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/tests/qtest/es1370-test.c b/tests/qtest/es1370-test.c
index 97ab65c4357..8387e74193b 100644
--- a/tests/qtest/es1370-test.c
+++ b/tests/qtest/es1370-test.c
@@ -46,7 +46,8 @@ static void *es1370_create(void *pci_bus, QGuestAllocator *alloc, void *addr)
static void es1370_register_nodes(void)
{
QOSGraphEdgeOptions opts = {
- .extra_device_opts = "addr=04.0",
+ .extra_device_opts = "addr=04.0,audiodev=audio0",
+ .before_cmd_line = "-audiodev driver=none,id=audio0",
};
add_qpci_address(&opts, &(QPCIAddress) { .devfn = QPCI_DEVFN(4, 0) });
diff --git a/tests/qtest/fuzz/generic_fuzz_configs.h b/tests/qtest/fuzz/generic_fuzz_configs.h
index 50689da6539..4d7c8ca4ece 100644
--- a/tests/qtest/fuzz/generic_fuzz_configs.h
+++ b/tests/qtest/fuzz/generic_fuzz_configs.h
@@ -106,8 +106,10 @@ const generic_fuzz_config predefined_configs[] = {
},{
.name = "intel-hda",
.args = "-machine q35 -nodefaults -device intel-hda,id=hda0 "
- "-device hda-output,bus=hda0.0 -device hda-micro,bus=hda0.0 "
- "-device hda-duplex,bus=hda0.0",
+ "-audiodev driver=none,id=audio0",
+ "-device hda-output,bus=hda0.0,audiodev=audio0 "
+ "-device hda-micro,bus=hda0.0,audiodev=audio0 "
+ "-device hda-duplex,bus=hda0.0,audiodev=audio0",
.objects = "intel-hda",
},{
.name = "ide-hd",
diff --git a/tests/qtest/intel-hda-test.c b/tests/qtest/intel-hda-test.c
index d4a8db6fd60..663bb6c4854 100644
--- a/tests/qtest/intel-hda-test.c
+++ b/tests/qtest/intel-hda-test.c
@@ -11,20 +11,24 @@
#include "libqtest-single.h"
#define HDA_ID "hda0"
-#define CODEC_DEVICES " -device hda-output,bus=" HDA_ID ".0" \
- " -device hda-micro,bus=" HDA_ID ".0" \
- " -device hda-duplex,bus=" HDA_ID ".0"
+#define AUDIODEV " -audiodev driver=none,id=audio0 "
+#define AUDIODEV_REF "audiodev=audio0"
+#define CODEC_DEVICES " -device hda-output,bus=" HDA_ID ".0," AUDIODEV_REF \
+ " -device hda-micro,bus=" HDA_ID ".0," AUDIODEV_REF \
+ " -device hda-duplex,bus=" HDA_ID ".0," AUDIODEV_REF
/* Tests only initialization so far. TODO: Replace with functional tests */
static void ich6_test(void)
{
- qtest_start("-machine pc -device intel-hda,id=" HDA_ID CODEC_DEVICES);
+ qtest_start(AUDIODEV "-machine pc -device intel-hda,id=" HDA_ID CODEC_DEVICES);
qtest_end();
}
static void ich9_test(void)
{
- qtest_start("-machine q35 -device ich9-intel-hda,bus=pcie.0,addr=1b.0,id="
+ qtest_start("-machine q35"
+ AUDIODEV
+ "-device ich9-intel-hda,bus=pcie.0,addr=1b.0,id="
HDA_ID CODEC_DEVICES);
qtest_end();
}
@@ -39,6 +43,7 @@ static void test_issue542_ich6(void)
QTestState *s;
s = qtest_init("-nographic -nodefaults -M pc-q35-6.2 "
+ AUDIODEV
"-device intel-hda,id=" HDA_ID CODEC_DEVICES);
qtest_outl(s, 0xcf8, 0x80000804);
--
2.41.0
next prev parent reply other threads:[~2023-09-22 15:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 15:42 [PULL v2 0/9] i386, audio changes for 2023-09-22 Paolo Bonzini
2023-09-22 15:42 ` [PULL 1/9] target/i386: enumerate bit 56 of MSR_IA32_VMX_BASIC Paolo Bonzini
2023-09-22 15:42 ` [PULL 2/9] target/i386: Export GDS_NO bit to guests Paolo Bonzini
2023-09-22 15:42 ` [PULL 3/9] qemu/timer: Add host ticks function for RISC-V Paolo Bonzini
2023-09-22 15:42 ` [PULL 4/9] hw/input/tsc210x: Extract common init code into new function Paolo Bonzini
2023-09-22 15:42 ` [PULL 5/9] hw/audio: Simplify hda audio init Paolo Bonzini
2023-09-22 15:42 ` [PULL 6/9] hw/audio/lm4549: Add errp error reporting to init function Paolo Bonzini
2023-09-22 15:42 ` [PULL 7/9] hw/display/xlnx_dp.c: Add audiodev property Paolo Bonzini
2023-09-22 15:42 ` Paolo Bonzini [this message]
2023-09-22 15:42 ` [PULL 9/9] vl: recognize audiodev groups in configuration files Paolo Bonzini
2023-09-25 15:36 ` [PULL v2 0/9] i386, audio changes for 2023-09-22 Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230922154228.304933-9-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=balaton@eik.bme.hu \
--cc=berrange@redhat.com \
--cc=mkletzan@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).