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)
Jan 15 2024, 8:48 PM
Unknown Object (File)
Dec 20 2023, 4:33 AM
Unknown Object (File)
Dec 20 2023, 3:48 AM
Unknown Object (File)
Dec 15 2023, 5:40 PM
Unknown Object (File)
Nov 25 2023, 10:23 PM
Unknown Object (File)
Nov 23 2023, 3:26 AM
Unknown Object (File)
Nov 23 2023, 12:57 AM
Unknown Object (File)
Nov 23 2023, 12:54 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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