diff options
author | Elliott Hughes <enh@google.com> | 2019-09-30 17:05:11 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-10-02 11:45:43 -0500 |
commit | 1103c843a6b9213c6cf89449ff55a8c959dca910 (patch) | |
tree | 43705b9cd511ffa8380875ffcc0d08693889f142 | |
parent | 44741f51a46f8e6c99ff015e0568e11d9526ac01 (diff) | |
download | toybox-1103c843a6b9213c6cf89449ff55a8c959dca910.tar.gz |
tar.test: work around SELinux messing with st_blocks.
Just re-tar the extracted file and check we get the expected result.
-rw-r--r-- | tests/tar.test | 9 |
1 files 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 |