Page MenuHomeFreeBSD

Add simple regression tests for tree(3).
ClosedPublic

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

Details

Summary

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

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

seemslegit

tests/sys/sys/splay_test.c
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.