Whamcloud - gitweb
Add valgrind support to the regression test suite
authorTheodore Ts'o <tytso@mit.edu>
Tue, 9 Aug 2005 00:29:15 +0000 (19:29 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 9 Aug 2005 00:29:15 +0000 (19:29 -0500)
Add the --valgrind option to the tests/test_script which allows us to
run the e2fsprogs regression test suite under valgrind.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
tests/ChangeLog
tests/d_loaddump/script
tests/f_dup_resize/script
tests/r_move_itable/script
tests/r_resize_inode/script
tests/test_config
tests/test_script.in

index 387e24c..a3522c2 100644 (file)
@@ -1,3 +1,10 @@
+2005-08-08  Theodore Ts'o  <tytso@mit.edu>
+
+       * test_config, test_script.in, d_loaddump, f_dup_resize,
+               r_move_itable, r_resize_inode: Add the --valgrind option
+               to the tests/test_script which allows us to run the
+               e2fsprogs regression test suite under valgrind.
+
 2005-07-04  Theodore Ts'o  <tytso@mit.edu>
 
        * f_bbfile, f_dup, f_dup2, f_dup3, f_dup_resize, f_dupfsblks,
index 57f377c..70dfdef 100644 (file)
@@ -15,7 +15,7 @@ $MKE2FS -Fq $TMPFILE 512 > /dev/null 2>&1
 status=$?
 echo Exit status is $status >> $OUT
 
-dd if=$DEBUGFS of=$TEST_DATA bs=128k count=1 conv=sync > /dev/null 2>&1 
+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
index e62b20d..ed374fe 100644 (file)
@@ -1,7 +1,7 @@
 SKIP_GUNZIP="true"
 TEST_DATA="test.data"
 
-dd if=$DEBUGFS of=$TEST_DATA bs=63k count=1 conv=sync > /dev/null 2>&1
+dd if=$TEST_BITS of=$TEST_DATA bs=63k count=1 conv=sync > /dev/null 2>&1
 
 touch $TMPFILE
 $MKE2FS -F -O resize_inode $TMPFILE 10240 > /dev/null 2>&1
index fe6cbb5..72cd9eb 100644 (file)
@@ -1,6 +1,6 @@
 echo -n "resize2fs with resize_inode: "
 
-if test -x $RESIZE2FS; then
+if test -x $RESIZE2FS_EXE; then
 
 FSCK_OPT=-yf
 OUT=$test_name.log
index 60cf9b2..dbd44ff 100644 (file)
@@ -1,6 +1,6 @@
 echo -n "resize2fs with resize_inode: "
 
-if test -x $RESIZE2FS; then
+if test -x $RESIZE2FS_EXE; then
 
 FSCK_OPT=-yf
 OUT=$test_name.log
index a484d8b..cb4e2f7 100644 (file)
@@ -2,14 +2,16 @@
 # Test configuration
 #
 
-FSCK=../e2fsck/e2fsck
-MKE2FS=../misc/mke2fs
-DUMPE2FS=../misc/dumpe2fs
-TUNE2FS=../misc/tune2fs
-CHATTR=../misc/chattr
-LSATTR=../misc/lsattr
-DEBUGFS=../debugfs/debugfs
-RESIZE2FS=../resize/resize2fs
+FSCK="$USE_VALGRIND ../e2fsck/e2fsck"
+MKE2FS="$USE_VALGRIND ../misc/mke2fs"
+DUMPE2FS="$USE_VALGRIND ../misc/dumpe2fs"
+TUNE2FS="$USE_VALGRIND ../misc/tune2fs"
+CHATTR="$USE_VALGRIND../misc/chattr"
+LSATTR="$USE_VALGRIND ../misc/lsattr"
+DEBUGFS="$USE_VALGRIND ../debugfs/debugfs"
+TEST_BITS="../debugfs/debugfs"
+RESIZE2FS_EXE="../resize/resize2fs"
+RESIZE2FS="$USE_VALGRIND $RESIZE2FS_EXE"
 TEST_REL=../tests/progs/test_rel
 TEST_ICOUNT=../tests/progs/test_icount
 LD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss
index 72f6332..b8cecb3 100644 (file)
@@ -3,6 +3,12 @@
 # Test script for e2fsck
 #
 
+case "$1" in 
+    --valgrind)
+       export USE_VALGRIND="valgrind -q --weird-hacks=lax-ioctls"
+       shift;
+esac
+
 if test "$1"x = x ; then
   TESTS=`ls -d $SRCDIR/[a-zA-Z]_* | $EGREP -v "\.failed|\.new"`
 else