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 # 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 # 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 # 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. # 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 # 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. # 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. # 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 # 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 # 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 # 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 # 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 # 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 # qcow2 pattern test, complex patterns including compression and snapshots
# Using patterns for 4k cluster size. # 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. # 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 # 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 # 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, # 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 # 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 # 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 # 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 # 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 # qcow2 pattern test with various cluster sizes
# #

View File

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

View File

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

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# qcow2 error path testing # 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 # 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 # 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 # 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 # 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 # Test that AIO requests are drained before an image is closed. This used
# to segfault because the request coroutine kept running even after the # 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. # 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) # 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 # 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. # 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 # Test qcow2 feature bits
# #

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Test qemu-img operation on zero size images # 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 # 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 # 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, # Regression test for commit b7ab0fea (which was a corruption fix,
# despite the commit message claiming otherwise) # despite the commit message claiming otherwise)

View File

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

View File

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

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Test qemu-img rebase with zero clusters # 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 # 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 # 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 # 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 # 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. # 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 # 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 # 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. # 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 # Test case for snapshotting images with unallocated zero clusters in
# qcow2 # qcow2

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# test of qemu-img convert -n - convert without creation # 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 # 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 # 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 # 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 # 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 # 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 # Test VHDX log replay from an image with a journal that needs to be
# replayed # replayed

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Test case for the QMP blkdebug and blkverify interfaces # 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 # Test case for nested image formats
# #

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Test count_contiguous_clusters in qcow2 # 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) ## qemu-img compare test (qcow2 only ones)
## ##

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Test NBD client unexpected disconnect # 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. # Test case for VDI header corruption; image too large, and too many blocks.
# Also simple test for creating dynamic and static VDI images. # 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 # Live snapshot tests
# #

View File

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

View File

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

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# vpc (VHD) format input validation tests # 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 # 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 # Test for discarding compressed clusters on qcow2 images
# #

View File

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

View File

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

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Test case for drive-mirror to NBD # 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 # 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 # Commit changes into backing chains and empty the top image if the
# backing image is not explicitly specified # 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 # 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 # Test valid filenames for blkdebug and blkverify representatively for
# other protocols (such as NBD) when queried # other protocols (such as NBD) when queried

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Test short file I/O # 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 # 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 # 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 # 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 # Create, read, write big image
# #

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Test preallocated resize of raw images # 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 # 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 # Test case for repairing qcow2 images which cannot be repaired using
# the on-disk refcount structures # 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 # 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 # 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 # Test case for non-existing backing file when creating a qcow2 image
# and not specifying the size # and not specifying the size

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# #
# Test cases for different refcount_bits values # 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 # Test case for accessing creation options on image formats and
# protocols not supporting image creation # 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 # Test invalid backing file format in qcow2 images
# #

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