Skip to content

Commit

Permalink
iotests: skip 232 when run tests as root
Browse files Browse the repository at this point in the history
chmod a-w don't help under root, so skip the test in such case.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
  • Loading branch information
Vladimir Sementsov-Ogievskiy authored and kevmw committed Sep 10, 2019
1 parent cb73747 commit d885ac3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/qemu-iotests/232
Expand Up @@ -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
Expand Down

0 comments on commit d885ac3

Please sign in to comment.