From 464df1d5e5ab1322e2dd0a7796939fff1aeefa9a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 17:49:25 +0200 Subject: Adding upstream version 1.47.0. Signed-off-by: Daniel Baumann --- tests/f_orphquot/expect | 16 ++++++++++++++++ tests/f_orphquot/image.bz2 | Bin 0 -> 2083 bytes tests/f_orphquot/script | 28 ++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 tests/f_orphquot/expect create mode 100644 tests/f_orphquot/image.bz2 create mode 100644 tests/f_orphquot/script (limited to 'tests/f_orphquot') diff --git a/tests/f_orphquot/expect b/tests/f_orphquot/expect new file mode 100644 index 0000000..0f75dec --- /dev/null +++ b/tests/f_orphquot/expect @@ -0,0 +1,16 @@ +Clearing orphaned inode 12 (uid=1000, gid=100, mode=0100644, size=3145728) +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information + +test_filesystem: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesystem: 11/512 files (9.1% non-contiguous), 1070/2048 blocks +Exit status is 0 + user id space quota limit inodes quota limit + 0 20480 0 0 2 0 0 + 1000 0 5000 6000 0 50 60 + group id space quota limit inodes quota limit + 0 20480 0 0 2 0 0 + 100 0 6000 7000 0 60 70 diff --git a/tests/f_orphquot/image.bz2 b/tests/f_orphquot/image.bz2 new file mode 100644 index 0000000..7ac17a0 Binary files /dev/null and b/tests/f_orphquot/image.bz2 differ diff --git a/tests/f_orphquot/script b/tests/f_orphquot/script new file mode 100644 index 0000000..e17bff0 --- /dev/null +++ b/tests/f_orphquot/script @@ -0,0 +1,28 @@ +test_description="e2fsck with quota and orphan inodes" +OUT=$test_name.log +EXP=$test_dir/expect + +bzip2 -dc < $test_dir/image.bz2 > $TMPFILE + +rm -rf $OUT +$FSCK -f -y -N test_filesystem $TMPFILE > $OUT.new 2>&1 +status=$? +echo Exit status is $status >> $OUT.new +$DEBUGFS -R 'lq user' $TMPFILE >> $OUT.new 2>&1 +$DEBUGFS -R 'lq group' $TMPFILE >> $OUT.new 2>&1 +sed -f $cmd_dir/filter.sed $OUT.new >> $OUT +rm -f $OUT.new + +cmp -s $OUT $EXP +status=$? + +if [ "$status" = 0 ] ; then + echo "$test_name: $test_description: ok" + touch $test_name.ok +else + echo "$test_name: $test_description: failed" + diff $DIFF_OPTS $EXP $OUT > $test_name.failed + rm -f tmp_expect +fi + +unset IMAGE FSCK_OPT OUT EXP -- cgit v1.2.3