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

* Re: [LTP] [PATCH] df/df01.sh: Fix 'mkfs.xfs' error.
  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>
  0 siblings, 1 reply; 3+ messages in thread
From: Cyril Hrubis @ 2015-06-22  9:19 UTC (permalink / raw)
  To: Zeng Linggang; +Cc: ltp-list

Hi!
> '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

What about adding tst_mkfs() into the test library and put all
workarounds for specific filesystems there (as we do in the C library)?
Because otherwise we would need to copy this snippet of code into all
testcases that use mkfs...

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH v2 1/2] test.sh: Add tst_mkfs()
       [not found]   ` <1435204608.2550.20.camel@G08FNSTD140232.g08.fujitsu.local>
@ 2015-06-29 13:50     ` Cyril Hrubis
  0 siblings, 0 replies; 3+ messages in thread
From: Cyril Hrubis @ 2015-06-29 13:50 UTC (permalink / raw)
  To: Zeng Linggang; +Cc: ltp-list

Hi!
Both pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[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