Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Pavel Shilovsky <pshilovsky-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
To: fstests-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	samba-technical-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org,
	David Disseldorp <ddiss-l3A5Bk7waGM@public.gmane.org>,
	Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH v2 1/3] generic/013: encapsulate remount during cleanup
Date: Wed, 27 Aug 2014 00:28:36 +0400	[thread overview]
Message-ID: <1409084918-17764-2-git-send-email-pshilovsky@samba.org> (raw)
In-Reply-To: <1409084918-17764-1-git-send-email-pshilovsky-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>

The existing code calls remount for $TEST_DEV with constantly defined
mount options. This can fail if a user specifies different mount options.
Fix this by using new _test_remount() call that remounts $TEST_DEV.

Reviewed-by: Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Pavel Shilovsky <pshilovsky-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
---
 common/rc         | 6 ++++++
 tests/generic/013 | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/common/rc b/common/rc
index 16da898..d9c9995 100644
--- a/common/rc
+++ b/common/rc
@@ -218,6 +218,12 @@ _test_mount()
     _mount -t $FSTYP $TEST_OPTIONS $TEST_FS_MOUNT_OPTS $SELINUX_MOUNT_OPTIONS $* $TEST_DEV $TEST_DIR
 }
 
+_test_remount()
+{
+    $UMOUNT_PROG $TEST_DEV
+    _test_mount
+}
+
 _scratch_mkfs_options()
 {
     _scratch_options mkfs
diff --git a/tests/generic/013 b/tests/generic/013
index 93d9904..534c9f0 100755
--- a/tests/generic/013
+++ b/tests/generic/013
@@ -35,7 +35,7 @@ _cleanup()
 {
     cd /
     # we might get here with a RO FS
-    mount -o remount,rw $TEST_DEV >/dev/null 2>&1
+    _test_remount
     # now remove fsstress directory.
     # N.B. rm(1) on IRIX can find problems when building up a long pathname
     # such that what it has is greater the 1024 chars and will
-- 
1.9.1

  parent reply	other threads:[~2014-08-26 20:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26 20:28 [PATCH v2 0/3] CIFS support for XFS test suite Pavel Shilovsky
     [not found] ` <1409084918-17764-1-git-send-email-pshilovsky-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
2014-08-26 20:28   ` Pavel Shilovsky [this message]
     [not found]     ` <1409084918-17764-2-git-send-email-pshilovsky-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
2014-08-28 17:08       ` [PATCH v2 1/3] generic/013: encapsulate remount during cleanup Christoph Hellwig
2014-08-28 18:50         ` Pavel Shilovsky
2014-08-26 20:28   ` [PATCH v2 2/3] common: add cifs support Pavel Shilovsky
     [not found]     ` <1409084918-17764-3-git-send-email-pshilovsky-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
2014-08-28 17:18       ` Christoph Hellwig
2014-08-28 19:08         ` Pavel Shilovsky
2014-08-26 20:28   ` [PATCH v2 3/3] cifs: skip tests that need POSIX support for nounix mounts Pavel Shilovsky
     [not found]     ` <1409084918-17764-4-git-send-email-pshilovsky-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
2014-08-27 15:58       ` Christoph Hellwig
     [not found]         ` <20140827155832.GA3103-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2014-08-27 16:17           ` Steve French
     [not found]             ` <CAH2r5mtOF3HgsDiuZSTfu62p8do35S6a9Sy74bVOAD9CXphVQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-27 17:13               ` Christoph Hellwig
2014-08-27 19:49           ` Pavel Shilovsky
     [not found]             ` <2DA51A6D-2D91-4582-831B-23C997C37543-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-27 22:50               ` Christoph Hellwig
2014-08-28  7:25                 ` Pavel Shilovsky
2014-08-27  6:59   ` [PATCH v2 0/3] CIFS support for XFS test suite Pavel Shilovsky

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=1409084918-17764-2-git-send-email-pshilovsky@samba.org \
    --to=pshilovsky-eunubhrolfbytjvyw6ydsg@public.gmane.org \
    --cc=ddiss-l3A5Bk7waGM@public.gmane.org \
    --cc=fstests-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=samba-technical-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
    --cc=smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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