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
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
}
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
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
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
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
. $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