ResTest
Tests for resource manager
- ResTest
Shortest form:
rt.Self-tests for the SDK’s resource-allocation library. By default they work on a private set of test pools that the command creates itself, so they do not touch the switch’s real resources.
The built-in help gives the grammar (upper-case letters are required):
ResTest Create [TL2]: create the test pools (TL2: tag length 2).ResTest DEstroy: destroy them.ResTest DUmp [Unit]: dump the test pools, or withUnitthe unit’s real resource pools (read-only).ResTest T: check that all test resources are free.ResTest T0…T9,TA: individual allocator tests, described in the built-in help.
Run
Createfirst. The tests only print results.Unvalidated
drivshell> restest create drivshell> restest t0 drivshell> restest destroy
Built-in help
(caps are obligatory, lower optional; <var> = use var's value; [optional]) ResTest Create [TL2] (create test resources, private to this command) ResTest DEstroy (destroy test resources) ResTest DUmp [Unit] (dump test resources or unit resources) ResTest T (verify resources are all free) ResTest T0 (basic alloc and free, increasing block sizes) ResTest T1 (basic alloc and free, decreasing block sizes) ResTest T2 (allocate and then free entire pools) ResTest T3 (alloc pools +1 alloc, free pools, +1 alloc, free) ResTest T4 (free unallocated elements/blocks) ResTest T5 (aligned alloc tests against bitmap allocator) ResTest T6 (aligned tagged alloc tests against tag bmp alloc) ResTest T7 (basic alloc and free, inc+dec block size, tagged) ResTest T8 (test pool/type set/unset, info, and free checks) ResTest T9 (test alloc WITH_ID and REPLACE) ResTest TA (test sparse allocation) The TL2 argument to create sets the tag length 2 (instead of 1) for those pools that support tagging. The dump command can dump either the test resources or the unit resources, and assumes the test resources if the unit keyword is not included.