All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] commands/df01.sh: Add check for mkfs.${FS_TYPE} command
@ 2018-02-14  8:29 Xiao Yang
  2018-02-26 10:50 ` Xiao Yang
  2018-02-27  9:47 ` Petr Vorel
  0 siblings, 2 replies; 3+ messages in thread
From: Xiao Yang @ 2018-02-14  8:29 UTC (permalink / raw)
  To: ltp

Since commit 521df0e, tst_rod can detect nonexistent command and report TBROK
in tst_mkfs(), so we can check mkfs.${FS_TYPE} command before tst_mkfs().

If mkfs.exfat command did not exist, running df01_exfat got the following errors:
-----------------------------------------------------------------
tst_device.c:230: INFO: Using test device LTP_DEV='/dev/loop0'
 1 TINFO: Formatting /dev/loop0 with exfat extra opts=''
 1 TBROK: mkfs.exfat /dev/loop0 failed
 1 TINFO: The /dev/loop0 is not mounted, skipping umount
-----------------------------------------------------------------

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 testcases/commands/df/df01.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/testcases/commands/df/df01.sh b/testcases/commands/df/df01.sh
index 0552327..fbf1e2f 100755
--- a/testcases/commands/df/df01.sh
+++ b/testcases/commands/df/df01.sh
@@ -49,6 +49,10 @@ parse_args()
 
 setup()
 {
+	if [ -n "$FS_TYPE" ]; then
+		tst_check_cmds mkfs.${FS_TYPE}
+	fi
+
 	tst_mkfs ${FS_TYPE} ${TST_DEVICE}
 
 	ROD_SILENT mkdir -p mntpoint
-- 
1.8.3.1




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

end of thread, other threads:[~2018-02-27  9:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-14  8:29 [LTP] [PATCH] commands/df01.sh: Add check for mkfs.${FS_TYPE} command Xiao Yang
2018-02-26 10:50 ` Xiao Yang
2018-02-27  9:47 ` Petr Vorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.