-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Make slog test setup more robust #9194
Conversation
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.
Looks reasonable to me. Were you able to identify which tests failed to remove their file vdevs? If possible we should also update their cleanup functions to remove them on failure.
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.
thanks for update.
i think, will be better try to remove unneeded files/dirs by test where we are using it instead of before new tests.
but by workaround this one will be fine too.
Actually, I think the preceding lines are where the problem was. It doesn't make sense to check if the devs are dirs. We can just remove them unconditionally. |
@behlendorf Good idea, I can add that to the shared cleanup function as well and test it. |
I've made each slog test responsible for its own setup and ensured they clean up after themselves better. |
And to explain the motivation a little better, the cleanup wasn't running for us because something would deadlock and we'd have to reboot or reset the system. The next test run would then fail because of the files left by the interrupted run. Having the tests clean up these files beforehand seems to have been intended all along and is certainly helpful. |
@freqlabs looks good, whenever you're ready can you drop the |
The slog tests fail when attempting to create pools using file vdevs that already exist from previous test runs. Remove these files in the setup for the test. Signed-off-by: Ryan Moeller <ryan@ixsystems.com>
Codecov Report
@@ Coverage Diff @@
## master #9194 +/- ##
==========================================
- Coverage 79.22% 79.03% -0.19%
==========================================
Files 400 400
Lines 122001 122001
==========================================
- Hits 96656 96429 -227
- Misses 25345 25572 +227
Continue to review full report at Codecov.
|
The slog tests fail when attempting to create pools using file vdevs that already exist from previous test runs. Remove these files in the setup for the test. Reviewed-by: Igor Kozhukhov <igor@dilos.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Ryan Moeller <ryan@ixsystems.com> Closes openzfs#9194
The slog tests fail when attempting to create pools using file vdevs that already exist from previous test runs. Remove these files in the setup for the test. Reviewed-by: Igor Kozhukhov <igor@dilos.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Ryan Moeller <ryan@ixsystems.com> Closes openzfs#9194
The slog tests fail when attempting to create pools using file vdevs that already exist from previous test runs. Remove these files in the setup for the test. Reviewed-by: Igor Kozhukhov <igor@dilos.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Ryan Moeller <ryan@ixsystems.com> Closes openzfs#9194
The slog tests fail when attempting to create pools using file vdevs that already exist from previous test runs. Remove these files in the setup for the test. Reviewed-by: Igor Kozhukhov <igor@dilos.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Signed-off-by: Ryan Moeller <ryan@ixsystems.com> Closes #9194
Motivation and Context
The slog tests fail when attempting to create pools using file vdevs that already exist from previous test runs.
Description
Remove existing vdev files from previous runs in the setup for the slog tests.
How Has This Been Tested?
Run the slog tests, abort in the middle of the run, run again.
Types of changes
Checklist:
Signed-off-by
.