tests: Use "command -v" instead of which(1) in shell scripts
commite465ce7d09939d631f1861e0bd8873417c1c0d65
authorFam Zheng <famz@redhat.com>
Wed, 19 Nov 2014 07:07:12 +0000 (19 15:07 +0800)
committerKevin Wolf <kwolf@redhat.com>
Wed, 10 Dec 2014 09:31:12 +0000 (10 10:31 +0100)
treeedf9463524944ddf518d0255f55b4690f8d855f0
parent4c58e80acd61e24f307c1b2557079cc77dc9150a
tests: Use "command -v" instead of which(1) in shell scripts

When which(1) is not installed, we would complain "perl not found"
because it's the first set_prog_path check. The error message is
wrong.

Fix it by using "command -v", a native way to query the existence of a
command.

Suggested-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1416380832-9697-1-git-send-email-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/common
tests/qemu-iotests/common.config