Page MenuHomeFreeBSD

Pre-load a blist before interactive testing
AbandonedPublic

Authored by dougm on Nov 17 2018, 10:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 23 2023, 2:16 AM
Unknown Object (File)
Dec 20 2023, 5:27 AM
Unknown Object (File)
Nov 6 2023, 7:11 PM
Unknown Object (File)
Oct 24 2023, 9:30 AM
Unknown Object (File)
Oct 2 2023, 7:15 PM
Unknown Object (File)
Sep 9 2023, 6:46 PM
Unknown Object (File)
Jan 16 2023, 11:57 AM
Unknown Object (File)
Jan 13 2023, 11:29 PM
Subscribers
None

Details

Reviewers
alc
Summary

Add command line arguments to the command line for blist test application.

-r val seeds a random number generator with val
-h val sets the max number of live allocations during the startup phase to val
-n val sets the number of add/free events during the startup phase to val

During startup, ranges are allocated and freed randomly from the blist. An allocation is of random size. The kind of event, alloc or free, is determined randomly by picking a position in the array of live allocations, and if there is a live allocation there, deleting it. Otherwise, a new allocation is attempted and, if successful, added to the array of live allocations. If an operation fails during startup, a panic should stop the program.

After startup, the program runs as before, but with some blocks allocated.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

If blist_alloc fails in startup, fill everything and free everything to start over.

Don't use 'size' for too many different purposes.

Dropping from phabricator. Adding to subr_blist super-patch email-spam.