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>
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;
}