[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/57] iotests: Work around failing readlink -f
From: |
Paolo Bonzini |
Subject: |
[PULL 02/57] iotests: Work around failing readlink -f |
Date: |
Sat, 19 Sep 2020 11:58:21 -0400 |
From: Max Reitz <mreitz@redhat.com>
On macOS, (out of the box) readlink does not have -f. If the recent
"readlink -f" call introduced by b1cbc33a397 fails, just fall back to
the old behavior (which means you can run the iotests only from the
build tree, but that worked fine for six years, so it should be fine
still).
Keep any potential error message on stderr. If users want to run the
iotests from outside the build tree, this may point them to what's wrong
(with their system).
Fixes: b1cbc33a3971b6bb005d5ac3569feae35a71de0f
("iotests: Allow running from different directory")
Reported-by: Claudio Fontana <cfontana@suse.de>
Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
tests/qemu-iotests/check | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index e14a1f354d..75675e1a18 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -45,6 +45,10 @@ then
fi
source_iotests=$(cd "$source_iotests"; pwd) || _init_error "failed to
enter source tree"
build_iotests=$(readlink -f $(dirname "$0"))
+ if [ "$?" -ne 0 ]; then
+ # Perhaps -f is unsupported, revert to pre-b1cbc33a397 behavior
+ build_iotests=$PWD
+ fi
else
# called from the source tree
source_iotests=$PWD
--
2.26.2
- [PULL 00/57] Misc patches for 2020-09-19, Paolo Bonzini, 2020/09/19
- [PULL 02/57] iotests: Work around failing readlink -f,
Paolo Bonzini <=
- [PULL 04/57] ninjatool: rebuild multi-output targets if outputs are missing, Paolo Bonzini, 2020/09/19
- [PULL 01/57] tests: add missing genh dependency, Paolo Bonzini, 2020/09/19
- [PULL 07/57] WHPX: vmware cpuid leaf for tsc and apic frequency, Paolo Bonzini, 2020/09/19
- [PULL 03/57] meson: clean up build_by_default, Paolo Bonzini, 2020/09/19
- [PULL 06/57] meson: error out if qemu_suffix starts with /, Paolo Bonzini, 2020/09/19
- [PULL 05/57] meson: fix MSI rule, Paolo Bonzini, 2020/09/19
- [PULL 08/57] configure: Do not intent to build WHPX on 32-bit host, Paolo Bonzini, 2020/09/19
- [PULL 09/57] MAINTAINERS: add Paolo Bonzini as RCU maintainer, Paolo Bonzini, 2020/09/19
- [PULL 16/57] doc: Cleanup "'-mem-path' fallback to RAM" deprecation text, Paolo Bonzini, 2020/09/19
- [PULL 12/57] vhost-scsi: support inflight io track, Paolo Bonzini, 2020/09/19