Page MenuHomeFreeBSD

tests/sys/posixshm/posixshm_test.c::accounting fix after st_size changes
ClosedPublic

Authored by kib on Aug 19 2026, 9:58 PM.
Tags
None
Referenced Files
F172735749: D59014.diff
Sun, Sep 20, 3:38 PM
Unknown Object (File)
Wed, Sep 16, 1:00 PM
Unknown Object (File)
Tue, Sep 15, 8:15 PM
Unknown Object (File)
Tue, Sep 15, 6:01 PM
Unknown Object (File)
Tue, Sep 15, 4:33 PM
Unknown Object (File)
Tue, Sep 15, 4:18 PM
Unknown Object (File)
Tue, Sep 15, 1:57 AM
Unknown Object (File)
Sun, Sep 13, 9:41 PM
Subscribers

Details

Summary
st_blksize is defined by POSIX as the 'preferred I/O block size for this
object.' It is wrong to use st_blksize as the unit for st_blocks and
expect it to be equal to the object size regardless of the change of
st_blksize.

Fixes:  3a1bf59d195c ("shmfd: consistently return size in 512 byte blocks for fstat(2) st_blocks")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Aug 19 2026, 9:58 PM
kib updated this revision to Diff 184407.

Commit all chunks

Cosmetics: use ATF_CHECK_EQ instead of ATF_REQUIRE for size comparison.
Add debugging printfs to make debugging tests not so painful.

This revision is now accepted and ready to land.Aug 20 2026, 12:47 PM