On 03/06/2018 06:21 AM, Richard W.M. Jones wrote:
This is for consistency with qemu-img, socat, ss, etc where we test
for these binaries at run time.
configure.ac | 4 ----
tests/Makefile.am | 8 +++-----
tests/test-parallel-file.sh | 20 +++++++++++++-------
tests/test-parallel-nbd.sh | 20 +++++++++++++-------
4 files changed, 29 insertions(+), 23 deletions(-)
@@ -31,17 +31,23 @@
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
-# Makefile sets $QEMU_IO, but it's also nice if the script runs again
-# standalone afterwards for diagnosing any failures
+# Check file-data was created by Makefile and qemu-io exists.
+if ! test -f file-data; then
Needs rebasing now that the test no longer relies on file-data. Also, I
still appreciate being able to override $QEMU_IO from the command line
(to point to an alternative version on the fly), so even though I agree
with your Makefile changes, I disagree with dropping the defaulting of
QEMU_IO to qemu-io,
# Populate file, and sanity check that qemu-io can issue parallel requests
printf '%1024s' . > test-parallel-file.data
-$QEMU_IO -f raw -c "aio_write -P 1 0 512" -c "aio_write -P 2 512 512" \
+qemu-io -f raw -c "aio_write -P 1 0 512" -c "aio_write -P 2 512 512" \
as well as disagree with hard-coding only the first qemu-io in $PATH
here, instead of allowing a command-line override.
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
Libguestfs mailing list