public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] df/df01.sh: Fix 'mkfs.xfs' error.
Date: Mon, 22 Jun 2015 11:19:04 +0200	[thread overview]
Message-ID: <20150622091904.GA6128@rei.suse.de> (raw)
In-Reply-To: <1434688335-29172-1-git-send-email-zenglg.jy@cn.fujitsu.com>

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

  reply	other threads:[~2015-06-22  9:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-19  4:32 [LTP] [PATCH] df/df01.sh: Fix 'mkfs.xfs' error Zeng Linggang
2015-06-22  9:19 ` Cyril Hrubis [this message]
     [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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150622091904.GA6128@rei.suse.de \
    --to=chrubis@suse.cz \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=zenglg.jy@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox