xfstests: add test 200, exercise read-only block devices and mounts

Make sure we do the right thing with blockdevices with a hard read-only
flag.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
This commit is contained in:
Christoph Hellwig
2009-01-10 21:38:24 +01:00
committed by Christoph Hellwig
parent 0569ea9cbf
commit 22b88d4f52
3 changed files with 145 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
QA output created by 200
setting device read-only
mounting read-only block device:
mount: block device SCRATCH_DEV is write-protected, mounting read-only
touching file on read-only filesystem (should fail)
touch: cannot touch `SCRATCH_MNT/foo': Read-only file system
unmounting read-only filesystem
setting device read-write
mounting read-write block device:
touch files
going down:
unmounting shutdown filesystem:
setting device read-only
mounting filesystem that needs recovery on a read-only device:
mount: block device SCRATCH_DEV is write-protected, mounting read-only
mount: cannot mount block device SCRATCH_DEV read-only
unmounting read-only filesystem
umount: SCRATCH_MNT: not mounted
mounting filesystem with -o norecovery on a read-only device:
mount: block device SCRATCH_DEV is write-protected, mounting read-only
unmounting read-only filesystem
setting device read-write
mounting filesystem that needs recovery with -o ro:
*** done