Page MenuHomeFreeBSD

Add simple regression tests for tree(3).

Authored by trasz on May 7 2019, 5:56 PM.



Add simple regression tests for tree(3). Those are ATF-ified versions
of OpenBSD's regress/sys/sys/tree/.

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

trasz created this revision.May 7 2019, 5:56 PM
ngie accepted this revision.May 8 2019, 11:31 PM


68–94 ↗(On Diff #57141)

General comment (I know this is upstream code): testing against ITER/ITER-1 (because the splay is removed on 92) is ok, but it is a bit fragile in the event that more code is added in the middle of the two loops. It would be better to increment the maximum value, decrement when removing, then test against the new smaller maximum in the second loop.

71–74 ↗(On Diff #57141)

That's an interesting way to handle collisions...

This revision is now accepted and ready to land.May 8 2019, 11:31 PM
This revision was automatically updated to reflect the committed changes.