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

ZTS: zpool_create_002 clean up leftover filedisk #7439

Merged
merged 1 commit into from
Apr 15, 2018
Merged

ZTS: zpool_create_002 clean up leftover filedisk #7439

merged 1 commit into from
Apr 15, 2018

Conversation

bunder2015
Copy link
Contributor

@bunder2015 bunder2015 commented Apr 15, 2018

Description

zpool_create_002_pos did not clean up filedisk files left over from
running the test.

Motivation and Context

Keeping /var/tmp clean.

Issue #7435

How Has This Been Tested?

Local test runner

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

  • My code follows the ZFS on Linux code style requirements.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • All commit messages are properly formatted and contain Signed-off-by.
  • Change has been approved by a ZFS on Linux member.

Copy link
Contributor

@dinatale2 dinatale2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Feedback below.

@@ -50,14 +50,14 @@ function cleanup
for pool in $TESTPOOL $TESTPOOL1 $TESTPOOL2 $TESTPOOL3 $TESTPOOL4 \
$TESTPOOL5 $TESTPOOL6
do
poolexists $pool && destroy_pool $pool
poolexists $pool && log_must destroy_pool $pool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can actually get rid of the poolexists check. destroy_pool already performs the check. You also don’t want to use log_must, if one destroy fails, you’d still want to attempt the other ones.

zpool_create_002_pos did not clean up filedisk files left over from
running the test.

Signed-off-by: bunder2015 <[email protected]>
Issue #7435
@bunder2015
Copy link
Contributor Author

Thanks for the tips, adjusted and repushed.

@codecov
Copy link

codecov bot commented Apr 15, 2018

Codecov Report

Merging #7439 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7439      +/-   ##
==========================================
+ Coverage   76.59%   76.61%   +0.02%     
==========================================
  Files         335      335              
  Lines      107017   107017              
==========================================
+ Hits        81971    81993      +22     
+ Misses      25046    25024      -22
Flag Coverage Δ
#kernel 76.96% <ø> (+0.05%) ⬆️
#user 66.05% <ø> (-0.16%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cbb8933...add891b. Read the comment docs.

@behlendorf behlendorf merged commit 3eba666 into openzfs:master Apr 15, 2018
@bunder2015 bunder2015 deleted the filedisk2 branch April 15, 2018 22:19
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

Successfully merging this pull request may close these issues.

4 participants