summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/f_mmp/script9
-rw-r--r--tests/f_mmp_garbage/script5
-rw-r--r--tests/m_mmp/script7
-rw-r--r--tests/t_mmp_1on/script5
-rw-r--r--tests/t_mmp_2off/script5
-rw-r--r--tests/test_one.in5
6 files changed, 22 insertions, 14 deletions
diff --git a/tests/f_mmp/script b/tests/f_mmp/script
index d921672e..9ff16c95 100644
--- a/tests/f_mmp/script
+++ b/tests/f_mmp/script
@@ -1,7 +1,8 @@
FSCK_OPT=-yf
-TMPFILE=$test_name.tmp
-> $TMPFILE
+# use current directory instead of /tmp becase tmpfs doesn't support DIO
+rm -f $TMPFILE
+TMPFILE=$(mktemp ./tmp-$test_name.XXXXXX)
stat -f $TMPFILE | grep -q "Type: tmpfs"
if [ $? = 0 ]; then
@@ -21,8 +22,8 @@ fi
kill_debugfs() {
trap 0
- PID=$(ps -o pid,command | grep -v awk |
- awk "/debugfs -w $TMPFILE/ { print \$1 }")
+ PID=$(ps -o pid,command | grep -v grep |
+ grep "debugfs -w $TMPFILE" | awk "{ print \$1 }")
[ "x$PID" != "x" ] && kill -9 $PID
}
diff --git a/tests/f_mmp_garbage/script b/tests/f_mmp_garbage/script
index 02cc12a4..6d451a67 100644
--- a/tests/f_mmp_garbage/script
+++ b/tests/f_mmp_garbage/script
@@ -1,7 +1,8 @@
FSCK_OPT=-yf
-TMPFILE=$test_name.tmp
-> $TMPFILE
+# use current directory instead of /tmp becase tmpfs doesn't support DIO
+rm -f $TMPFILE
+TMPFILE=$(mktemp ./tmp-$test_name.XXXXXX)
stat -f $TMPFILE | grep -q "Type: tmpfs"
if [ $? = 0 ] ; then
diff --git a/tests/m_mmp/script b/tests/m_mmp/script
index 02b0b4b8..6a9394de 100644
--- a/tests/m_mmp/script
+++ b/tests/m_mmp/script
@@ -2,8 +2,11 @@ DESCRIPTION="enable MMP during mke2fs"
FS_SIZE=65536
MKE2FS_DEVICE_SECTSIZE=2048
export MKE2FS_DEVICE_SECTSIZE
-TMPFILE=$test_name.tmp
-> $TMPFILE
+
+# use current directory instead of /tmp becase tmpfs doesn't support DIO
+rm -f $TMPFILE
+TMPFILE=$(mktemp ./tmp-$test_name.XXXXXX)
+
stat -f $TMPFILE | grep -q "Type: tmpfs"
if [ $? = 0 ]; then
rm -f $TMPFILE
diff --git a/tests/t_mmp_1on/script b/tests/t_mmp_1on/script
index 8fc8158f..cfed2ca8 100644
--- a/tests/t_mmp_1on/script
+++ b/tests/t_mmp_1on/script
@@ -1,7 +1,8 @@
FSCK_OPT=-yf
-TMPFILE=$test_name.tmp
-> $TMPFILE
+# use current directory instead of /tmp becase tmpfs doesn't support DIO
+rm -f $TMPFILE
+TMPFILE=$(mktemp ./tmp-$test_name.XXXXXX)
stat -f $TMPFILE | grep -q "Type: tmpfs"
if [ $? = 0 ] ; then
diff --git a/tests/t_mmp_2off/script b/tests/t_mmp_2off/script
index 1dee14ed..6556201f 100644
--- a/tests/t_mmp_2off/script
+++ b/tests/t_mmp_2off/script
@@ -1,7 +1,8 @@
FSCK_OPT=-yf
-TMPFILE=$test_name.tmp
-> $TMPFILE
+# use current directory instead of /tmp becase tmpfs doesn't support DIO
+rm -f $TMPFILE
+TMPFILE=$(mktemp ./tmp-$test_name.XXXXXX)
stat -f $TMPFILE | grep -q "Type: tmpfs"
if [ $? = 0 ]; then
diff --git a/tests/test_one.in b/tests/test_one.in
index d053fd71..01a92603 100644
--- a/tests/test_one.in
+++ b/tests/test_one.in
@@ -28,9 +28,10 @@ fi
. $TEST_CONFIG
-TMPFILE=$(mktemp -t e2fsprogs-tmp.XXXXXX)
-
test_name=`echo $test_dir | sed -e 's;.*/;;'`
+
+TMPFILE=$(mktemp -t e2fsprogs-tmp-$test_name.XXXXXX)
+
if [ -f $test_dir ] ; then
exit 0;
fi