Message ID | 390c0b08c7beb83da3a8ef5b880db223a096d525.1543883650.git.alifm@linux.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [for,3.1?,or,4,v4,1/1] qemu-iotests: Don't run the test when user is root | expand |
diff --git a/tests/qemu-iotests/232 b/tests/qemu-iotests/232 index 0708b8b..1d34242 100755 --- a/tests/qemu-iotests/232 +++ b/tests/qemu-iotests/232 @@ -92,6 +92,11 @@ echo chmod a-w $TEST_IMG +if [ -w $TEST_IMG ] +then + _notrun "Cannot run this test as root user" +fi + run_qemu_info_block -drive driver=file,file="$TEST_IMG",if=none,read-only=on,auto-read-only=off run_qemu_info_block -drive driver=file,file="$TEST_IMG",if=none,read-only=on,auto-read-only=on run_qemu_info_block -drive driver=file,file="$TEST_IMG",if=none,read-only=on