]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-35772: Fix test_tarfile on ppc64 (GH-11606)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 21 Jan 2019 09:44:30 +0000 (01:44 -0800)
committerGitHub <noreply@github.com>
Mon, 21 Jan 2019 09:44:30 +0000 (01:44 -0800)
commitd1dd6be613381b996b9071443ef081de8e5f3aff
tree704f40ce6874281654e228d070724ca83eb0ecee
parentd358a8cda75446a8e0b5d99149f709395d5eae19
bpo-35772: Fix test_tarfile on ppc64 (GH-11606)

Fix sparse file tests of test_tarfile on ppc64le with the tmpfs
filesystem.

Fix the function testing if the filesystem supports sparse files:
create a file which contains data and "holes", instead of creating a
file which contains no data.

tmpfs effective block size is a page size (tmpfs lives in the page
cache). RHEL uses 64 KiB pages on aarch64, ppc64 and ppc64le, only
s390x and x86_64 use 4 KiB pages, whereas the test punch holes of
4 KiB.

test.pythoninfo: Add resource.getpagesize().
(cherry picked from commit b2385458ceddaf3d0d91456923716259d3915023)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
Lib/test/pythoninfo.py
Lib/test/test_tarfile.py
Misc/NEWS.d/next/Tests/2019-01-18-12-19-19.bpo-35772.sGBbsn.rst [new file with mode: 0644]