All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/qtest/hd-geo-test: Check for the lsi53c895a controller before using it
@ 2021-12-22 15:36 Thomas Huth
  2022-01-11 20:45 ` John Snow
  2022-01-11 22:24 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Huth @ 2021-12-22 15:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: Laurent Vivier, Paolo Bonzini, John Snow, qemu-block

The lsi53c895a SCSI controller might have been disabled in the target
binary, so let's check for its availability first before using it.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/qtest/hd-geo-test.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c
index 113126ae06..771eaa741b 100644
--- a/tests/qtest/hd-geo-test.c
+++ b/tests/qtest/hd-geo-test.c
@@ -960,9 +960,11 @@ int main(int argc, char **argv)
     qtest_add_func("hd-geo/ide/device/user/chst", test_ide_device_user_chst);
     if (have_qemu_img()) {
         qtest_add_func("hd-geo/override/ide", test_override_ide);
-        qtest_add_func("hd-geo/override/scsi", test_override_scsi);
-        qtest_add_func("hd-geo/override/scsi_2_controllers",
-                       test_override_scsi_2_controllers);
+        if (qtest_has_device("lsi53c895a")) {
+            qtest_add_func("hd-geo/override/scsi", test_override_scsi);
+            qtest_add_func("hd-geo/override/scsi_2_controllers",
+                           test_override_scsi_2_controllers);
+        }
         qtest_add_func("hd-geo/override/virtio_blk", test_override_virtio_blk);
         qtest_add_func("hd-geo/override/zero_chs", test_override_zero_chs);
         qtest_add_func("hd-geo/override/scsi_hot_unplug",
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] tests/qtest/hd-geo-test: Check for the lsi53c895a controller before using it
  2021-12-22 15:36 [PATCH] tests/qtest/hd-geo-test: Check for the lsi53c895a controller before using it Thomas Huth
@ 2022-01-11 20:45 ` John Snow
  2022-01-11 22:24 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: John Snow @ 2022-01-11 20:45 UTC (permalink / raw)
  To: Thomas Huth; +Cc: Laurent Vivier, Paolo Bonzini, qemu-devel, Qemu-block

On Wed, Dec 22, 2021 at 10:36 AM Thomas Huth <thuth@redhat.com> wrote:
>
> The lsi53c895a SCSI controller might have been disabled in the target
> binary, so let's check for its availability first before using it.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  tests/qtest/hd-geo-test.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c
> index 113126ae06..771eaa741b 100644
> --- a/tests/qtest/hd-geo-test.c
> +++ b/tests/qtest/hd-geo-test.c
> @@ -960,9 +960,11 @@ int main(int argc, char **argv)
>      qtest_add_func("hd-geo/ide/device/user/chst", test_ide_device_user_chst);
>      if (have_qemu_img()) {
>          qtest_add_func("hd-geo/override/ide", test_override_ide);
> -        qtest_add_func("hd-geo/override/scsi", test_override_scsi);
> -        qtest_add_func("hd-geo/override/scsi_2_controllers",
> -                       test_override_scsi_2_controllers);
> +        if (qtest_has_device("lsi53c895a")) {
> +            qtest_add_func("hd-geo/override/scsi", test_override_scsi);
> +            qtest_add_func("hd-geo/override/scsi_2_controllers",
> +                           test_override_scsi_2_controllers);
> +        }
>          qtest_add_func("hd-geo/override/virtio_blk", test_override_virtio_blk);
>          qtest_add_func("hd-geo/override/zero_chs", test_override_zero_chs);
>          qtest_add_func("hd-geo/override/scsi_hot_unplug",
> --
> 2.27.0
>

Acked-by: John Snow <jsnow@redhat.com>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] tests/qtest/hd-geo-test: Check for the lsi53c895a controller before using it
  2021-12-22 15:36 [PATCH] tests/qtest/hd-geo-test: Check for the lsi53c895a controller before using it Thomas Huth
  2022-01-11 20:45 ` John Snow
@ 2022-01-11 22:24 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-01-11 22:24 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel
  Cc: Laurent Vivier, Paolo Bonzini, John Snow, qemu-block

On 22/12/21 16:36, Thomas Huth wrote:
> The lsi53c895a SCSI controller might have been disabled in the target
> binary, so let's check for its availability first before using it.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   tests/qtest/hd-geo-test.c | 8 +++++---
>   1 file changed, 5 insertions(+), 3 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-11 22:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-22 15:36 [PATCH] tests/qtest/hd-geo-test: Check for the lsi53c895a controller before using it Thomas Huth
2022-01-11 20:45 ` John Snow
2022-01-11 22:24 ` Philippe Mathieu-Daudé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.