* [LTP] [PATCH v2] mount/mount05.c: format the device when necessary
@ 2013-08-27 3:14 DAN LI
2013-08-27 3:13 ` Wanlong Gao
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: DAN LI @ 2013-08-27 3:14 UTC (permalink / raw)
To: LTP list
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 | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/testcases/kernel/syscalls/mount/mount05.c b/testcases/kernel/syscalls/mount/mount05.c
index 4b2a07c..fb5a385 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) {
+ tst_mkfs(NULL, device, fs_type, 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");
@@ -133,7 +135,7 @@ void setup(void)
void cleanup(void)
{
- if (dflag && tflag)
+ if (dflag)
if (umount(mntpoint_src) != 0)
tst_brkm(TBROK | TTERRNO, NULL, "umount(2) failed");
--
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
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [LTP] [PATCH v2] mount/mount05.c: format the device when necessary
2013-08-27 3:14 [LTP] [PATCH v2] mount/mount05.c: format the device when necessary DAN LI
@ 2013-08-27 3:13 ` Wanlong Gao
2013-08-27 11:46 ` chrubis
2013-08-28 5:21 ` Wanlong Gao
2 siblings, 0 replies; 4+ messages in thread
From: Wanlong Gao @ 2013-08-27 3:13 UTC (permalink / raw)
To: DAN LI; +Cc: LTP list
On 08/27/2013 11:14 AM, DAN LI wrote:
> Format the device only when "-D device" & "-T type" are specified.
>
> Signed-off-by: DAN LI <li.dan@cn.fujitsu.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
------------------------------------------------------------------------------
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH v2] mount/mount05.c: format the device when necessary
2013-08-27 3:14 [LTP] [PATCH v2] mount/mount05.c: format the device when necessary DAN LI
2013-08-27 3:13 ` Wanlong Gao
@ 2013-08-27 11:46 ` chrubis
2013-08-28 5:21 ` Wanlong Gao
2 siblings, 0 replies; 4+ messages in thread
From: chrubis @ 2013-08-27 11:46 UTC (permalink / raw)
To: DAN LI; +Cc: LTP list
Hi!
>
> Format the device only when "-D device" & "-T type" are specified.
>
> Signed-off-by: DAN LI <li.dan@cn.fujitsu.com>
Acked.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH v2] mount/mount05.c: format the device when necessary
2013-08-27 3:14 [LTP] [PATCH v2] mount/mount05.c: format the device when necessary DAN LI
2013-08-27 3:13 ` Wanlong Gao
2013-08-27 11:46 ` chrubis
@ 2013-08-28 5:21 ` Wanlong Gao
2 siblings, 0 replies; 4+ messages in thread
From: Wanlong Gao @ 2013-08-28 5:21 UTC (permalink / raw)
To: DAN LI; +Cc: LTP list
On 08/27/2013 11:14 AM, DAN LI wrote:
> Format the device only when "-D device" & "-T type" are specified.
>
> Signed-off-by: DAN LI <li.dan@cn.fujitsu.com>
Pushed, thank you.
Wanlong Gao
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-08-28 5:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-27 3:14 [LTP] [PATCH v2] mount/mount05.c: format the device when necessary DAN LI
2013-08-27 3:13 ` Wanlong Gao
2013-08-27 11:46 ` chrubis
2013-08-28 5:21 ` Wanlong Gao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox