From: DAN LI <li.dan@cn.fujitsu.com>
To: LTP list <ltp-list@lists.sourceforge.net>
Subject: [LTP] [PATCH] mount/mount05.c: format the device when necessary
Date: Mon, 26 Aug 2013 14:08:08 +0800 [thread overview]
Message-ID: <521AF0C8.6020704@cn.fujitsu.com> (raw)
Format the device only when "-D device" & "-T type" are specified.
Signed-off-by: DAN LI <li.dan@cn.fujitsu.com>
---
testcases/kernel/syscalls/mount/mount05.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/testcases/kernel/syscalls/mount/mount05.c b/testcases/kernel/syscalls/mount/mount05.c
index 4b2a07c..b4be67b 100644
--- a/testcases/kernel/syscalls/mount/mount05.c
+++ b/testcases/kernel/syscalls/mount/mount05.c
@@ -113,7 +113,6 @@ int main(int argc, char *argv[])
void setup(void)
{
tst_require_root(NULL);
- tst_mkfs(NULL, device, fstype, NULL);
tst_sig(NOFORK, DEF_HANDLER, cleanup);
@@ -122,9 +121,12 @@ void setup(void)
SAFE_MKDIR(cleanup, mntpoint_src, DIR_MODE);
SAFE_MKDIR(cleanup, mntpoint_des, DIR_MODE);
- if (dflag && tflag)
+ if (dflag && tflag) {
+ tst_mkfs(NULL, device, fstype, NULL);
+
if (mount(device, mntpoint_src, fs_type, 0, NULL) == -1)
tst_brkm(TBROK | TERRNO, cleanup, "mount failed");
+ }
SAFE_FILE_PRINTF(cleanup, file_src, "TEST FILE");
--
1.8.1
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next reply other threads:[~2013-08-26 6:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-26 6:08 DAN LI [this message]
2013-08-27 2:20 ` [LTP] [PATCH] mount/mount05.c: format the device when necessary Wanlong Gao
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=521AF0C8.6020704@cn.fujitsu.com \
--to=li.dan@cn.fujitsu.com \
--cc=ltp-list@lists.sourceforge.net \
/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