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>
This commit is contained in:
Eric Blake 2018-11-16 15:50:02 -06:00
parent bb39c47d70
commit 8cedcffdc1
35 changed files with 86 additions and 86 deletions

View file

@ -40,13 +40,13 @@ _supported_fmt qcow2
_supported_proto file
_supported_os Linux
function filter_test_dir()
filter_test_dir()
{
sed -e "s#$IMGPROTO:$TEST_DIR#TEST_DIR#g" \
-e "s#$TEST_DIR#TEST_DIR#g"
}
function test_qemu_img()
test_qemu_img()
{
echo qemu-img "$@" | filter_test_dir
$QEMU_IMG "$@" 2>&1 | filter_test_dir