Page MenuHomeFreeBSD

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

Authored by kib on Wed, Aug 19, 9:58 PM.
Tags
None
Referenced Files
F168808301: D59014.id184414.diff
Sun, Aug 30, 6:26 AM
F168799597: D59014.id.diff
Sun, Aug 30, 5:31 AM
F168736897: D59014.id184407.diff
Sat, Aug 29, 9:36 PM
F168725802: D59014.id184620.diff
Sat, Aug 29, 8:13 PM
F168719724: D59014.id184620.diff
Sat, Aug 29, 7:31 PM
Unknown Object (File)
Fri, Aug 28, 11:43 PM
Unknown Object (File)
Fri, Aug 28, 3:12 PM
Unknown Object (File)
Fri, Aug 28, 7:40 AM
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.Wed, Aug 19, 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.Thu, Aug 20, 12:47 PM