From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Martin Kletzander <mkletzan@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Pavel Dovgalyuk" <pavel.dovgaluk@ispras.ru>,
libvir-list@redhat.com,
"Christian Schoenebeck" <qemu_oss@crudebyte.com>,
qemu-devel@nongnu.org, "Yanan Wang" <wangyanan55@huawei.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
"Qiuhao Li" <Qiuhao.Li@outlook.com>,
"Hervé Poussineau" <hpoussin@reactos.org>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Laurent Vivier" <lvivier@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Alistair Francis" <alistair@alistair23.me>,
"Alexander Bulekov" <alxndr@bu.edu>,
"Bandan Das" <bsd@redhat.com>,
qemu-arm@nongnu.org, "Jan Kiszka" <jan.kiszka@web.de>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Darren Kenny" <darren.kenny@oracle.com>,
"Thomas Huth" <huth@tuxfamily.org>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
qemu-ppc@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH 05/18] tests/qtest: Specify audiodev= and -audiodev
Date: Mon, 25 Apr 2022 14:42:53 +0100 [thread overview]
Message-ID: <YmalXbNVd/knTxnB@redhat.com> (raw)
In-Reply-To: <6e7f2808dd40679a415812767b88f2a411fc137f.1650874791.git.mkletzan@redhat.com>
On Mon, Apr 25, 2022 at 10:21:48AM +0200, Martin Kletzander wrote:
> 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.
Not sure I understand what you mean by this 'interface node' reference ?
The code looks fine though
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
>
> Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
> ---
> tests/qtest/ac97-test.c | 3 ++-
> tests/qtest/es1370-test.c | 3 ++-
> tests/qtest/fuzz/generic_fuzz_configs.h | 6 ++++--
> tests/qtest/intel-hda-test.c | 15 ++++++++++-----
> 4 files changed, 18 insertions(+), 9 deletions(-)
>
> diff --git a/tests/qtest/ac97-test.c b/tests/qtest/ac97-test.c
> index e09f2495d24d..9711f1f6d966 100644
> --- a/tests/qtest/ac97-test.c
> +++ b/tests/qtest/ac97-test.c
> @@ -45,7 +45,8 @@ static void *ac97_create(void *pci_bus, QGuestAllocator *alloc, void *addr)
> static void ac97_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/es1370-test.c b/tests/qtest/es1370-test.c
> index 2fd7fd2d3d30..5facda8d0d8d 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 004c701915e1..84a93b3c350b 100644
> --- a/tests/qtest/fuzz/generic_fuzz_configs.h
> +++ b/tests/qtest/fuzz/generic_fuzz_configs.h
> @@ -101,8 +101,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 a58c98e4d11b..39ced2bc6ac6 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("-device intel-hda,id=" HDA_ID CODEC_DEVICES);
> + qtest_start(AUDIODEV "-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.35.1
>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2022-04-25 13:44 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-25 8:21 [PATCH 00/18] RFC: Remove deprecated audio features Martin Kletzander
2022-04-25 8:21 ` [PATCH 01/18] hw/audio: Remove -soundhw support Martin Kletzander
2022-04-25 13:16 ` Daniel P. Berrangé
2022-04-26 8:53 ` Stefan Hajnoczi
2022-04-27 10:10 ` Paolo Bonzini
2022-04-25 8:21 ` [PATCH 02/18] hw/input/tsc210x: Extract common init code into new function Martin Kletzander
2022-04-25 13:19 ` Daniel P. Berrangé
2022-04-25 8:21 ` [PATCH 03/18] hw/audio: Simplify hda audio init Martin Kletzander
2022-04-25 13:35 ` Daniel P. Berrangé
2022-04-25 14:06 ` Daniel P. Berrangé
2022-04-25 8:21 ` [PATCH 04/18] hw/audio/lm4549: Add errp error reporting to init function Martin Kletzander
2022-04-25 14:08 ` Daniel P. Berrangé
2022-04-25 8:21 ` [PATCH 05/18] tests/qtest: Specify audiodev= and -audiodev Martin Kletzander
2022-04-25 13:42 ` Daniel P. Berrangé [this message]
2022-04-29 10:37 ` Martin Kletzander
2022-04-25 8:21 ` [PATCH 06/18] ui/vnc: Require audiodev= Martin Kletzander
2022-04-25 13:48 ` Daniel P. Berrangé
2022-04-27 9:32 ` Paolo Bonzini
2022-04-27 9:41 ` Daniel P. Berrangé
2022-04-25 8:21 ` [PATCH 07/18] Introduce machine's default-audiodev property Martin Kletzander
2022-04-25 14:06 ` Daniel P. Berrangé
2022-04-29 11:36 ` Martin Kletzander
2022-04-25 8:21 ` [PATCH 08/18] audio: Add easy dummy audio initialiser Martin Kletzander
2022-04-25 8:21 ` [PATCH 09/18] hw/display/xlnx_dp.c: Add audiodev property Martin Kletzander
2022-04-25 8:21 ` [PATCH 10/18] hw/input/tsc210x.c: Support machine-default audiodev with fallback Martin Kletzander
2022-04-25 8:21 ` [PATCH 11/18] hw/arm: " Martin Kletzander
2022-04-25 8:21 ` [PATCH 12/18] hw/ppc: " Martin Kletzander
2022-04-25 8:21 ` [PATCH 13/18] audio: Make AUD_register_card fallible and require audiodev= Martin Kletzander
2022-04-25 13:34 ` Daniel P. Berrangé
2022-04-25 13:39 ` Daniel P. Berrangé
2022-04-25 8:21 ` [PATCH 14/18] audio: Require AudioState in AUD_add_capture Martin Kletzander
2022-04-25 14:11 ` Daniel P. Berrangé
2022-04-25 8:21 ` [PATCH 15/18] audio: Be more strict during audio backend initialisation Martin Kletzander
2022-04-25 14:16 ` Daniel P. Berrangé
2022-04-25 8:21 ` [PATCH 16/18] audio: Remove legacy audio environment variables and options Martin Kletzander
2022-04-25 14:19 ` Daniel P. Berrangé
2022-04-25 8:22 ` [PATCH 17/18] audio: Remove unused can_be_default Martin Kletzander
2022-04-25 14:19 ` Daniel P. Berrangé
2022-04-25 8:22 ` [PATCH 18/18] audio/spiceaudio: Fail initialisation when not using spice Martin Kletzander
2022-04-25 13:08 ` Daniel P. Berrangé
2022-04-25 17:05 ` [PATCH 00/18] RFC: Remove deprecated audio features Mark Cave-Ayland
2022-04-29 12:04 ` Martin Kletzander
2022-04-26 8:54 ` Stefan Hajnoczi
2023-09-15 11:47 ` Paolo Bonzini
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=YmalXbNVd/knTxnB@redhat.com \
--to=berrange@redhat.com \
--cc=Qiuhao.Li@outlook.com \
--cc=alistair@alistair23.me \
--cc=alxndr@bu.edu \
--cc=bsd@redhat.com \
--cc=darren.kenny@oracle.com \
--cc=edgar.iglesias@gmail.com \
--cc=eduardo@habkost.net \
--cc=f4bug@amsat.org \
--cc=hpoussin@reactos.org \
--cc=huth@tuxfamily.org \
--cc=jan.kiszka@web.de \
--cc=kraxel@redhat.com \
--cc=libvir-list@redhat.com \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mkletzan@redhat.com \
--cc=pavel.dovgaluk@ispras.ru \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu_oss@crudebyte.com \
--cc=stefanha@redhat.com \
--cc=thuth@redhat.com \
--cc=wangyanan55@huawei.com \
/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).