From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: [PATCH 6/6] e2fsprogs: Add test case for undoe2fs
Date: Mon, 13 Aug 2007 15:56:26 +0530 [thread overview]
Message-ID: <1187000808916-git-send-email-aneesh.kumar@linux.vnet.ibm.com> (raw)
In-Reply-To: <11870008042147-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
This adds two test case for undoe2fs.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
tests/test_config | 1 +
tests/u_undoe2fs_mke2fs/script | 31 +++++++++++++++++++++++++++++++
tests/u_undoe2fs_tune2fs/script | 31 +++++++++++++++++++++++++++++++
3 files changed, 63 insertions(+), 0 deletions(-)
create mode 100644 tests/u_undoe2fs_mke2fs/script
create mode 100644 tests/u_undoe2fs_tune2fs/script
diff --git a/tests/test_config b/tests/test_config
index f5ae0fe..f79ec79 100644
--- a/tests/test_config
+++ b/tests/test_config
@@ -13,6 +13,7 @@ DEBUGFS="$USE_VALGRIND ../debugfs/debugfs"
TEST_BITS="../debugfs/debugfs"
RESIZE2FS_EXE="../resize/resize2fs"
RESIZE2FS="$USE_VALGRIND $RESIZE2FS_EXE"
+UNDOE2FS_EXE="../misc/undoe2fs"
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/u_undoe2fs_mke2fs/script b/tests/u_undoe2fs_mke2fs/script
new file mode 100644
index 0000000..82ee6b3
--- /dev/null
+++ b/tests/u_undoe2fs_mke2fs/script
@@ -0,0 +1,31 @@
+printf "undoe2fs with mke2fs: "
+if test -x $UNDOE2FS_EXE; then
+
+export MKE2FS_SCRATCH_DIR=./
+TDB_FILE=./mke2fs-test.img
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -b 1024 test.img > $OUT
+$MKE2FS -q -F -o Linux -I 128 -b 1024 $TMPFILE >/dev/null 2>&1
+md5=$(md5sum $TMPFILE | cut -d " " -f 1)
+echo md5sum before mke2fs $md5 >> $OUT
+
+echo using mke2fs to test undoe2fs >> $OUT
+$MKE2FS -q -F -o Linux -I 256 -b 1024 $TMPFILE >/dev/null 2>&1
+new_md5=$(md5sum $TMPFILE | cut -d " " -f 1)
+echo md5sum after mke2fs $new_md5 >> $OUT
+
+$UNDOE2FS_EXE $TDB_FILE $TMPFILE >/dev/null 2>&1
+new_md5=$(md5sum $TMPFILE | cut -d " " -f 1)
+echo md5sum after undoe2fs $new_md5 >> $OUT
+
+if [ $md5 = $new_md5 ]; then
+ echo "ok"
+ touch $test_name.ok
+else
+ echo "failed"
+fi
+fi
diff --git a/tests/u_undoe2fs_tune2fs/script b/tests/u_undoe2fs_tune2fs/script
new file mode 100644
index 0000000..d01628d
--- /dev/null
+++ b/tests/u_undoe2fs_tune2fs/script
@@ -0,0 +1,31 @@
+printf "undoe2fs with tune2fs: "
+if test -x $UNDOE2FS_EXE; then
+
+export TUNE2FS_SCRATCH_DIR=./
+TDB_FILE=./tune2fs-test.img
+OUT=$test_name.log
+rm -f $TDB_FILE >/dev/null 2>&1
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -b 1024 test.img >> $OUT
+$MKE2FS -q -F -o Linux -I 128 -b 1024 $TMPFILE >/dev/null 2>&1
+md5=$(md5sum $TMPFILE | cut -d " " -f 1)
+echo md5sum before tune2fs $md5 >> $OUT
+
+echo using tune2fs to test undoe2fs >> $OUT
+$TUNE2FS -I 256 $TMPFILE >/dev/null 2>&1
+new_md5=$(md5sum $TMPFILE | cut -d " " -f 1)
+echo md5sum after tune2fs $new_md5 >> $OUT
+
+$UNDOE2FS_EXE $TDB_FILE $TMPFILE >/dev/null 2>&1
+new_md5=$(md5sum $TMPFILE | cut -d " " -f 1)
+echo md5sum after undoe2fs $new_md5 >> $OUT
+
+if [ $md5 = $new_md5 ]; then
+ echo "ok"
+ touch $test_name.ok
+else
+ echo "failed"
+fi
+fi
--
1.5.3.rc4.67.gf9286-dirty
prev parent reply other threads:[~2007-08-13 10:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-13 10:26 e2fsprogs patches Aneesh Kumar K.V
2007-08-13 10:26 ` [PATCH 1/6] e2fsprogs: Add undo I/O manager Aneesh Kumar K.V
2007-08-13 10:26 ` [PATCH 2/6] e2fsprogs: Add undoe2fs Aneesh Kumar K.V
2007-08-13 10:26 ` [PATCH 3/6] e2fsprogs: Make mke2fs use undo I/O manager Aneesh Kumar K.V
2007-08-13 10:26 ` [PATCH 4/6] e2fsprogs: Support for large inode migration Aneesh Kumar K.V
2007-08-13 10:26 ` [PATCH 5/6] e2fsprogs: Fix the resize inode test case Aneesh Kumar K.V
2007-08-13 10:26 ` Aneesh Kumar K.V [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1187000808916-git-send-email-aneesh.kumar@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.