HomeFreeBSD

ZTS: limit mmapwrite file size

Description

ZTS: limit mmapwrite file size

commit ee6bf97c7727c118f7bbb8be4bb0eedcaca2ad35 upstream

mmapwrite spawns several threads, all of which perform writes on a file
for the purpose of testing the behavior of mmap(2)-ed files. One
thread performs an mmap and a write to the beginning of that region,
while the others perform regular writes after lseek(2)-ing the end of
the file.

Because these regular writes are set in a while (1) loop, they will
write an unbounded amount of data to disk. The mmap_write_001_pos test
script SIGKILLs them after 30 seconds, but on fast testbeds, this may
be enough time to exhaust the available space in the filesystem,
leading to spurious test failures.

Instead, limit the total file size by checking that the lseek return
value is no greater than 250 * 1024*1024 bytes, which is less than the
default minimum vdev size defined in includes/default.cfg .

This also includes part of 2a493a4c7127258b14c39e8c71a9d6f01167c5cd,
which checks the return value of lseek.

Signed-off-by: Antonio Russo <aerusso@aerusso.net>
Closes #14277
Closes #14345

Details

Provenance
Antonio Russo <aerusso@aerusso.net>Authored on Jan 5 2023, 8:50 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jan 10 2023, 1:15 AM
Parents
rG75fbe7eb99c3: skip permission checks for extended attributes
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGa75af541cf18: ZTS: limit mmapwrite file size (authored by Antonio Russo <aerusso@aerusso.net>).Jan 10 2023, 1:15 AM