'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...@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

Reply via email to