iotests: skip 232 when run tests as root
PATCH v2 1/1 iotests: skip 232 when run tests as root
chmod a-w don't help under root, so skip the test in such case.
Signed-off-by Vladimir Sementsov-Ogievskiy <[email protected]>
---
v2: move new check under TEST_IMG=TEST_IMG_FILE workaround [Kevin]
tests/qemu-iotests/232 | 6 ++++++ 1 file changed, 6 insertions(+)
tests/qemu-iotests/232 +6 -0
@@ -74,6 +74,12 @@ if [ -n "$TEST_IMG_FILE" ]; then TEST_IMG=$TEST_IMG_FILE fi +chmod a-w $TEST_IMG +(echo test > $TEST_IMG) 2>/dev/null && \ + _notrun "Readonly attribute is ignored, probably you run this test as" \ + "root, which is unsupported." +chmod a+w $TEST_IMG + echo echo "=== -drive with read-write image: read-only/auto-read-only combinations ===" echo
Signature · 1 line
2.18.0
Kevin Wolf
AppliedAm 03.09.2019 um 15:50 hat Vladimir Sementsov-Ogievskiy geschrieben:
Quoted 3 lines
chmod a-w don't help under root, so skip the test in such case.
Signed-off-by Vladimir Sementsov-Ogievskiy <[email protected]>
Thanks, applied to the block branch.
Kevin
Quoted 15 lines · Vladimir Sementsov-Ogievskiy
chmod a-w don't help under root, so skip the test in such case.
Signed-off-by Vladimir Sementsov-Ogievskiy <[email protected]>---
v2: move new check under TEST_IMG=TEST_IMG_FILE workaround [Kevin]
tests/qemu-iotests/232 | 6 ++++++ 1 file changed, 6 insertions(+)tests/qemu-iotests/232 +0
-0
tests/qemu-iotests/232 if [ -n "$TEST_IMG_FILE" ]; then · line 79
Quoted 6 lines
tests/qemu-iotests/232 +3
-0@@ -74,6 +74,12 @@ if [ -n "$TEST_IMG_FILE" ]; then TEST_IMG=$TEST_IMG_FILE fi +chmod a-w $TEST_IMG +(echo test > $TEST_IMG) 2>/dev/null && \ + _notrun "Readonly attribute is ignored, probably you run this test as" \
s/run/ran/
Quoted 7 lines
tests/qemu-iotests/232 +3
-0+ "root, which is unsupported." +chmod a+w $TEST_IMG + echo echo "=== -drive with read-write image: read-only/auto-read-only combinations ===" echo
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org