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

add regression test for "zpool list -p" #9134

Merged
merged 3 commits into from
Aug 26, 2019

Conversation

pcd1193182
Copy link
Contributor

Signed-off-by: Paul Dagnelie pcd@delphix.com

Motivation and Context

Other than this test, zpool list -p is not well tested by any of the automated tests.

Description

Add a test for zpool list -p

How Has This Been Tested?

Ran the test on Linux

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:

Signed-off-by: Paul Dagnelie <pcd@delphix.com>
@pcd1193182 pcd1193182 added Status: Code Review Needed Ready for review and testing Component: Test Suite Indicates an issue with the test framework or a test case labels Aug 8, 2019
Copy link
Contributor

@sdimitro sdimitro left a comment

Choose a reason for hiding this comment

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

Code LGTM in general. I have 2 questions:

I am a bit curious about the failure here though:http://build.zfsonlinux.org/builders/CentOS%206%20x86_64%20%28TEST%29/builds/7655/steps/shell_9/logs/summary

...
Test: /usr/share/zfs/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get_005_pos (run as root) [00:00] [FAIL]
21:28:58.32 sudo: unable to execute /usr/share/zfs/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get_005_pos.ksh: No such file or directory
...

Is there a permission issue with the file?

One more question: Do we really need a whole new file (zpool_get_parsable.cfg) for just a list of strings (properties) that is used for only one test? Would it make more sense to just add those in zpool_get_005_pos.ksh?

@pcd1193182
Copy link
Contributor Author

I'm not sure why the test failed on CentOS like that, and nowhere else... The permissions all look right, and the file is listed in the makefile, same as all the others. If it was an issue that basic I wouldn't think it would be platform specific?

As for the zpool_get_parsable, I didn't write the original patch, so if @prakashsurya wants to offer a different opinion he should feel free, but the way I understand it the list in that file isn't actually specific to this test; any test that wants to work with -p will want it, because it's the list of parsable properties. Since it's a semi-global list, it's stored outside of the tests in its own file.

@prakashsurya
Copy link
Member

Looks like I committed the original change in 2014; I have no recollection of what I might have been thinking back then, but Paul's description seems reasonable to me.

With that said, it looks like nothing has used that file since it was added (at least nothing is currently using it), so perhaps in-lining the array, as Serapheim suggests, would be better.

Ultimately, I'm fine either way.

Signed-off-by: Paul Dagnelie <pcd@delphix.com>
@codecov
Copy link

codecov bot commented Aug 13, 2019

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9134      +/-   ##
==========================================
- Coverage   79.33%   79.08%   -0.25%     
==========================================
  Files         400      400              
  Lines      121692   121692              
==========================================
- Hits        96542    96245     -297     
- Misses      25150    25447     +297
Flag Coverage Δ
#kernel 79.67% <ø> (-0.14%) ⬇️
#user 66.83% <ø> (-0.48%) ⬇️

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 c81f179...c8750e0. Read the comment docs.

@pcd1193182
Copy link
Contributor Author

Update: The CentOS failure was probably caused by the #! line being different in this test than in the others; on other platforms, ksh could be found in either location, but on CentOS it's only in /bin/.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Aug 22, 2019
@behlendorf behlendorf merged commit 95f0144 into openzfs:master Aug 26, 2019
ghost pushed a commit to zfsonfreebsd/ZoF that referenced this pull request Aug 27, 2019
Other than this test, zpool list -p is not well tested by any of the 
automated tests.  Add a test for zpool list -p.

Reviewed-by: Prakash Surya <prakash.surya@delphix.com>
Reviewed-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
Closes openzfs#9134
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 24, 2019
Other than this test, zpool list -p is not well tested by any of the
automated tests.  Add a test for zpool list -p.

Reviewed-by: Prakash Surya <prakash.surya@delphix.com>
Reviewed-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
Closes openzfs#9134
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 27, 2019
Other than this test, zpool list -p is not well tested by any of the
automated tests.  Add a test for zpool list -p.

Reviewed-by: Prakash Surya <prakash.surya@delphix.com>
Reviewed-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
Closes openzfs#9134
tonyhutter pushed a commit that referenced this pull request Jan 23, 2020
Other than this test, zpool list -p is not well tested by any of the
automated tests.  Add a test for zpool list -p.

Reviewed-by: Prakash Surya <prakash.surya@delphix.com>
Reviewed-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
Closes #9134
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Test Suite Indicates an issue with the test framework or a test case Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants