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

Enhance ioctl number checks #9187

Merged
merged 1 commit into from Aug 22, 2019
Merged

Enhance ioctl number checks #9187

merged 1 commit into from Aug 22, 2019

Conversation

ghost
Copy link

@ghost ghost commented Aug 20, 2019

Motivation and Context

The test suite includes a program for basic low-level testing of ZFS ioctls. One of its functions validates the values of ZFS_IOC_* constants. The test is a long string of comparisons chained together with '&&'. If the test fails, there is no indication of which values were incorrect.

Description

When validating the ZFS_IOC_* numbers, print the comparisons that fail.

This was done using a short macro to minimize the code change and keep the code simple and readable.

How Has This Been Tested?

Passes ZTS

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:

When checking ZFS_IOC_* numbers, print which numbers are wrong rather
than silently failing.

Signed-off-by: Ryan Moeller <[email protected]>
@behlendorf behlendorf requested a review from don-brady August 21, 2019 00:58
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Aug 21, 2019
@codecov
Copy link

codecov bot commented Aug 21, 2019

Codecov Report

Merging #9187 into master will increase coverage by 0.07%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9187      +/-   ##
==========================================
+ Coverage   79.05%   79.12%   +0.07%     
==========================================
  Files         400      400              
  Lines      122000   122001       +1     
==========================================
+ Hits        96443    96534      +91     
+ Misses      25557    25467      -90
Flag Coverage Δ
#kernel 79.74% <ø> (+0.01%) ⬆️
#user 67.09% <100%> (+0.47%) ⬆️

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 325d288...7a8665c. 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 21, 2019
@behlendorf behlendorf merged commit f591a58 into openzfs:master Aug 22, 2019
@ghost ghost deleted the enhanced-ioc-checks branch August 22, 2019 16:50
@ghost ghost mentioned this pull request Aug 31, 2019
12 tasks
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 24, 2019
When checking ZFS_IOC_* numbers, print which numbers are wrong rather
than silently failing.

Reviewed-by: Chris Dunlop <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes openzfs#9187
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 27, 2019
When checking ZFS_IOC_* numbers, print which numbers are wrong rather
than silently failing.

Reviewed-by: Chris Dunlop <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes openzfs#9187
tonyhutter pushed a commit that referenced this pull request Jan 23, 2020
When checking ZFS_IOC_* numbers, print which numbers are wrong rather
than silently failing.

Reviewed-by: Chris Dunlop <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #9187
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.

2 participants