[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 14/28] iotests/308: Test +w on read-only FUSE exports
From: |
Kevin Wolf |
Subject: |
[PULL 14/28] iotests/308: Test +w on read-only FUSE exports |
Date: |
Fri, 9 Jul 2021 14:50:21 +0200 |
From: Max Reitz <mreitz@redhat.com>
Test that +w on read-only FUSE exports returns an EROFS error. u+x on
the other hand should work. (There is no special reason to choose u+x
here, it simply is like +w another flag that is not set by default.)
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210625142317.271673-6-mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
tests/qemu-iotests/308 | 11 +++++++++++
tests/qemu-iotests/308.out | 4 ++++
2 files changed, 15 insertions(+)
diff --git a/tests/qemu-iotests/308 b/tests/qemu-iotests/308
index d13a9a969c..6b386bd523 100755
--- a/tests/qemu-iotests/308
+++ b/tests/qemu-iotests/308
@@ -170,6 +170,17 @@ fuse_export_add 'export-mp' "'mountpoint': '$EXT_MP'"
# Check that the export presents the same data as the original image
$QEMU_IMG compare -f raw -F $IMGFMT -U "$EXT_MP" "$TEST_IMG"
+# Some quick chmod tests
+stat -c 'Permissions pre-chmod: %a' "$EXT_MP"
+
+# Verify that we cannot set +w
+chmod u+w "$EXT_MP" 2>&1 | _filter_testdir | _filter_imgfmt
+stat -c 'Permissions post-+w: %a' "$EXT_MP"
+
+# But that we can set, say, +x (if we are so inclined)
+chmod u+x "$EXT_MP" 2>&1 | _filter_testdir | _filter_imgfmt
+stat -c 'Permissions post-+x: %a' "$EXT_MP"
+
echo
echo '=== Mount over existing file ==='
diff --git a/tests/qemu-iotests/308.out b/tests/qemu-iotests/308.out
index 0e9420645f..fc47bb11a2 100644
--- a/tests/qemu-iotests/308.out
+++ b/tests/qemu-iotests/308.out
@@ -50,6 +50,10 @@ wrote 67108864/67108864 bytes at offset 0
} }
{"return": {}}
Images are identical.
+Permissions pre-chmod: 400
+chmod: changing permissions of 'TEST_DIR/t.IMGFMT.fuse': Read-only file system
+Permissions post-+w: 400
+Permissions post-+x: 500
=== Mount over existing file ===
{'execute': 'block-export-add',
--
2.31.1
- [PULL 04/28] block/rbd: store object_size in BDRVRBDState, (continued)
- [PULL 04/28] block/rbd: store object_size in BDRVRBDState, Kevin Wolf, 2021/07/09
- [PULL 05/28] block/rbd: update s->image_size in qemu_rbd_getlength, Kevin Wolf, 2021/07/09
- [PULL 06/28] block/rbd: migrate from aio to coroutines, Kevin Wolf, 2021/07/09
- [PULL 07/28] block/rbd: add write zeroes support, Kevin Wolf, 2021/07/09
- [PULL 08/28] block/rbd: drop qemu_rbd_refresh_limits, Kevin Wolf, 2021/07/09
- [PULL 09/28] util/uri: do not check argument of uri_free(), Kevin Wolf, 2021/07/09
- [PULL 10/28] export/fuse: Pass default_permissions for mount, Kevin Wolf, 2021/07/09
- [PULL 11/28] export/fuse: Add allow-other option, Kevin Wolf, 2021/07/09
- [PULL 12/28] export/fuse: Give SET_ATTR_SIZE its own branch, Kevin Wolf, 2021/07/09
- [PULL 13/28] export/fuse: Let permissions be adjustable, Kevin Wolf, 2021/07/09
- [PULL 14/28] iotests/308: Test +w on read-only FUSE exports,
Kevin Wolf <=
- [PULL 15/28] iotests/fuse-allow-other: Test allow-other, Kevin Wolf, 2021/07/09
- [PULL 17/28] MAINTAINERS: add block/rbd.c reviewer, Kevin Wolf, 2021/07/09
- [PULL 16/28] block/rbd: fix type of task->complete, Kevin Wolf, 2021/07/09
- [PULL 19/28] blockdev: fix drive-backup transaction endless drained section, Kevin Wolf, 2021/07/09
- [PULL 20/28] qcow2: Prohibit backing file changes in 'qemu-img amend', Kevin Wolf, 2021/07/09
- [PULL 18/28] vhost-user: Fix backends without multiqueue support, Kevin Wolf, 2021/07/09
- [PULL 21/28] qemu-img: Require -F with -b backing image, Kevin Wolf, 2021/07/09
- [PULL 22/28] qemu-img: Improve error for rebase without backing format, Kevin Wolf, 2021/07/09
- [PULL 23/28] qcow2: Fix dangling pointer after reopen for 'file', Kevin Wolf, 2021/07/09
- [PULL 24/28] block: Add bdrv_reopen_queue_free(), Kevin Wolf, 2021/07/09