aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2021-12-22 16:36:00 +0100
committerThomas Huth <thuth@redhat.com>2022-01-05 11:10:13 +0100
commit961fb4b465800318792047de2339292f3ac37fa6 (patch)
tree6cdca987fe22d067f5b2d9cdbc7586dc89185174 /tests
parent7539fa0116c8f84e56eace198c42a938ab4c3f8e (diff)
downloadqemu-961fb4b465800318792047de2339292f3ac37fa6.zip
qemu-961fb4b465800318792047de2339292f3ac37fa6.tar.gz
qemu-961fb4b465800318792047de2339292f3ac37fa6.tar.bz2
tests/qtest/hd-geo-test: Check for the lsi53c895a controller before using it
The lsi53c895a SCSI controller might have been disabled in the target binary, so let's check for its availability first before using it. Message-Id: <20211222153600.976588-1-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/qtest/hd-geo-test.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c
index 113126a..771eaa7 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",