[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/11] tests/qtest/vhost-user-blk-test: Check whether qemu-storage
|
From: |
Thomas Huth |
|
Subject: |
[PULL 04/11] tests/qtest/vhost-user-blk-test: Check whether qemu-storage-daemon is available |
|
Date: |
Sat, 14 Aug 2021 08:09:49 +0200 |
The vhost-user-blk-test currently hangs if QTEST_QEMU_STORAGE_DAEMON_BINARY
points to a non-existing binary. Let's improve this situation by checking
for the availability of the binary first, so we can fail gracefully if
it is not accessible.
Message-Id: <20210811095949.133462-1-thuth@redhat.com>
Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
Tested-by: Alexander Bulekov <alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/vhost-user-blk-test.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tests/qtest/vhost-user-blk-test.c
b/tests/qtest/vhost-user-blk-test.c
index 8796c74ca4..6f108a1b62 100644
--- a/tests/qtest/vhost-user-blk-test.c
+++ b/tests/qtest/vhost-user-blk-test.c
@@ -789,6 +789,14 @@ static const char *qtest_qemu_storage_daemon_binary(void)
exit(0);
}
+ /* If we've got a path to the binary, check whether we can access it */
+ if (strchr(qemu_storage_daemon_bin, '/') &&
+ access(qemu_storage_daemon_bin, X_OK) != 0) {
+ fprintf(stderr, "ERROR: '%s' is not accessible\n",
+ qemu_storage_daemon_bin);
+ exit(1);
+ }
+
return qemu_storage_daemon_bin;
}
--
2.27.0
- [PULL 00/11] Optional gitlab-CI and doc fixes for -rc4, Thomas Huth, 2021/08/14
- [PULL 01/11] gitlab: exclude sparc-softmmu and riscv32-softmmu from cross builds, Thomas Huth, 2021/08/14
- [PULL 05/11] fuzz: avoid building twice, when running on gitlab, Thomas Huth, 2021/08/14
- [PULL 02/11] gitlab: skip many more targets in windows cross builds, Thomas Huth, 2021/08/14
- [PULL 04/11] tests/qtest/vhost-user-blk-test: Check whether qemu-storage-daemon is available,
Thomas Huth <=
- [PULL 03/11] storage-daemon: Add missing build dependency to the vhost-user-blk-test, Thomas Huth, 2021/08/14
- [PULL 09/11] docs/about/removed-features: Document removed HMP commands from QEMU v2.12, Thomas Huth, 2021/08/14
- [PULL 06/11] docs/about/removed-features: Document removed CLI options from QEMU v2.12, Thomas Huth, 2021/08/14
- [PULL 07/11] docs/about/removed-features: Document removed CLI options from QEMU v3.0, Thomas Huth, 2021/08/14
- [PULL 08/11] docs/about/removed-features: Document removed CLI options from QEMU v3.1, Thomas Huth, 2021/08/14
- [PULL 10/11] docs/about/removed-features: Document removed devices from older QEMU versions, Thomas Huth, 2021/08/14
- [PULL 11/11] docs/about/removed-features: Document removed machines from older QEMU versions, Thomas Huth, 2021/08/14
- Re: [PULL 00/11] Optional gitlab-CI and doc fixes for -rc4, Peter Maydell, 2021/08/16