-
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
ZTS: Clean up zfs_clone_010_pos #9284
Conversation
tests/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_010_pos.ksh
Outdated
Show resolved
Hide resolved
tests/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_010_pos.ksh
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #9284 +/- ##
==========================================
+ Coverage 79.06% 79.13% +0.06%
==========================================
Files 400 400
Lines 122041 122041
==========================================
+ Hits 96494 96578 +84
+ Misses 25547 25463 -84
Continue to review full report at Codecov.
|
Remove a lot of unnecessary setting and incrementing of `i`. Remove unused variable `j`. Instead of calling out to Python in a loop to generate the same string repeatedly, call it once outside of the loop. And add parenthesis to make the print statement compatible with Python 3. Signed-off-by: Ryan Moeller <ryan@ixsystems.com>
378236c
to
1e90971
Compare
I would like to amend the commit message to reflect the removal of Python after the tests have run. Should I use |
@freqlabs it's OK to let the tests run again. The additional testing is always welcome. However, if you prefer you could simply post the updated commit message as a commit and I can fix up the comment when merging this. |
@behlendorf thanks, to give the buildbots a chance to test someone else's work here is my updated commit message:
|
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
Remove a lot of unnecessary setting and incrementing of `i`. Remove unused variable `j`. Instead of calling out to Python in a loop to generate the same string repeatedly, generate the string once using shell constructs before entering the loop. Reviewed-by: Igor Kozhukhov <igor@dilos.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com> Signed-off-by: Ryan Moeller <ryan@ixsystems.com> Closes openzfs#9284
Remove a lot of unnecessary setting and incrementing of `i`. Remove unused variable `j`. Instead of calling out to Python in a loop to generate the same string repeatedly, generate the string once using shell constructs before entering the loop. Reviewed-by: Igor Kozhukhov <igor@dilos.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com> Signed-off-by: Ryan Moeller <ryan@ixsystems.com> Closes openzfs#9284
Remove a lot of unnecessary setting and incrementing of `i`. Remove unused variable `j`. Instead of calling out to Python in a loop to generate the same string repeatedly, generate the string once using shell constructs before entering the loop. Reviewed-by: Igor Kozhukhov <igor@dilos.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com> Signed-off-by: Ryan Moeller <ryan@ixsystems.com> Closes #9284
Motivation and Context
On many systems,
python
is Python 3. zfs_clone_010_pos invokespython -c 'print "x" * 200'
, which is not valid in Python 3.Description
Eliminate the Python, using built in shell constructs in its place.
While here, a few more potential improvements revealed themselves:
Remove a lot of unnecessary setting and incrementing of
i
.Remove unused variable
j
.Instead of generating the same string repeatedly inside a loop, generate it once outside of the loop.
How Has This Been Tested?
./scripts/zfs-tests.sh -vxT zfs_clone
Types of changes
Checklist:
Signed-off-by
.