-
Notifications
You must be signed in to change notification settings - Fork 355
DAOS-19589 tests: Fix dmg_negative_test extend cases #19106
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -88,9 +88,9 @@ def run_osa_dmg_test(self, num_pool, extend=False): | |
| expected_result = str(sequence[2]) | ||
|
|
||
| # Extend the pool | ||
| # There is no need to extend rank 0 | ||
| # There is no need to extend rank 0-3 | ||
| # Avoid DER_ALREADY | ||
| if extend is True and rank != "0": | ||
| if extend is True and rank in ["4", "5"]: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is existing, so I don't expect this PR to fix it, but I think part of the problem with this logic is that the ranks are hardcoded. IMO it would be more robust to query the pool and extend only if the ranks are not already in the pool. I think reading such logic would make the behavior of the test more clear. But I will leave that for future enhancement.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. This test has confused me quite a bit and taken several iterations to fix properly. On top of that the value seems moderate.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am bit lost why this change is needed? The test is simple.... It takes the following test sequence and runs them in the loop based on whether extend needs to be done or not... dmg_cmd_test: If some can explain me what is wrong with the original code, I can try to understand... Basically it looks like the for loop takes each rows and uses the first value as a rank and try to run the dmg pool command, some ranks are invalid and some are valid...
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NOTE: This is a negative test... We are trying to pass invalid and some valid ranks... The only Valid rank test cases are related to ranks=0,4,5.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please provide me the Jenkins failure for the test which we are trying to address. To me, there is no need to change this test... I maybe wrong. But, I would like to review the failure before approving this PR.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure why this change is needed either. I'm guessing there's a reason that we don't want to extend rank 1, 2, 3, and 7, but we want to continue testing the rest of the commands with those ranks. If so, we should explain that somewhere. |
||
| self.log.info("=> Sequence %s: Extend rank %s onto pool %s", index, rank, pool) | ||
| if not self.validate_results(pool, expected_result, pool.extend(rank)): | ||
| self.fail("Error extending rank {} onto pool {}".format(rank, str(pool))) | ||
|
|
||
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.