diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-21 04:59:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-21 04:59:33 +0000 |
commit | 73193347133e750faf27f88fd3ab31ce43aff062 (patch) | |
tree | e28a6d9512d1787b1fcbe9167188c9d134bf51d9 /tests/m_rootpaxtar/script | |
parent | Adding upstream version 1.47.0. (diff) | |
download | e2fsprogs-upstream.tar.xz e2fsprogs-upstream.zip |
Adding upstream version 1.47.1.upstream/1.47.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/m_rootpaxtar/script')
-rw-r--r-- | tests/m_rootpaxtar/script | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/m_rootpaxtar/script b/tests/m_rootpaxtar/script new file mode 100644 index 0000000..41dc7c3 --- /dev/null +++ b/tests/m_rootpaxtar/script @@ -0,0 +1,44 @@ +# vim: filetype=sh + +test_description="create fs image from pax tarball with xattrs" +if ! test -x $DEBUGFS_EXE; then + echo "$test_name: $test_description: skipped (no debugfs)" + return 0 +fi +if [ "$(grep -c 'define HAVE_ARCHIVE_H' ../lib/config.h)" -eq 0 ]; then + echo "$test_name: skipped (no libarchive)" + exit 0 +fi + +OUT=$test_name.log +EXP=$test_dir/expect + +perl $test_dir/mkpaxtar.pl \ + | $MKE2FS -q -F -o Linux -T ext4 -O metadata_csum,64bit -E lazy_itable_init=1 -b 1024 -d - $TMPFILE 16384 > $OUT 2>&1 + +$DUMPE2FS $TMPFILE >> $OUT 2>&1 +cat > $TMPFILE.cmd << ENDL +stat /file +ea_list /file +ENDL +$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | egrep -v '^(crtime|Inode checksum):' >> $OUT + +$FSCK -f -n $TMPFILE >> $OUT 2>&1 + +sed -f $cmd_dir/filter.sed -f $test_dir/output.sed -e "s;$TMPFILE;test.img;" < $OUT > $OUT.tmp +mv $OUT.tmp $OUT + +# Do the verification +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 +fi + +rm -rf $TMPFILE.cmd +unset OUT EXP |