OSDN Git Service

tests: fix i_e2image so it works with valgrind
authorTheodore Ts'o <tytso@mit.edu>
Sat, 3 Sep 2011 13:44:42 +0000 (09:44 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 3 Sep 2011 14:02:34 +0000 (10:02 -0400)
Since e2image can be optionally compiled out, we tested to see if
e2image was built; but using "test -x $E2IMAGE" fails if e2image is
something like "valgrind --simhints=lax-ioctls ../misc/e2image".
Define and use $E2IMAGE_EXE, much like we have done with e2undo and
resize2fs.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
tests/i_e2image/script
tests/test_config

index 408eabe..9c6ae2a 100644 (file)
@@ -1,5 +1,5 @@
 printf "Create/convert raw and qcow2 disk images: "
-if test -x $E2IMAGE; then
+if test -x $E2IMAGE_EXE; then
 
 ORIG_IMAGES="image1024.orig image2048.orig image4096.orig"
 
@@ -54,4 +54,7 @@ fi
 
 rm -f _image.* $MD5_TMP >/dev/null 2>&1
 
+else #if test -x $E2IMAGE_EXE; then
+       rm -f $test_name.ok $test_name.failed
+       echo "skipped"
 fi
index 2d85e03..b0e3ee6 100644 (file)
@@ -10,6 +10,7 @@ TUNE2FS="$USE_VALGRIND ../misc/tune2fs"
 CHATTR="$USE_VALGRIND../misc/chattr"
 LSATTR="$USE_VALGRIND ../misc/lsattr"
 E2IMAGE="$USE_VALGRIND ../misc/e2image"
+E2IMAGE_EXE="../misc/e2image"
 DEBUGFS="$USE_VALGRIND ../debugfs/debugfs"
 TEST_BITS="../debugfs/debugfs"
 RESIZE2FS_EXE="../resize/resize2fs"