qemu-iotests: Improve portability by searching bash in the $PATH

Bash is not always installed as /bin/bash. In particular on OpenBSD,
the package installs it in /usr/local/bin.
Use the 'env' shebang to search bash in the $PATH.

Patch created mechanically by running:

  $ git grep -lE '#! ?/bin/bash' -- tests/qemu-iotests \
    | while read f; do \
      sed -i 's|^#!.\?/bin/bash$|#!/usr/bin/env bash|' $f; \
    done

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Philippe Mathieu-Daudé 2019-03-07 15:58:38 +01:00 committed by Kevin Wolf
parent d68375816e
commit 11a82d1429
185 changed files with 185 additions and 185 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test simple read/write using plain bdrv_read/bdrv_write
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test simple read/write using plain bdrv_pread/bdrv_pwrite
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test simple read/write using bdrv_aio_readv/bdrv_aio_writev
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Make sure we can't read and write outside of the image size.
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Make sure qemu-img can create 5TB images
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Check for one possible case of qcow2 refcount corruption.
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test simple asynchronous read/write operations.
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Nolan I qcow2 corruption - incorrectly reports free clusters
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Nolan II qcow2 corruption - wrong used cluster
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test for AIO allocation on the same cluster
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Make sure we can open read-only images
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# qcow2 pattern test, empty and compressed image - 4k cluster patterns
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# qcow2 pattern test, complex patterns including compression and snapshots
# Using patterns for 4k cluster size.

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Combined test to grow the refcount table and test snapshots.
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Simple backing file reads
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Merge backing file into test image when converting the image
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# When using a backing file for the output image in qemu-img convert,
# the backing file clusters must not copied. The data must still be

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Commit changes to backing file
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test handling of invalid patterns arguments to qemu-io
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test bdrv_load/save_vmstate using the usual patterns
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# qcow2 pattern test with various cluster sizes
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Rebasing COW images
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Resizing images
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# qcow2 error path testing
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test that sub-cluster allocating writes zero the rest of the cluster
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test that backing files can be smaller than the image
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# qcow2 internal snapshots/VM state tests
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test that all qcow2 header extensions survive a header rewrite
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test that AIO requests are drained before an image is closed. This used
# to segfault because the request coroutine kept running even after the

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test aligned and misaligned write zeroes operations.
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test bdrv_pwrite_zeroes with backing files (see also 154)
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Let a few AIO requests run in parallel and have them access different L2
# tables so that the cache has a chance to get used up.

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test qcow2 feature bits
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test COW from backing files
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test COW from backing files with AIO
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test qcow2 lazy refcounts
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test qemu-img operation on zero size images
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test that qemu-img info --backing-chain detects infinite loops
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test concurrent cluster allocations
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Regression test for commit b7ab0fea (which was a corruption fix,
# despite the commit message claiming otherwise)

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
##
## qemu-img compare test
##

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Check qemu-img option parsing
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test qemu-img rebase with zero clusters
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test command line configuration of block devices and driver-specific options
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test bdrv_read/bdrv_write using BDRV_O_SNAPSHOT
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test qemu-img convert when image length is not a multiple of cluster size
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test huge qcow2 images
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test export internal snapshot by qemu-nbd, convert it by qemu-img.
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test case for vmdk
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test case for image corruption (overlapping data structures) in qcow2
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test case for image option amendment in qcow2.
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test case for snapshotting images with unallocated zero clusters in
# qcow2

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# test of qemu-img convert -n - convert without creation
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test VHDX read/write from a sample image created with Hyper-V
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test case for preallocated zero clusters in qcow2
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test automatic deletion of BDSes created by -drive/drive_add
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test case for loading a saved VM state from a qcow2 image
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test case for deleting a backing file
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test VHDX log replay from an image with a journal that needs to be
# replayed

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test case for the QMP blkdebug and blkverify interfaces
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test case for nested image formats
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test count_contiguous_clusters in qcow2
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
##
## qemu-img compare test (qcow2 only ones)
##

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# cloop format input validation tests
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# parallels format input validation tests
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test concurrent pread/pwrite
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# bochs format input validation tests
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test qcow2 preallocation with different cluster_sizes
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# qcow2 format input validation tests
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test Quorum block driver
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test qemu-img command line parsing
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test NBD client unexpected disconnect
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test case for VDI header corruption; image too large, and too many blocks.
# Also simple test for creating dynamic and static VDI images.

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Live snapshot tests
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test qemu-img progress output
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test unsupported blockdev-add cases
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# vpc (VHD) format input validation tests
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test case for support of JSON filenames
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test for discarding compressed clusters on qcow2 images
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Live migration test
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# qcow1 format input validation tests
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test case for drive-mirror to NBD
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test for commit of larger active layer
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Commit changes into backing chains and empty the top image if the
# backing image is not explicitly specified

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test qcow2's bdrv_make_empty for images without internal snapshots
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test valid filenames for blkdebug and blkverify representatively for
# other protocols (such as NBD) when queried

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test short file I/O
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test case for qemu-io -c map and qemu-img map
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test case for qcow2 metadata cache size specification
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test image creation with aligned and unaligned sizes
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Create, read, write big image
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test preallocated resize of raw images
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Tests updates of the qcow2 L1 table
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test case for repairing qcow2 images which cannot be repaired using
# the on-disk refcount structures

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test writing image headers of other formats into raw images
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test case for relative backing file names in complex BDS trees
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test case for non-existing backing file when creating a qcow2 image
# and not specifying the size

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test cases for different refcount_bits values
#

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test case for accessing creation options on image formats and
# protocols not supporting image creation

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Test invalid backing file format in qcow2 images
#

Some files were not shown because too many files have changed in this diff Show More