]>
Commit | Line | Data |
---|---|---|
7e3a4f0a JSMR |
1 | # vim: filetype=sh |
2 | ||
3 | test_description="create fs image from pax tarball with xattrs" | |
4 | if ! test -x $DEBUGFS_EXE; then | |
5 | echo "$test_name: $test_description: skipped (no debugfs)" | |
6 | return 0 | |
7 | fi | |
8 | if [ "$(grep -c 'define HAVE_ARCHIVE_H' ../lib/config.h)" -eq 0 ]; then | |
9 | echo "$test_name: skipped (no libarchive)" | |
10 | exit 0 | |
11 | fi | |
12 | ||
13 | OUT=$test_name.log | |
14 | EXP=$test_dir/expect | |
15 | ||
16 | perl $test_dir/mkpaxtar.pl \ | |
17 | | $MKE2FS -q -F -o Linux -T ext4 -O metadata_csum,64bit -E lazy_itable_init=1 -b 1024 -d - $TMPFILE 16384 > $OUT 2>&1 | |
18 | ||
19 | $DUMPE2FS $TMPFILE >> $OUT 2>&1 | |
20 | cat > $TMPFILE.cmd << ENDL | |
21 | stat /file | |
22 | ea_list /file | |
23 | ENDL | |
24 | $DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | egrep -v '^(crtime|Inode checksum):' >> $OUT | |
25 | ||
26 | $FSCK -f -n $TMPFILE >> $OUT 2>&1 | |
27 | ||
28 | sed -f $cmd_dir/filter.sed -f $test_dir/output.sed -e "s;$TMPFILE;test.img;" < $OUT > $OUT.tmp | |
29 | mv $OUT.tmp $OUT | |
30 | ||
31 | # Do the verification | |
32 | cmp -s $OUT $EXP | |
33 | status=$? | |
34 | ||
35 | if [ "$status" = 0 ] ; then | |
36 | echo "$test_name: $test_description: ok" | |
37 | touch $test_name.ok | |
38 | else | |
39 | echo "$test_name: $test_description: failed" | |
40 | diff $DIFF_OPTS $EXP $OUT > $test_name.failed | |
41 | fi | |
42 | ||
43 | rm -rf $TMPFILE.cmd | |
44 | unset OUT EXP |