Page MenuHomeFreeBSD

subr_physmem_test: add tests for two edge-cases
ClosedPublic

Authored by mhorne on Jul 8 2024, 3:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Aug 14, 9:54 AM
Unknown Object (File)
Fri, Aug 14, 8:58 AM
Unknown Object (File)
Mon, Aug 10, 6:31 AM
Unknown Object (File)
Sun, Aug 9, 8:53 PM
Unknown Object (File)
Sun, Aug 9, 5:34 PM
Unknown Object (File)
Sun, Aug 9, 7:12 AM
Unknown Object (File)
Sat, Aug 8, 9:41 PM
Unknown Object (File)
Sat, Aug 8, 6:21 PM
Subscribers

Details

Summary

Help validate my recent assertion that "physmem will never report empty
ranges". Part of this is covered by the existing tests, which check the
merging of adjacent/overlapping regions. The other part is to ensure
that addition of zero-sized ranges is ignored.

The implementation also includes logic to ignore the first physical page
of memory (physical addresses 0 to PAGE_SIZE-1). Add a second test case
for this.

Diff Detail

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

Event Timeline

mhorne requested review of this revision.Jul 8 2024, 3:23 PM

Rather late, but the patch seems fine to me.

This revision is now accepted and ready to land.Jul 13 2026, 3:59 PM

Rather late, but the patch seems fine to me.

Heh, thanks. I seem to still have the branch!