Page MenuHomeFreeBSD

bitstring_test: Add regression tests for bit_ff(c|s)_area_at()
ClosedPublic

Authored by markj on May 19 2022, 5:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 8, 9:14 PM
Unknown Object (File)
Fri, Nov 8, 6:04 PM
Unknown Object (File)
Sep 5 2024, 1:52 PM
Unknown Object (File)
Sep 4 2024, 10:48 AM
Unknown Object (File)
Sep 4 2024, 9:32 AM
Unknown Object (File)
Sep 1 2024, 4:05 AM
Unknown Object (File)
Aug 27 2024, 7:49 PM
Unknown Object (File)
Aug 27 2024, 6:36 AM
Subscribers

Details

Summary

Validate the cases where a match can be found immediately and where no
match can be found. This extends the existing test cases and is enough
to catch the bug fixed in commit 6e7a585348d5 ("bitstring: fix ff_area()
when start!=0").

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 45640
Build 42528: arc lint + arc unit

Event Timeline

markj requested review of this revision.May 19 2022, 5:25 PM
tests/sys/sys/bitstring_test.c
339

If start != found, then not "Found %d set bits at %d", but rather "Did not find %d clear bits at %d".

353

Did not find %d clear bits at %d.

markj marked 2 inline comments as done.

Fix up test failure messages

tests/sys/sys/bitstring_test.c
353

My bad. The error is that we *did* find %d clear bits at %d, when we did not expect to.

markj marked an inline comment as done.

Fix up test failure messages, take two

This revision is now accepted and ready to land.May 19 2022, 10:14 PM