public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] df/df01.sh: Fix 'mkfs.xfs' error.
@ 2015-06-19  4:32 Zeng Linggang
  2015-06-22  9:19 ` Cyril Hrubis
  0 siblings, 1 reply; 3+ messages in thread
From: Zeng Linggang @ 2015-06-19  4:32 UTC (permalink / raw)
  To: ltp-list

'runltp' use a loop device. If we want to 'mkfs.xfs' the loop device,
we need to specify '-f(force)' option, if not 'mkfs.xfs' would go
wrong. The mean of '-f' option is different between 'xfs' and others.
So we only add the option for 'xfs'.

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
---
 testcases/commands/df/df01.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/testcases/commands/df/df01.sh b/testcases/commands/df/df01.sh
index fe573e5..2b7b804 100755
--- a/testcases/commands/df/df01.sh
+++ b/testcases/commands/df/df01.sh
@@ -32,7 +32,11 @@ setup()
 
 	tst_acquire_device
 
-	ROD_SILENT mkfs.${FS_TYPE} ${TST_DEVICE}
+	if [ ${FS_TYPE} = "xfs" ]; then
+		ROD_SILENT mkfs.${FS_TYPE} -f ${TST_DEVICE}
+	else
+		ROD_SILENT mkfs.${FS_TYPE} ${TST_DEVICE}
+	fi
 
 	ROD_SILENT mkdir -p mntpoint
 
-- 
1.9.3


------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-29 13:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-19  4:32 [LTP] [PATCH] df/df01.sh: Fix 'mkfs.xfs' error Zeng Linggang
2015-06-22  9:19 ` Cyril Hrubis
     [not found]   ` <1435204608.2550.20.camel@G08FNSTD140232.g08.fujitsu.local>
2015-06-29 13:50     ` [LTP] [PATCH v2 1/2] test.sh: Add tst_mkfs() Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox