* [Qemu-devel] [PATCH v2] iotests: skip 232 when run tests as root
@ 2019-09-03 13:50 Vladimir Sementsov-Ogievskiy
2019-09-03 14:16 ` Kevin Wolf
2019-09-03 15:05 ` Eric Blake
0 siblings, 2 replies; 3+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2019-09-03 13:50 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, vsementsov, qemu-devel, mreitz
chmod a-w don't help under root, so skip the test in such case.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
v2: move new check under TEST_IMG=TEST_IMG_FILE workaround [Kevin]
tests/qemu-iotests/232 | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tests/qemu-iotests/232 b/tests/qemu-iotests/232
index 2063f78876..65b0e42063 100755
--- a/tests/qemu-iotests/232
+++ b/tests/qemu-iotests/232
@@ -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
--
2.18.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH v2] iotests: skip 232 when run tests as root
2019-09-03 13:50 [Qemu-devel] [PATCH v2] iotests: skip 232 when run tests as root Vladimir Sementsov-Ogievskiy
@ 2019-09-03 14:16 ` Kevin Wolf
2019-09-03 15:05 ` Eric Blake
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2019-09-03 14:16 UTC (permalink / raw)
To: Vladimir Sementsov-Ogievskiy; +Cc: qemu-devel, qemu-block, mreitz
Am 03.09.2019 um 15:50 hat Vladimir Sementsov-Ogievskiy geschrieben:
> chmod a-w don't help under root, so skip the test in such case.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Thanks, applied to the block branch.
Kevin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH v2] iotests: skip 232 when run tests as root
2019-09-03 13:50 [Qemu-devel] [PATCH v2] iotests: skip 232 when run tests as root Vladimir Sementsov-Ogievskiy
2019-09-03 14:16 ` Kevin Wolf
@ 2019-09-03 15:05 ` Eric Blake
1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2019-09-03 15:05 UTC (permalink / raw)
To: Vladimir Sementsov-Ogievskiy, qemu-block; +Cc: kwolf, qemu-devel, mreitz
[-- Attachment #1.1: Type: text/plain, Size: 1112 bytes --]
On 9/3/19 8:50 AM, Vladimir Sementsov-Ogievskiy wrote:
> chmod a-w don't help under root, so skip the test in such case.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
>
> v2: move new check under TEST_IMG=TEST_IMG_FILE workaround [Kevin]
>
> tests/qemu-iotests/232 | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/tests/qemu-iotests/232 b/tests/qemu-iotests/232
> index 2063f78876..65b0e42063 100755
> --- a/tests/qemu-iotests/232
> +++ b/tests/qemu-iotests/232
> @@ -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/
> + "root, which is unsupported."
> +chmod a+w $TEST_IMG
> +
> echo
> echo "=== -drive with read-write image: read-only/auto-read-only combinations ==="
> echo
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-09-03 15:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-03 13:50 [Qemu-devel] [PATCH v2] iotests: skip 232 when run tests as root Vladimir Sementsov-Ogievskiy
2019-09-03 14:16 ` Kevin Wolf
2019-09-03 15:05 ` Eric Blake
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).