[LTP] [PATCH] mmap21: Check for free space before mapping the file
Cyril Hrubis
chrubis@suse.cz
Tue Sep 8 12:47:35 CEST 2026
Hi!
> The test creates a sparse file with lseek() and a one byte write, so
> mmap() allocates no blocks. The child then touches every byte and ext4
> fills the holes inside ext4_page_mkwrite(). A store instruction has no
> error return, so an ENOSPC there becomes VM_FAULT_SIGBUS and the test
> reports only
>
> tst_test.c:536: TBROK: Child (13042) killed by signal SIGBUS
>
> which says nothing about the full filesystem. The information is
> available before the mapping and gone after it, so check it in setup
> and report TCONF earlier as convention.
Depending on the page size this is either 4MB or 64MB, I would say that
if you run LTP on a machine with less than 4MB of free space many tests
would fail.
Maybe it would make sense to print a warning from the test library for
any tests that has needs_tmpdir == 1 and the free space at the test
temporary directory is less than a few megabytes.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list