[PATCH for-7.0] tests/qemu-iotests: Fix 051 for binaries without 'lsi53c895a'

Thomas Huth posted 1 patch 2 years, 5 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20211206143404.247032-1-thuth@redhat.com
Maintainers: Hanna Reitz <hreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/051 | 4 ++++
1 file changed, 4 insertions(+)
[PATCH for-7.0] tests/qemu-iotests: Fix 051 for binaries without 'lsi53c895a'
Posted by Thomas Huth 2 years, 5 months ago
The lsi53c895a SCSI adaptor might not be enabled in each and every
x86 QEMU binary, e.g. it's disabled in the RHEL/CentOS build.
Thus let's add a check to the 051 test so that it does not fail if
this device is not available.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/qemu-iotests/051 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
index 1d2fa93a11..e9042a6214 100755
--- a/tests/qemu-iotests/051
+++ b/tests/qemu-iotests/051
@@ -45,6 +45,10 @@ _supported_proto file
 _unsupported_imgopts 'refcount_bits=\([^1]\|.\([^6]\|$\)\)' data_file
 _require_drivers nbd
 
+if [ "$QEMU_DEFAULT_MACHINE" = "pc" ]; then
+    _require_devices lsi53c895a
+fi
+
 do_run_qemu()
 {
     echo Testing: "$@"
-- 
2.27.0


Re: [PATCH for-7.0] tests/qemu-iotests: Fix 051 for binaries without 'lsi53c895a'
Posted by Hanna Reitz 2 years, 4 months ago
On 06.12.21 15:34, Thomas Huth wrote:
> The lsi53c895a SCSI adaptor might not be enabled in each and every
> x86 QEMU binary, e.g. it's disabled in the RHEL/CentOS build.
> Thus let's add a check to the 051 test so that it does not fail if
> this device is not available.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   tests/qemu-iotests/051 | 4 ++++
>   1 file changed, 4 insertions(+)

Thanks, applied to my block branch:

https://gitlab.com/hreitz/qemu/-/commits/block

Hanna