public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v2] fs/ext4-new-features: fix wrong test point when running ext4-persist-prealloc
@ 2014-06-24  8:03 Xiaoguang Wang
  2014-07-15  9:50 ` chrubis
  0 siblings, 1 reply; 3+ messages in thread
From: Xiaoguang Wang @ 2014-06-24  8:03 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              | 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
 
 	umount mnt_point
 	if [ $? -ne 0 ]; then
-- 
1.8.2.1


------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
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

end of thread, other threads:[~2014-08-11 12:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
     [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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox