-
Notifications
You must be signed in to change notification settings - Fork 444
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
[P4Testgen] BMv2 test generation improvements #4046
Conversation
…hen constraints are not feasible.
… either a wildcard or an exact match.
f590c26
to
0d1ad79
Compare
93b379c
to
3d158dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -404,10 +404,10 @@ class Test{{test_id}}(AbstractTest): | |||
## else | |||
ptfutils.verify_packet(self, exp_pkt, eg_port) | |||
bt.testutils.log.info("Verifying no other packets ...") | |||
ptfutils.verify_no_other_packets(self, self.device_id, timeout=2) | |||
ptfutils.verify_no_other_packets(self, self.device_id, timeout=0.1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend maybe using a global variable name or a return value from a global function defined with def
at the top level to get this timeout value, so that after a PTF test is generated, a user can replace this number in one place in the PTF source file, rather than many places.
Similarly if there are other timeouts to wait for a different reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rationale: 0.1 sec might work right now for BMv2, but I've been testing with other environments where it is definitely not long enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the environments where issues are coming up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
entry_restriction
parser and print a warning if a restriction is not satisfiable. Also ensure argument and parameter names are consistent.