diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:49:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:49:26 +0000 |
commit | 668f05d989d214c0a5201bc51982e932ff15f6a3 (patch) | |
tree | 31067fca0cd63c2a0fb2bd85798e5cb2ef0dec49 /debian/tests | |
parent | Adding upstream version 1.47.0. (diff) | |
download | e2fsprogs-668f05d989d214c0a5201bc51982e932ff15f6a3.tar.xz e2fsprogs-668f05d989d214c0a5201bc51982e932ff15f6a3.zip |
Adding debian version 1.47.0-2.debian/1.47.0-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | debian/tests/control | 6 | ||||
-rwxr-xr-x | debian/tests/fuse2fs | 37 | ||||
-rwxr-xr-x | debian/tests/smoke | 32 |
3 files changed, 75 insertions, 0 deletions
diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..e149342 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,6 @@ +Tests: smoke +Depends: e2fsprogs + +Tests: fuse2fs +Depends: fuse2fs, fuse3 +Restrictions: isolation-machine diff --git a/debian/tests/fuse2fs b/debian/tests/fuse2fs new file mode 100755 index 0000000..8b4e08a --- /dev/null +++ b/debian/tests/fuse2fs @@ -0,0 +1,37 @@ +#!/bin/sh + +TDIR=${AUTOPKGTEST_TMP:-/tmp/fuse_dir} +LOGDIR=${AUTOPKGTEST_ARTIFACTS:-/tmp/fuse_dir_log} +IMG=$TDIR/test-image.img +MNT=$TDIR/mnt + +# some autopkgtest environments may not have /etc/mtab and/or /proc/mounts +EXT2FS_NO_MTAB_OK=yes +export EXT2FS_NO_MTAB_OK + +mkdir -p $LOGDIR $TDIR $MNT + +/sbin/mke2fs -E root_owner -q -t ext4 -d e2fsck $IMG 8M +/sbin/e2label $IMG test +fuse2fs $IMG $MNT > $LOGDIR/fuse2fs.log 2>&1 +if test $? -ne 0 ; then + echo "fuse2fs failed; see $LOGDIR/fuse2fs.log" + exit 1 +fi +diff e2fsck/pass1.c $MNT/pass1.c +echo foobar > $MNT/testfile +fusermount -u $MNT > $LOGDIR/fusermount.log 2>&1 +if test $? -ne 0 ; then + echo "fusermount failed; see $LOGDIR/fusermount.log" + exit 1 +fi +/sbin/e2fsck -fy $IMG > $LOGDIR/e2fsck.log 2>&1 +if test $? -ne 0 ; then + echo "e2fsck failed; see $LOGDIR/e2fsck.log" + exit 1 +fi +contents=$(/sbin/debugfs -R "cat testfile" $IMG 2> $LOGDIR/debugfs.log) +if test "$contents" != foobar ; then + echo "testfile does not contain expected output" + exit 1 +fi diff --git a/debian/tests/smoke b/debian/tests/smoke new file mode 100755 index 0000000..966be96 --- /dev/null +++ b/debian/tests/smoke @@ -0,0 +1,32 @@ +#!/bin/sh + +TDIR=${AUTOPKGTEST_TMP:-/tmp/test_dir} +LOGDIR=${AUTOPKGTEST_ARTIFACTS:-/tmp/test_dir_log} +IMG=$TDIR/test-image.img + +# some autopkgtest environments may not have /etc/mtab and/or /proc/mounts +EXT2FS_NO_MTAB_OK=yes +export EXT2FS_NO_MTAB_OK + +mkdir -p $LOGDIR $TDIR + +/sbin/mke2fs -q -t ext4 -d e2fsck $IMG 8M +/sbin/e2label $IMG test +/sbin/e2fsck -fy $IMG > $LOGDIR/e2fsck.1.log 2>&1 +if test $? -ne 0 ; then + echo "First e2fsck failed; see $LOGDIR/e2fsck.1.log" + exit 1 +fi +/sbin/resize2fs $IMG 16M > $LOGDIR/resize2fs.log 2>&1 +if test $? -ne 0 ; then + echo "Resize2fs failed; see $LOGDIR/e2fsck.1.log" + exit 1 +fi +/sbin/e2fsck -fy $IMG > $LOGDIR/e2fsck.2.log 2>&1 +if test $? -ne 0 ; then + echo "Second e2fsck failed; see $LOGDIR/e2fsck.2.log" + exit 1 +fi +/sbin/debugfs -R "dump pass1.c $TDIR/pass1.c" $IMG > $LOGDIR/debugfs.log 2>&1 +diff $TDIR/pass1.c e2fsck/pass1.c + |