From b8761cfdd6a1fb0393dc0aa3737f9a01795ae4b0 Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Tue, 15 Sep 2020 14:43:11 +0100 Subject: [PATCH] iotests: Drop readlink -f MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On macOS, (out of the box) readlink does not have -f. We do not really need readlink here, though, it was just a replacement for realpath (which is not available on our BSD test systems), which we needed to make the $(dirname) into an absolute path. Instead of using either, just use "cd; pwd" like is done for $source_iotests. ("iotests: Allow running from different directory") Fixes: b1cbc33a3971b6bb005d5ac3569feae35a71de0f Reported-by: Claudio Fontana Reported-by: Thomas Huth Suggested-by: Peter Maydell Signed-off-by: Max Reitz Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20200914145606.94620-1-mreitz@redhat.com> Message-Id: <20200915134317.11110-3-alex.bennee@linaro.org> --- tests/qemu-iotests/check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index e14a1f354d..678b6e4910 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -44,7 +44,7 @@ then _init_error "failed to obtain source tree name from check symlink" fi source_iotests=$(cd "$source_iotests"; pwd) || _init_error "failed to enter source tree" - build_iotests=$(readlink -f $(dirname "$0")) + build_iotests=$(cd "$(dirname "$0")"; pwd) else # called from the source tree source_iotests=$PWD