Skip to content

Commit

Permalink
sparse test: fix for 64k page size (#387)
Browse files Browse the repository at this point in the history
this test failed on Debian's CI on ppc64el, because the page size is
64k there, which means the block size on tmpfs is as well, so attempting
to create 32k big holes cannot work.

Signed-off-by: Fabian Grünbichler <[email protected]>
Co-authored-by: Fabian Grünbichler <[email protected]>
  • Loading branch information
Fabian-Gruenbichler and Fabian Grünbichler authored Nov 10, 2024
1 parent 9189d3c commit 2064e86
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1114,8 +1114,9 @@ impl<W: Write> Drop for Builder<W> {
mod tests {
use super::*;

/// Should be multiple of 4KiB on ext4, multiple of 32KiB on FreeBSD/UFS.
const SPARSE_BLOCK_SIZE: u64 = 32768;
/// Should be multiple of 4KiB on ext4, multiple of 32KiB on FreeBSD/UFS, multiple of 64KiB on
/// ppc64el
const SPARSE_BLOCK_SIZE: u64 = 64 * 1024;

#[test]
fn test_find_sparse_entries() {
Expand Down

0 comments on commit 2064e86

Please sign in to comment.