]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
tests: use /tmp for scratch files
authorTheodore Ts'o <tytso@mit.edu>
Sat, 9 Jul 2011 16:08:10 +0000 (12:08 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 9 Jul 2011 16:08:10 +0000 (12:08 -0400)
The /tmp directory is often a memory based file system, and using this
can speed up running the regression test suite.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
18 files changed:
tests/d_loaddump/expect
tests/d_loaddump/script
tests/f_crashdisk/expect.1
tests/f_resize_inode/expect
tests/f_resize_inode/script
tests/m_mkfs_overhead/expect.1 [deleted file]
tests/m_mkfs_overhead/script
tests/r_inline_xattr/expect
tests/r_inline_xattr/script
tests/r_move_itable/expect
tests/r_move_itable/script
tests/r_resize_inode/expect
tests/r_resize_inode/script
tests/run_e2fsck
tests/test_config
tests/test_script.in
tests/u_mke2fs/script
tests/u_tune2fs/script

index f66e2183693a05e82997f4b4118a38daf80bd5bd..e142eac30363f36222076c71c48b4cec46f3c506 100644 (file)
@@ -1,7 +1,7 @@
 debugfs load/dump test
-mke2fs -Fq -b 1024 ./test.img 512
+mke2fs -Fq -b 1024 test.img 512
 Exit status is 0
-debugfs -R ''write test.data test_data'' -w ./test.img
+debugfs -R ''write test.data test_data'' -w test.img
 Allocated inode: 12
 Exit status is 0
 e2fsck -yf -N test_filesys
@@ -12,7 +12,7 @@ Pass 4: Checking reference counts
 Pass 5: Checking group summary information
 test_filesys: 12/64 files (0.0% non-contiguous), 158/512 blocks
 Exit status is 0
-debugfs -R ''dump test_data test.verify'' ./test.img
+debugfs -R ''dump test_data test.verify'' test.img
 Exit status is 0
 cmp test.data test.verify
 Exit status is 0
index 3ac1f800e1fcb698efd03f9cd64c565cc1c47749..598f6656751f8a0e9ffe3f504e747f210f2dbe33 100644 (file)
@@ -9,7 +9,7 @@ echo "debugfs load/dump test" > $OUT
 
 dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
 
-echo "mke2fs -Fq -b 1024 $TMPFILE 512" >> $OUT
+echo "mke2fs -Fq -b 1024 test.img 512" >> $OUT
 
 $MKE2FS -Fq $TMPFILE 512 > /dev/null 2>&1
 status=$?
@@ -18,7 +18,7 @@ echo Exit status is $status >> $OUT
 dd if=$TEST_BITS of=$TEST_DATA bs=128k count=1 conv=sync > /dev/null 2>&1 
 echo "file fragment odd size" >> $TEST_DATA
 
-echo "debugfs -R ''write $TEST_DATA test_data'' -w $TMPFILE" > $OUT.new
+echo "debugfs -R ''write $TEST_DATA test_data'' -w test.img" > $OUT.new
 $DEBUGFS -R "write $TEST_DATA test_data" -w $TMPFILE >> $OUT.new 2>&1
 status=$?
 echo Exit status is $status >> $OUT.new
@@ -30,7 +30,7 @@ status=$?
 echo Exit status is $status >> $OUT.new
 sed -e '2d' $OUT.new >> $OUT
 
-echo "debugfs -R ''dump test_data $VERIFY_DATA'' $TMPFILE" > $OUT.new
+echo "debugfs -R ''dump test_data $VERIFY_DATA'' test.img" > $OUT.new
 $DEBUGFS -R "dump test_data $VERIFY_DATA" $TMPFILE >> $OUT.new 2>&1
 status=$?
 echo Exit status is $status >> $OUT.new
index b6fd71a864111bd6a918760c6cf6614455144e63..132d49af9d7d8012080ac5415e293255567c3d01 100644 (file)
@@ -1,5 +1,5 @@
 ../e2fsck/e2fsck: Superblock invalid, trying backup blocks...
-../e2fsck/e2fsck: The ext2 superblock is corrupt while trying to open ./test.img
+../e2fsck/e2fsck: The ext2 superblock is corrupt while trying to open test.img
 
 The superblock could not be read or does not describe a correct ext2
 filesystem.  If the device is valid and it really contains an ext2
index 965819a96ecd949213a53fc7b07479669ef6197e..a396927c8131ecb8e8a2f720fbf5c4eaa79c7a7d 100644 (file)
@@ -27,7 +27,7 @@ test_filesys: 11/4096 files (0.0% non-contiguous), 2107/16384 blocks
 Exit status is 0
 -----------------------------------------------
  
-debugfs -R ''set_inode_field <7> block[2] 42'' -w ./test.img
+debugfs -R ''set_inode_field <7> block[2] 42'' -w test.img
 Exit status is 0
 Resize inode not valid.  Recreate? yes
 
@@ -55,7 +55,7 @@ test_filesys: 11/4096 files (0.0% non-contiguous), 2107/16384 blocks
 Exit status is 0
 -----------------------------------------------
  
-debugfs -R ''clri <7>'' -w ./test.img
+debugfs -R ''clri <7>'' -w test.img
 Exit status is 0
 Resize inode not valid.  Recreate? yes
 
@@ -83,7 +83,7 @@ test_filesys: 11/4096 files (0.0% non-contiguous), 2107/16384 blocks
 Exit status is 0
 -----------------------------------------------
  
-debugfs -R ''set_inode_field <7> bmap[524] 57'' -w ./test.img
+debugfs -R ''set_inode_field <7> bmap[524] 57'' -w test.img
 Exit status is 0
 Resize inode not valid.  Recreate? yes
 
@@ -111,7 +111,7 @@ test_filesys: 11/4096 files (0.0% non-contiguous), 2107/16384 blocks
 Exit status is 0
 -----------------------------------------------
  
-debugfs -R ''set_super_value reserved_gdt_blocks 15679'' -w ./test.img
+debugfs -R ''set_super_value reserved_gdt_blocks 15679'' -w test.img
 Exit status is 0
 ../e2fsck/e2fsck: Group descriptors look bad... trying backup blocks...
 Pass 1: Checking inodes, blocks, and sizes
@@ -125,7 +125,7 @@ test_filesys: 11/4096 files (0.0% non-contiguous), 2107/16384 blocks
 Exit status is 1
 -----------------------------------------------
  
-debugfs -R ''set_super_value reserved_gdt_blocks 32'' -w ./test.img
+debugfs -R ''set_super_value reserved_gdt_blocks 32'' -w test.img
 Exit status is 0
 Pass 1: Checking inodes, blocks, and sizes
 Pass 2: Checking directory structure
index 75d90fee9cc4c31ab0e1388f76313a255c1cc8e2..327f41ba289da9596ce20ecc1a2f9c7e3d2ec198 100644 (file)
@@ -26,7 +26,7 @@ rm -f $OUT.new
 echo ----------------------------------------------- >> $OUT
 
 echo " " >> $OUT
-echo "debugfs -R ''set_inode_field <7> block[2] 42'' -w $TMPFILE" > $OUT.new
+echo "debugfs -R ''set_inode_field <7> block[2] 42'' -w test.img" > $OUT.new
 $DEBUGFS -R "set_inode_field <7> block[2] 42" -w $TMPFILE >> $OUT.new 2>&1
 status=$?
 echo Exit status is $status >> $OUT.new
@@ -47,7 +47,7 @@ rm -f $OUT.new
 echo ----------------------------------------------- >> $OUT
 
 echo " " >> $OUT
-echo "debugfs -R ''clri <7>'' -w $TMPFILE" > $OUT.new
+echo "debugfs -R ''clri <7>'' -w test.img" > $OUT.new
 $DEBUGFS -R "clri <7>" -w $TMPFILE >> $OUT.new 2>&1
 status=$?
 echo Exit status is $status >> $OUT.new
@@ -68,7 +68,7 @@ rm -f $OUT.new
 echo ----------------------------------------------- >> $OUT
 
 echo " " >> $OUT
-echo "debugfs -R ''set_inode_field <7> bmap[524] 57'' -w $TMPFILE" > $OUT.new
+echo "debugfs -R ''set_inode_field <7> bmap[524] 57'' -w test.img" > $OUT.new
 $DEBUGFS -R "set_inode_field <7> bmap[524] 57" -w $TMPFILE >> $OUT.new 2>&1
 status=$?
 echo Exit status is $status >> $OUT.new
@@ -89,7 +89,7 @@ rm -f $OUT.new
 echo ----------------------------------------------- >> $OUT
 
 echo " " >> $OUT
-echo "debugfs -R ''set_super_value reserved_gdt_blocks 15679'' -w $TMPFILE" > $OUT.new
+echo "debugfs -R ''set_super_value reserved_gdt_blocks 15679'' -w test.img" > $OUT.new
 $DEBUGFS -R "set_super_value reserved_gdt_blocks 15679" -w $TMPFILE >> $OUT.new 2>&1
 status=$?
 echo Exit status is $status >> $OUT.new
@@ -104,7 +104,7 @@ rm -f $OUT.new
 echo ----------------------------------------------- >> $OUT
 
 echo " " >> $OUT
-echo "debugfs -R ''set_super_value reserved_gdt_blocks 32'' -w $TMPFILE" > $OUT.new
+echo "debugfs -R ''set_super_value reserved_gdt_blocks 32'' -w test.img" > $OUT.new
 $DEBUGFS -R "set_super_value reserved_gdt_blocks 32" -w $TMPFILE >> $OUT.new 2>&1
 status=$?
 echo Exit status is $status >> $OUT.new
diff --git a/tests/m_mkfs_overhead/expect.1 b/tests/m_mkfs_overhead/expect.1
deleted file mode 100644 (file)
index 4bfc84e..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-./test.img: Cannot create filesystem with requested number of inodes while setting up superblock
-./test.img: Attempt to read block from filesystem resulted in short read while opening filesystem
-features: Filesystem not open
-../e2fsck/e2fsck: Attempt to read block from filesystem resulted in short read while trying to open ./test.img
-Could this be a zero-length partition?
-Exit status is 8
-
-../misc/dumpe2fs: Attempt to read block from filesystem resulted in short read while trying to open ./test.img
-Couldn't find valid filesystem superblock.
index 8cd91349607f201d2e8cebe7422cfbc9ab04b990..ff4619962f1a3cc8f58e8172e69a1cea79c51d55 100644 (file)
@@ -1,5 +1,33 @@
-DESCRIPTION="test bg overhead calculation"
+echo -n "test bg overhead calculation: "
+
+OUT=$test_name.log
+EXP=$test_dir/expect
 FS_SIZE=1024
 MKE2FS_OPTS="-b 1024 -m 0 -g 256 -N 3745"
-. $cmd_dir/run_mke2fs
 
+MKE2FS_SKIP_PROGRESS=true
+MKE2FS_SKIP_CHECK_MSG=true
+export MKE2FS_SKIP_PROGRESS MKE2FS_SKIP_CHECK_MSG
+> $TMPFILE
+
+cp /dev/null $OUT
+
+$MKE2FS -F -o Linux $MKE2FS_OPTS $TMPFILE $FS_SIZE 2>&1 | sed -e 1d | \
+       sed -e "s;$TMPFILE;test.img;" | tr -d \\015 > $OUT
+
+rm -f $TMPFILE
+
+rm -f $test_name.ok $test_name.failed
+cmp -s $OUT $EXP
+status1=$?
+
+if [ "$status1" = 0 ] ; then
+       echo "ok"
+       touch $test_name.ok
+else
+       echo "failed"
+       diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+rm -f tmp_expect
+
+unset OUT EXP DESCRIPTION FS_SIZE MKE2FS_OPTS MKE2FS_SKIP_PROGRESS
index 8e59de367742dee3edec9f1879ca21bbe3ff0c45..9e7126469cc91295cb19dbda2357fa221b5a9c6b 100644 (file)
@@ -1,15 +1,15 @@
 resize2fs test
-debugfs -R ''stat file'' ./test.img 2>&1 | grep ''^Inode\|in inode body\|name = ''
+debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|name = ''
 Inode: 1550   Type: regular    Mode:  0644   Flags: 0x0
 Extended attributes stored in inode body: 
   name = "propervalue" (11)
 Exit status is 0
-resize2fs ./test.img 5M
-Resizing the filesystem on ./test.img to 5120 (1k) blocks.
-The filesystem on ./test.img is now 5120 blocks long.
+resize2fs test.img 5M
+Resizing the filesystem on test.img to 5120 (1k) blocks.
+The filesystem on test.img is now 5120 blocks long.
 
 Exit status is 0
-debugfs -R ''stat file'' ./test.img 2>&1 | grep ''^Inode\|in inode body\|name = ''
+debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|name = ''
 Inode: 12   Type: regular    Mode:  0644   Flags: 0x0
 Extended attributes stored in inode body: 
   name = "propervalue" (11)
index eb923de434332606f38af877c9521188cbbbf341..d9c3644093093c7c4a2377d2df6ae3e2c38b1cda 100644 (file)
@@ -10,20 +10,20 @@ gunzip < $IMAGE > $TMPFILE
 echo "resize2fs test" > $OUT
 
 # Look at existing inline extended attribute
-echo "debugfs -R ''stat file'' $TMPFILE 2>&1 | grep ''^Inode\|in inode body\|name = ''" >> $OUT
+echo "debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|name = ''" >> $OUT
 $DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|name = " >> $OUT
 status=$?
 echo Exit status is $status >> $OUT
 
 # resize it
-echo "resize2fs $TMPFILE 5M" >> $OUT
+echo "resize2fs test.img 5M" >> $OUT
 $RESIZE2FS $TMPFILE 5M 2>&1 >> $OUT.new 2>&1
 status=$?
 echo Exit status is $status >> $OUT.new
-sed -e '1d' $OUT.new >> $OUT
+sed -e '1d' $OUT.new | sed -e "s;$TMPFILE;test.img;" >> $OUT
 
 # Look at inline extended attribute in resized fs
-echo "debugfs -R ''stat file'' $TMPFILE 2>&1 | grep ''^Inode\|in inode body\|name = ''" >> $OUT
+echo "debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|name = ''" >> $OUT
 $DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|name = " >> $OUT
 status=$?
 echo Exit status is $status >> $OUT
index 0d08b1695fe46a466064816c6a527f6f1f5a5063..7752438f8324af7df5c81e7270ca99ed51501f7c 100644 (file)
@@ -1,9 +1,9 @@
 mke2fs -q -F -o Linux -b 1024 -g 256 test.img 1024
 resize2fs -p test.img 10000
-Resizing the filesystem on ./test.img to 10000 (1k) blocks.
+Resizing the filesystem on test.img to 10000 (1k) blocks.
 Begin pass 1 (max = 35)
 Extending the inode table     ----------------------------------------\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\bXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-The filesystem on ./test.img is now 9985 blocks long.
+The filesystem on test.img is now 9985 blocks long.
 
 Pass 1: Checking inodes, blocks, and sizes
 Pass 2: Checking directory structure
@@ -297,10 +297,10 @@ Group 38: (Blocks 9729-9984)
   Free inodes: 1217-1248
 --------------------------------
 resize2fs -p test.img 20000
-Resizing the filesystem on ./test.img to 20000 (1k) blocks.
+Resizing the filesystem on test.img to 20000 (1k) blocks.
 Begin pass 1 (max = 39)
 Extending the inode table     ----------------------------------------\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\bXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-The filesystem on ./test.img is now 19969 blocks long.
+The filesystem on test.img is now 19969 blocks long.
 
 Filesystem did not have a UUID; generating one.
 
@@ -834,10 +834,10 @@ Group 77: (Blocks 19713-19968)
   Free inodes: 2465-2496
 --------------------------------
 resize2fs -p test.img 30000
-Resizing the filesystem on ./test.img to 30000 (1k) blocks.
+Resizing the filesystem on test.img to 30000 (1k) blocks.
 Begin pass 1 (max = 39)
 Extending the inode table     ----------------------------------------\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\bXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-The filesystem on ./test.img is now 29953 blocks long.
+The filesystem on test.img is now 29953 blocks long.
 
 Filesystem did not have a UUID; generating one.
 
@@ -1607,10 +1607,10 @@ Group 116: (Blocks 29697-29952)
   Free inodes: 3713-3744
 --------------------------------
 resize2fs -p test.img 40000
-Resizing the filesystem on ./test.img to 40000 (1k) blocks.
+Resizing the filesystem on test.img to 40000 (1k) blocks.
 Begin pass 1 (max = 40)
 Extending the inode table     ----------------------------------------\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\bXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-The filesystem on ./test.img is now 40000 blocks long.
+The filesystem on test.img is now 40000 blocks long.
 
 Filesystem did not have a UUID; generating one.
 
index 673f65c09d045f4c1dd30ea4ee45a47484014783..c257e429c044de1b024ed1fdfa845e71c9f56166 100644 (file)
@@ -19,7 +19,8 @@ $MKE2FS -q -F -o Linux -b 1024 -g 256 $TMPFILE 1024 2>&1 \
        grep -v "whichever comes first" >> $OUT 
 
 echo resize2fs -p test.img 10000 >> $OUT
-$RESIZE2FS -p $TMPFILE 10000 2>&1 | sed -e '1d' >> $OUT
+$RESIZE2FS -p $TMPFILE 10000 2>&1 | sed -e '1d' | \
+          sed -e "s;$TMPFILE;test.img;" >> $OUT
 
 $FSCK $FSCK_OPT  -N test_filesys $TMPFILE > $OUT.new 2>&1
 status=$?
@@ -38,7 +39,8 @@ $DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs >> $OUT
 echo "--------------------------------" >> $OUT
 
 echo resize2fs -p test.img 20000 >> $OUT
-$RESIZE2FS -p $TMPFILE 20000 2>&1 | sed -e '1d' >> $OUT
+$RESIZE2FS -p $TMPFILE 20000 2>&1 | sed -e '1d' | \
+          sed -e "s;$TMPFILE;test.img;" >> $OUT
 
 $FSCK $FSCK_OPT  -N test_filesys $TMPFILE > $OUT.new 2>&1
 status=$?
@@ -57,7 +59,8 @@ $DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs >> $OUT
 echo "--------------------------------" >> $OUT
 
 echo resize2fs -p test.img 30000 >> $OUT
-$RESIZE2FS -p $TMPFILE 30000 2>&1 | sed -e '1d' >> $OUT
+$RESIZE2FS -p $TMPFILE 30000 2>&1 | sed -e '1d' | \
+          sed -e "s;$TMPFILE;test.img;" >> $OUT
 
 $FSCK $FSCK_OPT  -N test_filesys $TMPFILE > $OUT.new 2>&1
 status=$?
@@ -76,7 +79,8 @@ $DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs >> $OUT
 echo "--------------------------------" >> $OUT
 
 echo resize2fs -p test.img 40000 >> $OUT
-$RESIZE2FS -p $TMPFILE 40000 2>&1 | sed -e '1d' >> $OUT
+$RESIZE2FS -p $TMPFILE 40000 2>&1 | sed -e '1d' | \
+          sed -e "s;$TMPFILE;test.img;" >> $OUT
 
 $FSCK $FSCK_OPT  -N test_filesys $TMPFILE > $OUT.new 2>&1
 status=$?
index f4bee0fb51d1f5e2f498e523b7f282e44ee0776e..39919827f363d0524f1c469b74b9e33fbf4af283 100644 (file)
@@ -1,7 +1,7 @@
 mke2fs -q -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 16384
 resize2fs test.img 65536
-Resizing the filesystem on ./test.img to 65536 (1k) blocks.
-The filesystem on ./test.img is now 65536 blocks long.
+Resizing the filesystem on test.img to 65536 (1k) blocks.
+The filesystem on test.img is now 65536 blocks long.
 
 Pass 1: Checking inodes, blocks, and sizes
 Pass 2: Checking directory structure
@@ -448,8 +448,8 @@ Group 63: (Blocks 64513-65535)
 --------------------------------
 mke2fs -q -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 65536
 resize2fs test.img 16384
-Resizing the filesystem on ./test.img to 16384 (1k) blocks.
-The filesystem on ./test.img is now 16384 blocks long.
+Resizing the filesystem on test.img to 16384 (1k) blocks.
+The filesystem on test.img is now 16384 blocks long.
 
 Pass 1: Checking inodes, blocks, and sizes
 Pass 2: Checking directory structure
@@ -601,8 +601,8 @@ Group 15: (Blocks 15361-16383)
   Free inodes: 3841-4096
 --------------------------------
 resize2fs test.img 165536
-Resizing the filesystem on ./test.img to 165536 (1k) blocks.
-The filesystem on ./test.img is now 165536 blocks long.
+Resizing the filesystem on test.img to 165536 (1k) blocks.
+The filesystem on test.img is now 165536 blocks long.
 
 Filesystem did not have a UUID; generating one.
 
index aced9c4f3c6c670585199f1e43df0baa73179551..c8db127921d544bfa2c884332834e09d25828e6f 100644 (file)
@@ -19,7 +19,8 @@ $MKE2FS -q -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 16384 2>&1 \
        grep -v "whichever comes first" >> $OUT 
 
 echo resize2fs test.img 65536 >> $OUT
-$RESIZE2FS $TMPFILE 65536 2>&1 | sed -e '1d' >> $OUT
+$RESIZE2FS $TMPFILE 65536 2>&1 | sed -e '1d' | \
+          sed -e "s;$TMPFILE;test.img;" >> $OUT
 
 $FSCK $FSCK_OPT  -N test_filesys $TMPFILE > $OUT.new 2>&1
 status=$?
@@ -45,7 +46,8 @@ $MKE2FS -q -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 65536 2>&1 \
        grep -v "whichever comes first" >> $OUT 
 
 echo resize2fs test.img 16384 >> $OUT
-$RESIZE2FS $TMPFILE 16384 2>&1 | sed -e '1d' >> $OUT
+$RESIZE2FS $TMPFILE 16384 2>&1 | sed -e '1d' | \
+          sed -e "s;$TMPFILE;test.img;" >> $OUT
 
 $FSCK $FSCK_OPT  -N test_filesys $TMPFILE > $OUT.new 2>&1
 status=$?
@@ -64,7 +66,8 @@ $DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs >> $OUT
 echo "--------------------------------" >> $OUT
 
 echo resize2fs test.img 165536 >> $OUT
-$RESIZE2FS $TMPFILE 165536 2>&1 | sed -e '1d' >> $OUT
+$RESIZE2FS $TMPFILE 165536 2>&1 | sed -e '1d' | \
+          sed -e "s;$TMPFILE;test.img;" >> $OUT
 
 $FSCK $FSCK_OPT  -N test_filesys $TMPFILE > $OUT.new 2>&1
 status=$?
index 9b4f170d09e3b89ad34a4f69e0b99239c10a1e47..9202e1214f489774d56ec8e18f7219323c99a3da 100644 (file)
@@ -50,14 +50,16 @@ eval $PREP_CMD
 $FSCK $FSCK_OPT  -N test_filesys $TMPFILE > $OUT1.new 2>&1
 status=$?
 echo Exit status is $status >> $OUT1.new
-sed -e '1d' $OUT1.new | sed -e '/^JFS DEBUG:/d'  | tr -d \\015 >> $OUT1
+sed -e '1d' $OUT1.new | sed -e '/^JFS DEBUG:/d' | \
+           sed -e "s;$TMPFILE;test.img;" | tr -d \\015 >> $OUT1
 rm -f $OUT1.new
 
 if [ "$ONE_PASS_ONLY" != "true" ]; then
        $FSCK $SECOND_FSCK_OPT -N test_filesys $TMPFILE > $OUT2.new 2>&1 
        status=$?
        echo Exit status is $status >> $OUT2.new
-       sed -e '1d' $OUT2.new | sed -e '/^JFS DEBUG:/d'  > $OUT2
+       sed -e '1d' $OUT2.new | sed -e '/^JFS DEBUG:/d' | \
+           sed -e "s;$TMPFILE;test.img;" > $OUT2
        rm -f $OUT2.new
 fi
 
index 3c757e339ec1fb21dbba602d5ab5b9133298e980..2d85e030e789d57a8a179a8091f3ca027b1f7a79 100644 (file)
@@ -19,7 +19,6 @@ TEST_REL=../tests/progs/test_rel
 TEST_ICOUNT=../tests/progs/test_icount
 LD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss
 DYLD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss
-TMPFILE=./test.img
 export LD_LIBRARY_PATH
 export DYLD_LIBRARY_PATH
 TZ=GMT0
index aac28fb633d16cbaa2f8464e118c62cb5330a0e3..cec09dfd18bc87bdf0f47c825e70e42a86511fd9 100644 (file)
@@ -39,6 +39,8 @@ fi
 
 . $TEST_CONFIG
 
+TMPFILE=$(mktemp)
+
 for test_dir in $TESTS
 do
        test_name=`echo $test_dir | sed -e 's;.*/;;'`
index 8d51159713c954920dff6eda6878b280bbc401e1..ef98899eddd94d5f79d1224034e1efae11d59e75 100644 (file)
@@ -1,9 +1,9 @@
 printf "e2undo with mke2fs: "
 if test -x $E2UNDO_EXE; then
 
-E2FSPROGS_UNDO_DIR=./
+E2FSPROGS_UNDO_DIR=/tmp
 export E2FSPROGS_UNDO_DIR
-TDB_FILE=./mke2fs-test.img.e2undo
+TDB_FILE=$E2FSPROGS_UNDO_DIR/mke2fs-$(basename $TMPFILE).e2undo
 OUT=$test_name.log
 rm -f $TDB_FILE >/dev/null 2>&1
 
index 5382cad154e8a6b202ab26cc551c6fb141ca324d..222b95f3b0bb706aaafbf428e55b6e36856c50c3 100644 (file)
@@ -1,9 +1,9 @@
 printf "e2undo with tune2fs: "
 if test -x $E2UNDO_EXE; then
 
-E2FSPROGS_UNDO_DIR=./
+E2FSPROGS_UNDO_DIR=/tmp
 export E2FSPROGS_UNDO_DIR
-TDB_FILE=./tune2fs-test.img.e2undo
+TDB_FILE=$E2FSPROGS_UNDO_DIR/tune2fs-$(basename $TMPFILE).e2undo
 OUT=$test_name.log
 rm -f $TDB_FILE >/dev/null 2>&1