Skip to content

Commit

Permalink
Test block sizes up to (2**31 - 1) bytes only
Browse files Browse the repository at this point in the history
Larger block sizes result in a negative length on 32 bit Perls, which
made the tests fail.
  • Loading branch information
mstock authored and bingos committed Mar 29, 2023
1 parent dcf41a3 commit 4e1a7a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions t/02_methods.t
Original file line number Diff line number Diff line change
Expand Up @@ -572,9 +572,9 @@ SKIP: { ### pesky warnings

### extract tests with different $EXTRACT_BLOCK_SIZE values ###
SKIP: { ### pesky warnings
skip $ebcdic_skip_msg, 517 if ord "A" != 65;
skip $ebcdic_skip_msg, 431 if ord "A" != 65;

skip('no IO::String', 517) if !$Archive::Tar::HAS_PERLIO &&
skip('no IO::String', 431) if !$Archive::Tar::HAS_PERLIO &&
!$Archive::Tar::HAS_PERLIO &&
!$Archive::Tar::HAS_IO_STRING &&
!$Archive::Tar::HAS_IO_STRING;
Expand All @@ -588,7 +588,7 @@ SKIP: { ### pesky warnings
) {
my($obj, $struct) = @$aref;

for my $block_size ((1, BLOCK, 1024 * 1024, 2**31 - 4096, 2**31, 2**32)) {
for my $block_size ((1, BLOCK, 1024 * 1024, 2**31 - 4096, 2**31 - 1)) {
local $Archive::Tar::EXTRACT_BLOCK_SIZE = $block_size;

ok( $obj->extract, " Extracted with 'extract'" );
Expand Down

0 comments on commit 4e1a7a3

Please sign in to comment.