Skip to content
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

Open
jhand2 opened this issue Nov 3, 2023 · 1 comment
Open

[verification] Ensure each test cleans up derived contexts #254

jhand2 opened this issue Nov 3, 2023 · 1 comment

Comments

@jhand2
Copy link
Collaborator

jhand2 commented Nov 3, 2023

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 and rootChild.
  • The test can derive all necessary contexts from rootChild
  • And the end of the test, rootChild can be destroyed
  • Can use RotateContextHandle make make initialParent the default context again.
@hpya93
Copy link
Contributor

hpya93 commented Nov 17, 2023

@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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants