public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: chrubis@suse.cz
To: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH v2] fs/ext4-new-features: fix wrong test point when running ext4-persist-prealloc
Date: Tue, 15 Jul 2014 11:50:51 +0200	[thread overview]
Message-ID: <20140715095051.GA26664@rei> (raw)
In-Reply-To: <1403596982-21645-1-git-send-email-wangxg.fnst@cn.fujitsu.com>

Hi!
> ext4-persist-prealloc test will call test cases under 'testcases/kernel/syscalls
> /fallocate' to have persist prealloc test for ext4 filesystem. But currently
> fallocate[0-3] cases will have tests in a different filesystem, which the directory
> created by tst_tmpdir() is in. This is wrong, fix it.
> 
> Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
> ---
>  .../ext4-persist-prealloc/ext4_persist_prealloc_test.sh              | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/testcases/kernel/fs/ext4-new-features/ext4-persist-prealloc/ext4_persist_prealloc_test.sh b/testcases/kernel/fs/ext4-new-features/ext4-persist-prealloc/ext4_persist_prealloc_test.sh
> index 20b66f8..d577bb5 100755
> --- a/testcases/kernel/fs/ext4-new-features/ext4-persist-prealloc/ext4_persist_prealloc_test.sh
> +++ b/testcases/kernel/fs/ext4-new-features/ext4-persist-prealloc/ext4_persist_prealloc_test.sh
> @@ -46,6 +46,7 @@ ext4_test_persist_prealloc()
>  
>  	ret=1
>  
> +	temp_tmpdir=$TMPDIR
>  	for ((i = 1; i <= 3; i++))
>  	{
>  		if ! command -v fallocate0${i} > /dev/null 2>&1; then
> @@ -56,13 +57,15 @@ ext4_test_persist_prealloc()
>  			return
>  		fi
>  
> -		fallocate0${i} | grep -q "CONF"
> +		TMPDIR=mnt_point; fallocate0${i} | grep -q "CONF"
>  		if [ $? -ne $ret ]; then
>  			tst_resm TFAIL "fallocate's return value is not expected"
>  			umount mnt_point
> +			TMPDIR=$temp_tmpdir
>  			return
>  		fi
>  	}
> +	TMPDIR=$temp_tmpdir

I've moved the TMPDIR restoration closer to the fallocate call so it's
now:

+               temp_tmpdir=$TMPDIR
+               TMPDIR=mnt_point; fallocate0${i} | grep -q "CONF"
+               TMPDIR=$temp_tmpdir


And pushed, thanks.

PS: Sorry for the delay.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2014-07-15  9:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24  8:03 [LTP] [PATCH v2] fs/ext4-new-features: fix wrong test point when running ext4-persist-prealloc Xiaoguang Wang
2014-07-15  9:50 ` chrubis [this message]
     [not found]   ` <1406079275.2313.6.camel@G08JYZSD130126>
     [not found]     ` <1406698959.3928.6.camel@G08JYZSD130126>
2014-08-11 12:39       ` [LTP] [PATCH v2] fs/ext4-new-features: Fix chrubis

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=20140715095051.GA26664@rei \
    --to=chrubis@suse.cz \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=wangxg.fnst@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