A test for unpacking tarballs with sparse files fails on ppc64le on Koschei (Rawhide & f36): FAIL: test_sparse_file_00 (test.test_tarfile.GNUReadTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.15/Lib/test/test_tarfile.py", line 971, in test_sparse_file_00 self._test_sparse_file("gnu/sparse-0.0") File "/builddir/build/BUILD/Python-3.6.15/Lib/test/test_tarfile.py", line 965, in _test_sparse_file self.assertLess(s.st_blocks * 512, s.st_size) AssertionError: 131072 not less than 86016 Note that 131072 is 256*512. The issue might be in *reporting* allocated blocks, anywhere along the path: - Python's assumption that st_block is measured in 512b units (AFAICS it should cuse DEV_BSIZE to be portable) - converting stat.st_block to the Python stat result object - libc stat() - kernel/filesystem - the test logic using some other wrong assumption Or the issue might be in the actual tarball unpacking.
yeah, different kernel page size or different filesystem look as plausible reasons for the failure to me
I got some PR's ready, waiting for the CI to verify the fix. https://github.com/fedora-python/cpython/pull/47 https://src.fedoraproject.org/rpms/python3.6/pull-request/50 https://src.fedoraproject.org/rpms/python3.6/pull-request/51 https://src.fedoraproject.org/rpms/python3.6/pull-request/52
> This was fixed in RHEL 8 but not in Fedora :( Oh sorry, I only fixed the issue in Python upstream and in RHEL. The issue is very specific to test_tarfile on ppc64 with tmpfs filesystem. It's good to backport the fix, it's simple and should repair Koschei :-)