* [Qemu-devel] [PATCH] iotests: skip 232 when run tests as root
@ 2019-09-03 13:21 Vladimir Sementsov-Ogievskiy
2019-09-03 13:38 ` Kevin Wolf
0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2019-09-03 13:21 UTC (permalink / raw)
To: qemu-block; +Cc: kwolf, 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>
---
tests/qemu-iotests/232 | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tests/qemu-iotests/232 b/tests/qemu-iotests/232
index 2063f78876..da35a63d85 100755
--- a/tests/qemu-iotests/232
+++ b/tests/qemu-iotests/232
@@ -70,6 +70,12 @@ size=128M
_make_test_img $size
+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
+
if [ -n "$TEST_IMG_FILE" ]; then
TEST_IMG=$TEST_IMG_FILE
fi
--
2.18.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] iotests: skip 232 when run tests as root
2019-09-03 13:21 [Qemu-devel] [PATCH] iotests: skip 232 when run tests as root Vladimir Sementsov-Ogievskiy
@ 2019-09-03 13:38 ` Kevin Wolf
2019-09-03 13:48 ` Vladimir Sementsov-Ogievskiy
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Wolf @ 2019-09-03 13:38 UTC (permalink / raw)
To: Vladimir Sementsov-Ogievskiy; +Cc: qemu-devel, qemu-block, mreitz
Am 03.09.2019 um 15:21 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>
> ---
>
> tests/qemu-iotests/232 | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/tests/qemu-iotests/232 b/tests/qemu-iotests/232
> index 2063f78876..da35a63d85 100755
> --- a/tests/qemu-iotests/232
> +++ b/tests/qemu-iotests/232
> @@ -70,6 +70,12 @@ size=128M
>
> _make_test_img $size
>
> +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
> +
> if [ -n "$TEST_IMG_FILE" ]; then
> TEST_IMG=$TEST_IMG_FILE
> fi
I think you need to move the new check below this so that $TEST_IMG_FILE
is considered because otherwise the test will fail for luks:
+chmod: cannot access 'driver=luks,key-secret=keysec0,file.filename=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/t.luks': No such file or directory
+chmod: cannot access 'driver=luks,key-secret=keysec0,file.filename=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/t.luks': No such file or directory
Kevin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] iotests: skip 232 when run tests as root
2019-09-03 13:38 ` Kevin Wolf
@ 2019-09-03 13:48 ` Vladimir Sementsov-Ogievskiy
0 siblings, 0 replies; 3+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2019-09-03 13:48 UTC (permalink / raw)
To: Kevin Wolf
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, mreitz@redhat.com
03.09.2019 16:38, Kevin Wolf wrote:
> Am 03.09.2019 um 15:21 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>
>> ---
>>
>> tests/qemu-iotests/232 | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/tests/qemu-iotests/232 b/tests/qemu-iotests/232
>> index 2063f78876..da35a63d85 100755
>> --- a/tests/qemu-iotests/232
>> +++ b/tests/qemu-iotests/232
>> @@ -70,6 +70,12 @@ size=128M
>>
>> _make_test_img $size
>>
>> +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
>> +
>> if [ -n "$TEST_IMG_FILE" ]; then
>> TEST_IMG=$TEST_IMG_FILE
>> fi
>
> I think you need to move the new check below this so that $TEST_IMG_FILE
> is considered because otherwise the test will fail for luks:
>
> +chmod: cannot access 'driver=luks,key-secret=keysec0,file.filename=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/t.luks': No such file or directory
> +chmod: cannot access 'driver=luks,key-secret=keysec0,file.filename=/home/kwolf/source/qemu/tests/qemu-iotests/scratch/t.luks': No such file or directory
>
Thanks, will resend
--
Best regards,
Vladimir
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-09-03 14:05 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:21 [Qemu-devel] [PATCH] iotests: skip 232 when run tests as root Vladimir Sementsov-Ogievskiy
2019-09-03 13:38 ` Kevin Wolf
2019-09-03 13:48 ` Vladimir Sementsov-Ogievskiy
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).