1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-06-27 00:21:08 +02:00

Fixed an issue that could cause compression to abort on growing files.

Reported by Jesper St John, Aleksandr Rogozin.
This commit is contained in:
David Steele
2017-08-30 16:34:05 -04:00
parent 81ffd09445
commit 206415d4c7
5 changed files with 65 additions and 3 deletions

View File

@ -105,12 +105,15 @@ sub run
$self->testResult(sub {$oIoHandle->read(\$tContent, $iFileLengthHalf)}, $iFileLengthHalf, ' read part 1');
$self->testResult($tContent, substr($strFileContent, 0, $iFileLengthHalf), ' check read');
$self->testResult(sub {$oIoHandle->eof()}, false, ' not eof');
$self->testResult(
sub {$oIoHandle->read(
\$tContent, $iFileLength - $iFileLengthHalf)}, $iFileLength - $iFileLengthHalf, ' read part 2');
$self->testResult($tContent, $strFileContent, ' check read');
$self->testResult(sub {$oIoHandle->read(\$tContent, 1)}, 0, ' eof');
$self->testResult(sub {$oIoHandle->read(\$tContent, 1)}, 0, ' zero read');
$self->testResult(sub {$oIoHandle->eof()}, true, ' eof');
}
################################################################################################################################