summaryrefslogtreecommitdiffstats
path: root/tests/qemu-iotests/046
diff options
context:
space:
mode:
authorEric Blake2018-11-16 22:50:02 +0100
committerEric Blake2018-11-19 18:16:46 +0100
commit8cedcffdc195bc39aeb1373826ba0a45629741e0 (patch)
tree46509d211d6dcf12f6d2923e9a37a1667177f762 /tests/qemu-iotests/046
parentiotests: Also test I/O over NBD TLS (diff)
downloadqemu-8cedcffdc195bc39aeb1373826ba0a45629741e0.tar.gz
qemu-8cedcffdc195bc39aeb1373826ba0a45629741e0.tar.xz
qemu-8cedcffdc195bc39aeb1373826ba0a45629741e0.zip
iotests: Drop use of bash keyword 'function'
Bash allows functions to be declared with or without the leading keyword 'function'; but including the keyword does not comply with POSIX syntax, and is confusing to ksh users where the use of the keyword changes the scoping rules for functions. Stick to the POSIX form through iotests. Done mechanically with: sed -i 's/^function //' $(git ls-files tests/qemu-iotests) Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20181116215002.2124581-1-eblake@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/046')
-rwxr-xr-xtests/qemu-iotests/0466
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/qemu-iotests/046 b/tests/qemu-iotests/046
index 01c0de62d8..5e41d96daa 100755
--- a/tests/qemu-iotests/046
+++ b/tests/qemu-iotests/046
@@ -48,7 +48,7 @@ echo "== creating backing file for COW tests =="
_make_test_img $size
-function backing_io()
+backing_io()
{
local offset=$1
local sectors=$2
@@ -73,7 +73,7 @@ _make_test_img -b "$TEST_IMG.base" 6G
echo
echo "== Some concurrent requests touching the same cluster =="
-function overlay_io()
+overlay_io()
{
# Allocate middle of cluster 1, then write to somewhere before and after it
cat <<EOF
@@ -189,7 +189,7 @@ overlay_io | $QEMU_IO blkdebug::"$TEST_IMG" | _filter_qemu_io |\
echo
echo "== Verify image content =="
-function verify_io()
+verify_io()
{
if ($QEMU_IMG info -U -f "$IMGFMT" "$TEST_IMG" | grep "compat: 0.10" > /dev/null); then
# For v2 images, discarded clusters are read from the backing file