From: Thomas Huth <thuth@redhat.com>
To: Michael Labiuk <michael.labiuk@virtuozzo.com>, qemu-devel@nongnu.org
Cc: Laurent Vivier <lvivier@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
den@virtuozzo.com, "Michael S. Tsirkin" <mst@redhat.com>,
Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Subject: Re: [PATCH v5 5/9] tests/x86: Add 'q35' machine type to hotplug hd-geo-test
Date: Tue, 11 Oct 2022 13:24:52 +0200 [thread overview]
Message-ID: <283af5bb-9d3a-75fc-7813-7bf0b3737be2@redhat.com> (raw)
In-Reply-To: <20220929223547.1429580-6-michael.labiuk@virtuozzo.com>
On 30/09/2022 00.35, Michael Labiuk via wrote:
> Add pci bridge setting to test hotplug.
> Duplicate tests for plugging scsi and virtio devices for q35 machine type.
>
> Signed-off-by: Michael Labiuk <michael.labiuk@virtuozzo.com>
> ---
> tests/qtest/hd-geo-test.c | 76 ++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 75 insertions(+), 1 deletion(-)
>
> diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c
> index 278464c379..4a7628077b 100644
> --- a/tests/qtest/hd-geo-test.c
> +++ b/tests/qtest/hd-geo-test.c
> @@ -963,6 +963,42 @@ static void test_override_scsi_hot_unplug(void)
> test_override_hot_unplug(args, "scsi-disk0", expected, expected2);
> }
>
> +static void test_override_scsi_hot_unplug_q35(void)
> +{
> + TestArgs *args = create_args();
> + CHSResult expected[] = {
> + {
> + "/pci@i0cf8/pci-bridge@1/pci-bridge@0/scsi@2/channel@0/disk@0,0",
> + {10000, 120, 30}
> + },
> + {
> + "/pci@i0cf8/pci-bridge@1/pci-bridge@0/scsi@2/channel@0/disk@1,0",
> + {20, 20, 20}
> + },
> + {NULL, {0, 0, 0} }
> + };
> + CHSResult expected2[] = {
> + {
> + "/pci@i0cf8/pci-bridge@1/pci-bridge@0/scsi@2/channel@0/disk@1,0",
> + {20, 20, 20}
> + },
> + {NULL, {0, 0, 0} }
> + };
> +
> + args->argc = append_arg(args->argc, args->argv, ARGV_SIZE,
> + g_strdup("-device pcie-root-port,id=p0 "
> + "-device pcie-pci-bridge,bus=p0,id=b1 "
> + "-machine q35"));
> +
> + add_drive_with_mbr(args, empty_mbr, 1);
> + add_drive_with_mbr(args, empty_mbr, 1);
> + add_scsi_controller(args, "virtio-scsi-pci", "b1", 2);
> + add_scsi_disk(args, 0, 0, 0, 0, 0, 10000, 120, 30);
> + add_scsi_disk(args, 1, 0, 0, 1, 0, 20, 20, 20);
> +
> + test_override_hot_unplug(args, "scsi-disk0", expected, expected2);
> +}
> +
> static void test_override_virtio_hot_unplug(void)
> {
> TestArgs *args = create_args();
> @@ -986,6 +1022,41 @@ static void test_override_virtio_hot_unplug(void)
> test_override_hot_unplug(args, "virtio-disk0", expected, expected2);
> }
>
> +static void test_override_virtio_hot_unplug_q35(void)
> +{
> + TestArgs *args = create_args();
> + CHSResult expected[] = {
> + {
> + "/pci@i0cf8/pci-bridge@1/pci-bridge@0/scsi@2/disk@0,0",
> + {10000, 120, 30}
> + },
> + {
> + "/pci@i0cf8/pci-bridge@1/pci-bridge@0/scsi@3/disk@0,0",
> + {20, 20, 20}
> + },
> + {NULL, {0, 0, 0} }
> + };
> + CHSResult expected2[] = {
> + {
> + "/pci@i0cf8/pci-bridge@1/pci-bridge@0/scsi@3/disk@0,0",
> + {20, 20, 20}
> + },
> + {NULL, {0, 0, 0} }
> + };
> +
> + args->argc = append_arg(args->argc, args->argv, ARGV_SIZE,
> + g_strdup("-device pcie-root-port,id=p0 "
> + "-device pcie-pci-bridge,bus=p0,id=b1 "
> + "-machine q35"));
> +
> + add_drive_with_mbr(args, empty_mbr, 1);
> + add_drive_with_mbr(args, empty_mbr, 1);
> + add_virtio_disk(args, 0, "b1", 2, 10000, 120, 30);
> + add_virtio_disk(args, 1, "b1", 3, 20, 20, 20);
> +
> + test_override_hot_unplug(args, "virtio-disk0", expected, expected2);
> +}
> +
> int main(int argc, char **argv)
> {
> Backend i;
> @@ -1035,11 +1106,14 @@ int main(int argc, char **argv)
> test_override_virtio_blk_q35);
> qtest_add_func("hd-geo/override/zero_chs_q35",
> test_override_zero_chs_q35);
> -
> if (qtest_has_device("lsi53c895a")) {
> qtest_add_func("hd-geo/override/scsi_q35",
> test_override_scsi_q35);
> }
> + qtest_add_func("hd-geo/override/scsi_hot_unplug_q35",
> + test_override_scsi_hot_unplug_q35);
> + qtest_add_func("hd-geo/override/virtio_hot_unplug_q35",
> + test_override_virtio_hot_unplug_q35);
> }
> } else {
> g_test_message("QTEST_QEMU_IMG not set or qemu-img missing; "
Acked-by: Thomas Huth <thuth@redhat.com>
next prev parent reply other threads:[~2022-10-11 13:06 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-29 22:35 [PATCH v5 0/9] Add 'q35' machine type to hotplug tests Michael Labiuk via
2022-09-29 22:35 ` [PATCH v5 1/9] tests/x86: add helper qtest_qmp_device_del_send() Michael Labiuk via
2022-10-11 10:59 ` Thomas Huth
2022-09-29 22:35 ` [PATCH v5 2/9] tests/x86: Add subtest with 'q35' machine type to device-plug-test Michael Labiuk via
2022-10-11 11:10 ` Thomas Huth
2022-09-29 22:35 ` [PATCH v5 3/9] tests/x86: Refactor hot unplug hd-geo-test Michael Labiuk via
2022-10-11 11:18 ` Thomas Huth
2022-09-29 22:35 ` [PATCH v5 4/9] tests/x86: Add 'q35' machine type to override-tests in hd-geo-test Michael Labiuk via
2022-10-11 11:23 ` Thomas Huth
2022-09-29 22:35 ` [PATCH v5 5/9] tests/x86: Add 'q35' machine type to hotplug hd-geo-test Michael Labiuk via
2022-10-11 11:24 ` Thomas Huth [this message]
2022-09-29 22:35 ` [PATCH v5 6/9] tests/x86: Fix comment typo in drive_del-test Michael Labiuk via
2022-10-11 11:25 ` Thomas Huth
2022-09-29 22:35 ` [PATCH v5 7/9] tests/x86: replace snprint() by g_strdup_printf() " Michael Labiuk via
2022-10-11 11:27 ` Thomas Huth
2022-10-18 6:39 ` Philippe Mathieu-Daudé
2022-09-29 22:35 ` [PATCH v5 8/9] tests/x86: Add 'q35' machine type to drive_del-test Michael Labiuk via
2022-10-11 11:44 ` Thomas Huth
2022-09-29 22:35 ` [PATCH v5 9/9] tests/x86: Add 'q35' machine type to ivshmem-test Michael Labiuk via
2022-10-11 11:54 ` Thomas Huth
2022-10-11 10:18 ` [PING PATCH v5] Add 'q35' machine type to hotplug tests Michael Labiuk
2022-10-11 12:09 ` Thomas Huth
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=283af5bb-9d3a-75fc-7813-7bf0b3737be2@redhat.com \
--to=thuth@redhat.com \
--cc=den@virtuozzo.com \
--cc=dgilbert@redhat.com \
--cc=lvivier@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=michael.labiuk@virtuozzo.com \
--cc=mst@redhat.com \
--cc=pbonzini@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).