tarfs: Simplify sameness checks

Sponsored by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D52928
This commit is contained in:
Dag-Erling Smørgrav
2025-10-07 18:23:48 +02:00
parent 18997fb9ec
commit 1b0fce2944
+3 -3
View File
@@ -67,9 +67,9 @@ tarfs_basic_body() {
mktar "${tarball}"
atf_check mount -rt tarfs "${tarball}" "${mnt}"
atf_check -o match:"^${tarball} on ${mnt} \(tarfs," mount
atf_check_equal "$(stat -f%d,%i "${mnt}"/sparse_file)" "$(stat -f%d,%i "${mnt}"/hard_link)"
atf_check_equal "$(stat -f%d,%i "${mnt}"/sparse_file)" "$(stat -L -f%d,%i "${mnt}"/short_link)"
atf_check_equal "$(stat -f%d,%i "${mnt}"/sparse_file)" "$(stat -L -f%d,%i "${mnt}"/long_link)"
atf_check test "${mnt}"/sparse_file -ef "${mnt}"/hard_link
atf_check test "${mnt}"/sparse_file -ef "${mnt}"/short_link
atf_check test "${mnt}"/sparse_file -ef "${mnt}"/long_link
atf_check -o inline:"${sum}\n" sha256 -q "${mnt}"/sparse_file
atf_check -o inline:"2,40755\n" stat -f%l,%p "${mnt}"/directory
atf_check -o inline:"1,100644\n" stat -f%l,%p "${mnt}"/file