public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: xfs@oss.sgi.com
Subject: [PATCH] update xfsqa 189 to check for writeable fs after remount rw
Date: Sun, 12 Oct 2008 14:31:36 +0200	[thread overview]
Message-ID: <20081012123136.GB30272@lst.de> (raw)


Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: xfs-cmds/xfstests/189
===================================================================
--- xfs-cmds.orig/xfstests/189	2008-08-15 06:11:24.000000000 -1000
+++ xfs-cmds/xfstests/189	2008-10-12 02:24:25.000000000 -1000
@@ -90,6 +90,34 @@
 }
 
 #
+# make sure we really can write to a filesystem after remount,rw
+#
+_test_remount_write()
+{
+	echo
+	echo "try touching file after remount ro -> rw with options"
+	echo
+	_scratch_mount
+	[ $? -eq 0 ] || echo "mount (1) failed unexpectedly"
+
+	touch $SCRATCH_MNT/foobar
+	[ $? -eq 0 ] || echo "touch (1) failed unexpectedly"
+
+	umount $SCRATCH_MNT
+
+	_scratch_mount -o ro
+	[ $? -eq 0 ] || echo "mount (2) failed unexpectedly"
+
+	_mount -o remount,rw,filestreams $SCRATCH_MNT
+	[ $? -eq 0 ] || echo "remount failed unexpectedly"
+
+	touch $SCRATCH_MNT/foobar
+	[ $? -eq 0 ] || echo "touch (2) failed unexpectedly"
+
+	umount $SCRATCH_MNT
+}
+
+#
 # barrier is the only option we can change besides ro<->rw which is partially
 # handled by the VFS and tested elsewhere.  Make sure mount accepts going
 # from barrier (which also is the default) to nobarrier and back.
@@ -166,6 +194,7 @@
 
 _add_scratch_fstab
 _test_remount_rw
+_test_remount_write
 
 echo
 echo "add noikeep to fstab for scratch"

                 reply	other threads:[~2008-10-12 12:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081012123136.GB30272@lst.de \
    --to=hch@lst.de \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox