All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] fs/ext4-new-features: fix wrong test point when running ext4-persist-prealloc
@ 2014-06-12  5:42 Xiaoguang Wang
  2014-06-17 13:03 ` chrubis
  0 siblings, 1 reply; 3+ messages in thread
From: Xiaoguang Wang @ 2014-06-12  5:42 UTC (permalink / raw)
  To: ltp-list

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                | 3 +++
 1 file changed, 3 insertions(+)

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..063a701 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,8 @@ ext4_test_persist_prealloc()
 
 	ret=1
 
+	temp_tmpdir=$TMPDIR
+	export TMPDIR=mnt_point
 	for ((i = 1; i <= 3; i++))
 	{
 		if ! command -v fallocate0${i} > /dev/null 2>&1; then
@@ -63,6 +65,7 @@ ext4_test_persist_prealloc()
 			return
 		fi
 	}
+	TMPDIR=$temp_tmpdir
 
 	umount mnt_point
 	if [ $? -ne 0 ]; then
-- 
1.8.2.1


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
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] fs/ext4-new-features: fix wrong test point when running ext4-persist-prealloc
  2014-06-12  5:42 [LTP] [PATCH] fs/ext4-new-features: fix wrong test point when running ext4-persist-prealloc Xiaoguang Wang
@ 2014-06-17 13:03 ` chrubis
       [not found]   ` <53A0F944.40009@cn.fujitsu.com>
  0 siblings, 1 reply; 3+ messages in thread
From: chrubis @ 2014-06-17 13:03 UTC (permalink / raw)
  To: Xiaoguang Wang; +Cc: ltp-list

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                | 3 +++
>  1 file changed, 3 insertions(+)
> 
> 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..063a701 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,8 @@ ext4_test_persist_prealloc()
>  
>  	ret=1
>  
> +	temp_tmpdir=$TMPDIR
> +	export TMPDIR=mnt_point
>  	for ((i = 1; i <= 3; i++))
>  	{
>  		if ! command -v fallocate0${i} > /dev/null 2>&1; then
> @@ -63,6 +65,7 @@ ext4_test_persist_prealloc()
>  			return
>  		fi
>  	}
> +	TMPDIR=$temp_tmpdir


Can't we just do:

TMPDIR=mnt_point; fallocate0${i}

instead?

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
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] fs/ext4-new-features: fix wrong test point when running ext4-persist-prealloc
       [not found]   ` <53A0F944.40009@cn.fujitsu.com>
@ 2014-06-23 16:18     ` chrubis
  0 siblings, 0 replies; 3+ messages in thread
From: chrubis @ 2014-06-23 16:18 UTC (permalink / raw)
  To: Xiaoguang Wang; +Cc: ltp-list

Hi!
> >>  	ret=1
> >>  
> >> +	temp_tmpdir=$TMPDIR
> >> +	export TMPDIR=mnt_point
> >>  	for ((i = 1; i <= 3; i++))
> >>  	{
> >>  		if ! command -v fallocate0${i} > /dev/null 2>&1; then
> >> @@ -63,6 +65,7 @@ ext4_test_persist_prealloc()
> >>  			return
> >>  		fi
> >>  	}
> >> +	TMPDIR=$temp_tmpdir
> > 
> > 
> > Can't we just do:
> > 
> > TMPDIR=mnt_point; fallocate0${i}
> > 
> > instead?
> 
> Yeah, we can do it, but this will make TMPDIR still be "mnt_point" after the fallocate tests.

That is the point of it. As it is you are saving and restoring the
TMPDIR before and after the loop so redefining it only for the part that
matters looks cleaner to me or did I overlooked something?

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
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:[~2014-06-23 16:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-12  5:42 [LTP] [PATCH] fs/ext4-new-features: fix wrong test point when running ext4-persist-prealloc Xiaoguang Wang
2014-06-17 13:03 ` chrubis
     [not found]   ` <53A0F944.40009@cn.fujitsu.com>
2014-06-23 16:18     ` chrubis

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.