mirror of https://github.com/vitalif/e2fsprogs
38 lines
814 B
Plaintext
38 lines
814 B
Plaintext
#
|
|
# Default script for testing the relocation library routines
|
|
# (irel -- inode relocation and brel -- block relocation)
|
|
#
|
|
|
|
if [ -f $test_dir/setup ]; then
|
|
. $test_dir/setup
|
|
fi
|
|
|
|
if [ "$class"x = x ]; then
|
|
class=`echo $test_name | sed -e 's/r_\([^_]*\)_\(.*\)/\1/'`
|
|
instance=`echo $test_name | sed -e 's/r_\([^_]*\)_\(.*\)/\2/'`
|
|
fi
|
|
if [ "$OUT"x = x ]; then
|
|
OUT=$test_name.log
|
|
fi
|
|
if [ "$EXPECT"x = x ]; then
|
|
EXPECT=$SRCDIR/progs/rel_test/expect.$class
|
|
fi
|
|
|
|
cat $SRCDIR/progs/rel_test/$instance.setup $SRCDIR/progs/rel_test/test.$class \
|
|
| $TEST_REL -f - > $OUT 2>&1
|
|
|
|
cmp -s $EXPECT $OUT
|
|
status=$?
|
|
|
|
rm -f $test_name.failed $test_name.ok
|
|
|
|
if [ "$status" = 0 ] ; then
|
|
echo "ok"
|
|
touch $test_name.ok
|
|
else
|
|
echo "failed"
|
|
diff -c $EXPECT $OUT > $test_name.failed
|
|
fi
|
|
|
|
unset EXPECT OUT class instance
|