Update goldens

This commit is contained in:
pancake committed 2026-10-26 21:01:50 +01:00
1 parent 2a81c8d4d5
commit da793a230c
3 files changed
+22 -15

No files matched your search

+1 -1
View File
@@ -291,7 +291,7 @@ int main(int argc, const char **argv) {
R2F *r = r2f_new (&opt);
if (!r) {
r_list_free (fuseopts);
return 1;
return check? 2: 1;
}
int ret;
if (check) {
+8 -8
View File
@@ -3,7 +3,7 @@ apfs.img - ok
ext2.img - ok
ext3.img - ok
ext4.img - ok
ext4_advanced.img - fail ext2 grub plugin cannot mount it
ext4_advanced.img - ok
fat.img - ok
hfs.img - ok
iso.img - ok
@@ -11,18 +11,18 @@ iso2.img - ok
iso3.img - ok
iso-joliet-rockridge.iso - ok
udf.img udf ok autodetected as iso9660
haiku.bfs - fail bfs reads stop after the first block run
haiku.bfs - ok
ntfs.img - fail $Extend metafiles cannot be opened
ntfs-resident-oob.img - fail crafted image
reiserfs-link-root.img - fail symlinks reported as regular files
reiserfs-corrupt.img - fail crafted image
reiserfs-link-root.img - ok symlinks are reported as special files
reiserfs-corrupt.img - ok crafted image
reiserfs-name-oob.img - ok crafted image
sfs-btree-nodes.img sfs ok no sfs magic in r_fs_name
sfs-dir-cycle.img sfs ok crafted image
sfs-blocksize-0.img sfs fail crafted image, must refuse to mount
sfs-blocksize-0.img sfs reject crafted image, must refuse to mount
ubifs.img - ok
ubifs-index-cycle.img - ok crafted image
ubifs-oversize.img - fail crafted image
ubifs-oversize.img - ok synthetic image with unknown volume size
xfs-symlink-size.img - ok
bfs-sibling-cycle.img - fail crafted image, must refuse to mount
hfs-oobread.img - fail crafted image, must refuse to mount
bfs-sibling-cycle.img - reject crafted image, must refuse to mount
hfs-oobread.img - reject crafted image, must refuse to mount
+13 -6
View File
@@ -57,29 +57,36 @@ while read -r img fstype expect notes; do
fi
set --
[ "$fstype" != "-" ] && set -- -t "$fstype"
if with_timeout "$R2FUSE" -s "$@" "$path" > "$TMP/out" 2>&1; then
rc=0
with_timeout "$R2FUSE" -s "$@" "$path" > "$TMP/out" 2>&1 || rc=$?
case "$rc" in
0)
res=ok
if [ -n "$R2FUSE_MOUNT" ] && ! mount_test "$path" "$@"; then
res=fail
fi
else
res=fail
fi
;;
1) res=fail ;;
2) res=reject ;;
*) res=crash ;;
esac
summary=$(tail -n 1 "$TMP/out")
if [ "$res" = "$expect" ]; then
if [ "$res" = ok ]; then
echo "OK $img: $summary"; pass=$((pass + 1))
elif [ "$res" = reject ]; then
echo "OK $img: rejected malformed image"; pass=$((pass + 1))
else
echo "XFAIL $img: $notes"; xfail=$((xfail + 1))
fi
elif [ "$res" = ok ]; then
echo "XPASS $img: $summary (update test/images.txt)"; xpass=$((xpass + 1))
else
echo "FAIL $img: $summary"
echo "FAIL $img: exit $rc (expected $expect): $summary"
grep -E '^(FAIL|ERROR)' "$TMP/out" | head -n 5 | sed 's/^/ /'
fail=$((fail + 1))
fi
done < "$HERE/images.txt"
echo "# ok=$pass fail=$fail xfail=$xfail xpass=$xpass skip=$skip"
[ $fail -eq 0 ]
[ $fail -eq 0 ] && [ $xpass -eq 0 ]