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
Unknown Object (File)
Fri, Aug 21, 11:04 AM
Unknown Object (File)
Fri, Aug 21, 1:39 AM
Unknown Object (File)
Thu, Aug 20, 8:49 PM
Unknown Object (File)
Thu, Aug 20, 8:48 PM
Unknown Object (File)
Thu, Aug 20, 8:48 PM
Unknown Object (File)
Thu, Aug 20, 5:12 PM
Unknown Object (File)
Thu, Aug 20, 4:48 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.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