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 more sanity testing for zdb input args #10243

Merged
merged 1 commit into from
Apr 28, 2020

Conversation

shartse
Copy link
Contributor

@shartse shartse commented Apr 23, 2020

Motivation and Context

There's a lot going on in ZDB, in the past as I've expanded it's features I've accidentally introduced regressions. I decided to take a stab at extending some of our testing.

Description

Add positive argument testing to confirm that flags that we expect to be available don't result in failures or crashes.

Modify the existing negative arg test to have a more explicit name and correct the test by adding a pool argument to the zdb invocation (some tests with valid flags were erroneously passing because they were missing the pool arg).

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:

  • 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.
  • I have run the ZFS Test Suite with this change applied.
  • All commit messages are properly formatted and contain Signed-off-by.

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Apr 23, 2020
@codecov-io
Copy link

codecov-io commented Apr 24, 2020

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10243      +/-   ##
==========================================
- Coverage   79.28%   79.27%   -0.01%     
==========================================
  Files         389      389              
  Lines      123402   123402              
==========================================
- Hits        97834    97823      -11     
- Misses      25568    25579      +11     
Flag Coverage Δ
#kernel 79.86% <ø> (-0.04%) ⬇️
#user 65.62% <ø> (+1.20%) ⬆️
Impacted Files Coverage Δ
module/os/linux/spl/spl-zlib.c 55.35% <0.00%> (-28.58%) ⬇️
cmd/zdb/zdb_il.c 30.86% <0.00%> (-24.08%) ⬇️
cmd/ztest/ztest.c 76.84% <0.00%> (-3.94%) ⬇️
module/zcommon/zfs_fletcher.c 75.65% <0.00%> (-2.64%) ⬇️
module/zfs/zio_compress.c 89.74% <0.00%> (-2.57%) ⬇️
module/zfs/dsl_synctask.c 92.40% <0.00%> (-2.54%) ⬇️
module/os/linux/zfs/vdev_file.c 80.37% <0.00%> (-1.87%) ⬇️
module/icp/api/kcf_mac.c 37.14% <0.00%> (-1.72%) ⬇️
lib/libzfs/libzfs_changelist.c 85.15% <0.00%> (-1.18%) ⬇️
module/zcommon/zfs_uio.c 87.75% <0.00%> (-1.03%) ⬇️
... and 48 more

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 70e5ad3...a8bb64d. Read the comment docs.

Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

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

It's good to see some additional zdb test coverage!

@shartse shartse marked this pull request as ready for review April 27, 2020 22:56
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Apr 28, 2020
@behlendorf behlendorf merged commit 89a6610 into openzfs:master Apr 28, 2020
as-com pushed a commit to as-com/zfs that referenced this pull request Jun 20, 2020
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: John Kennedy <[email protected]>
Signed-off-by: sara hartse <[email protected]>
Closes openzfs#10243 
(cherry picked from commit 89a6610)
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: John Kennedy <[email protected]>
Signed-off-by: sara hartse <[email protected]>
Closes openzfs#10243
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.

4 participants