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

Simplify deleting partitions in libtest #9224

Merged
merged 1 commit into from Aug 29, 2019
Merged

Simplify deleting partitions in libtest #9224

merged 1 commit into from Aug 29, 2019

Conversation

ghost
Copy link

@ghost ghost commented Aug 28, 2019

Motivation and Context

This code was needlessly complex and difficult to understand. Simplifying it helps clarify what is necessary to implement for other platforms.

Description

Eliminate unnecessary code duplication. We can use a for-loop instead of a while-loop. There is no need to echo $DISKSARRAY in a subshell or return 0. Declare all variables with typeset.

How Has This Been Tested?

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:

Eliminate unnecessary code duplication. We can use a for-loop instead
of a while-loop. There is no need to echo $DISKSARRAY in a subshell or
return 0. Declare all variables with typeset.

Signed-off-by: Ryan Moeller <ryan@ixsystems.com>
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Aug 28, 2019
@behlendorf behlendorf requested a review from jwk404 August 28, 2019 16:42
@codecov
Copy link

codecov bot commented Aug 29, 2019

Codecov Report

Merging #9224 into master will decrease coverage by 0.19%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #9224     +/-   ##
=========================================
- Coverage   79.24%   79.04%   -0.2%     
=========================================
  Files         400      400             
  Lines      122012   122012             
=========================================
- Hits        96687    96449    -238     
- Misses      25325    25563    +238
Flag Coverage Δ
#kernel 79.72% <ø> (-0.07%) ⬇️
#user 66.48% <ø> (-0.89%) ⬇️

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 e6203d2...f2fbfa1. Read the comment docs.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Aug 29, 2019
@behlendorf behlendorf merged commit 815a645 into openzfs:master Aug 29, 2019
@ghost ghost deleted the deleting-partitions branch August 29, 2019 20:12
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 24, 2019
Eliminate unnecessary code duplication. We can use a for-loop instead
of a while-loop. There is no need to echo $DISKSARRAY in a subshell or
return 0. Declare all variables with typeset.

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#9224
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 27, 2019
Eliminate unnecessary code duplication. We can use a for-loop instead
of a while-loop. There is no need to echo $DISKSARRAY in a subshell or
return 0. Declare all variables with typeset.

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#9224
tonyhutter pushed a commit that referenced this pull request Jan 23, 2020
Eliminate unnecessary code duplication. We can use a for-loop instead
of a while-loop. There is no need to echo $DISKSARRAY in a subshell or
return 0. Declare all variables with typeset.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Ryan Moeller <ryan@ixsystems.com>
Closes #9224
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants