-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[verification] Ensure each test cleans up derived contexts #254
Comments
@jhand2, I have a similar logic in TagTCI testcase, can I move the logic to a new function in initializeContext.go? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the verification tests, if a test derives contexts that don't get destroyed, the target DPE will run out of contexts if it doesn't get reset. This is especially a problem for real hardware targets since they take too long to reset in between tests.
I would recommend some common setup code that derives a random context for each test to use that can be destroyed at the end of each test.
For example, if a target has an auto-initialized default context:
DeriveChild(retain-parent = true)
. This makes sure the test can hold onto the initial context to restore it at the end. So now we have two handles,initialParent
androotChild
.rootChild
rootChild
can be destroyedRotateContextHandle
make makeinitialParent
the default context again.The text was updated successfully, but these errors were encountered: