From 1103c843a6b9213c6cf89449ff55a8c959dca910 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 30 Sep 2019 17:05:11 -0700 Subject: tar.test: work around SELinux messing with st_blocks. Just re-tar the extracted file and check we get the expected result. --- tests/tar.test | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/tar.test b/tests/tar.test index 235c3160..985cea5f 100644 --- a/tests/tar.test +++ b/tests/tar.test @@ -230,19 +230,18 @@ testing "sparse double overflow" "$TAR --sparse fweep | SUM 7" \ "f1fe57f8313a9d682ec9013a80f3798910b6ff51\n" "" "" tar c --sparse fweep > fweep.tar -FWEEP=$(stat -c "%b %s" fweep) rm fweep -testing "sparse extract" "tar xf fweep.tar && stat -c '%b %s' fweep" \ - "$FWEEP\n" "" "" +testing "sparse extract" "tar xf fweep.tar && $TAR --sparse fweep | SUM 4" \ + "38dc57b8b95632a287db843c214b5c96d1cfe415\n" "" "" testing "sparse tvf" "tar tvf fweep.tar | grep -wq 13172736 && echo right size"\ "right size\n" "" "" rm fweep fweep.tar tar c --sparse fweep2 > fweep2.tar -FWEEP=$(stat -c "%b %s" fweep2) rm fweep2 testing "sparse extract hole at end" \ - "tar xf fweep2.tar && stat -c '%b %s' fweep2" "$FWEEP\n" "" "" + "tar xf fweep2.tar && $TAR --sparse fweep2 | SUM 4" \ + "791060574c569e5c059e2b90c1961a3575898f97\n" "" "" rm fweep2 fweep2.tar if false -- cgit v1.2.3