qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH] iotests: skip 232 when run tests as root


From: Kevin Wolf
Subject: Re: [Qemu-block] [PATCH] iotests: skip 232 when run tests as root
Date: Tue, 3 Sep 2019 15:38:10 +0200
User-agent: Mutt/1.12.0 (2019-05-25)

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 <address@hidden>
> ---
> 
>  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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]