From: Theodore Ts'o Date: Tue, 9 Aug 2005 00:29:15 +0000 (-0500) Subject: Add valgrind support to the regression test suite X-Git-Tag: E2FSPROGS-1.39-WIP-1210~39 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=cfe7ba49782892747f212b7a541820975a86b37d;p=tools%2Fe2fsprogs.git Add valgrind support to the regression test suite 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" --- diff --git a/tests/ChangeLog b/tests/ChangeLog index 387e24c..a3522c2 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,10 @@ +2005-08-08 Theodore Ts'o + + * 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 * f_bbfile, f_dup, f_dup2, f_dup3, f_dup_resize, f_dupfsblks, diff --git a/tests/d_loaddump/script b/tests/d_loaddump/script index 57f377c..70dfdef 100644 --- a/tests/d_loaddump/script +++ b/tests/d_loaddump/script @@ -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 diff --git a/tests/f_dup_resize/script b/tests/f_dup_resize/script index e62b20d..ed374fe 100644 --- a/tests/f_dup_resize/script +++ b/tests/f_dup_resize/script @@ -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 diff --git a/tests/r_move_itable/script b/tests/r_move_itable/script index fe6cbb5..72cd9eb 100644 --- a/tests/r_move_itable/script +++ b/tests/r_move_itable/script @@ -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 diff --git a/tests/r_resize_inode/script b/tests/r_resize_inode/script index 60cf9b2..dbd44ff 100644 --- a/tests/r_resize_inode/script +++ b/tests/r_resize_inode/script @@ -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 diff --git a/tests/test_config b/tests/test_config index a484d8b..cb4e2f757 100644 --- a/tests/test_config +++ b/tests/test_config @@ -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 diff --git a/tests/test_script.in b/tests/test_script.in index 72f6332..b8cecb3 100644 --- a/tests/test_script.in +++ b/tests/test_script.in @@ -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