]> git.proxmox.com Git - mirror_qemu.git/commit
iotests: Use absolute paths for executables
authorMax Reitz <mreitz@redhat.com>
Sun, 2 Jul 2017 15:05:09 +0000 (17:05 +0200)
committerMax Reitz <mreitz@redhat.com>
Tue, 11 Jul 2017 15:45:00 +0000 (17:45 +0200)
commit3190683ea322f2c779b85b3f8f59b2f11bdacb2e
tree17cfc0bf2903c8515aa7baae252d87d95fafe036
parentae50b71db01df0bb0b39694ab12354b80c9c95df
iotests: Use absolute paths for executables

A user may specify a relative path for accessing qemu, qemu-img, etc.
through environment variables ($QEMU_PROG and friends) or a symlink.

If a test decides to change its working directory, relative paths will
cease to work, however. Work around this by making all of the paths to
programs that should undergo testing absolute. Besides "realpath", we
also have to use "type -p" to support programs in $PATH.

As a side effect, this fixes specifying these programs as symlinks for
out-of-tree builds: Before, you would have to create two symlinks, one
in the build and one in the source tree (the first one for common.config
to find, the second one for the iotest to use). Now it is sufficient to
create one in the build tree because common.config will resolve it.

Reported-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-id: 20170702150510.23276-2-mreitz@redhat.com
Reviewed-by: Eric Blake <eblake@redhat.com>
Tested-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
tests/qemu-iotests/common.config