qemu-iotests: Don't run the test when user is root
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v4 1/1 qemu-iotests: Don't run the test when user is root
Test 232 creates image files with read-only permission and expects an error message when trying to access the image files with read-only and auto-read-only turned off.
Don't run as root user, since root can open files with read/write access for read-only files.
Signed-off-by Farhan Ali <[email protected]>
Reviewed-by Eric Blake <[email protected]>
--- tests/qemu-iotests/232 | 5 +++++ 1 file changed, 5 insertions(+)
tests/qemu-iotests/232 +5 -0
@@ -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
Signature · 1 line
2.7.4