Skip to content

Conversation

@dinatale2
Copy link
Contributor

Description

Enable commitcheck.sh to test if a commit message is
in the expected format for coverity defect fixes.

Motivation and Context

Automate commit message checking for coverity defect fixes.

How Has This Been Tested?

Locally on a RHEL 7 based system.

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.
  • All new and existing tests passed.
  • All commit messages are properly formatted and contain Signed-off-by.
  • Change has been approved by a ZFS on Linux member.

@dinatale2 dinatale2 force-pushed the coverity-commit-checker branch 4 times, most recently from 29a9338 to d11cddd Compare October 23, 2017 22:57

function is_coverity_fix()
{
# subject starts with OpenZFS means it's an openzfs port
Copy link
Contributor

Choose a reason for hiding this comment

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

Update the comment here to reflect this is a coverify not openzfs commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, fixed.

@dinatale2 dinatale2 force-pushed the coverity-commit-checker branch from d11cddd to 4528e4e Compare October 24, 2017 00:01
git log -n 1 --pretty=%b "$REF" | egrep '^CID' | while read -r line; do
echo "$line" | egrep '^CID [[:digit:]]+: ([[:graph:]]+|[[:space:]])+ \(([[:upper:]]|\_)+\)' > /dev/null
if [[ $? -ne 0 ]]; then
echo "error: commit message has an improperly formatted CID defect line"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think there's going to be a subshell problem here... going to need to fix that.

Enable commitcheck.sh to test if a commit message is
in the expected format for a coverity defect fix.

Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
@dinatale2 dinatale2 force-pushed the coverity-commit-checker branch from 4528e4e to 8c54df9 Compare October 24, 2017 03:43
@codecov
Copy link

codecov bot commented Oct 24, 2017

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6777      +/-   ##
==========================================
- Coverage   75.17%   74.49%   -0.69%     
==========================================
  Files         297      297              
  Lines       94374    94371       -3     
==========================================
- Hits        70947    70298     -649     
- Misses      23427    24073     +646
Flag Coverage Δ
#kernel 74.05% <ø> (-0.69%) ⬇️
#user 66.78% <ø> (-0.6%) ⬇️
Impacted Files Coverage Δ
module/icp/algs/skein/skein_port.h 0% <0%> (-100%) ⬇️
cmd/zed/agents/fmd_serd.c 8.91% <0%> (-71.29%) ⬇️
cmd/zed/agents/fmd_api.c 29.18% <0%> (-57.3%) ⬇️
cmd/zed/agents/zfs_diagnosis.c 31.96% <0%> (-38.42%) ⬇️
module/zfs/vdev_missing.c 60% <0%> (-30%) ⬇️
cmd/zed/agents/zfs_retire.c 53.41% <0%> (-23.61%) ⬇️
cmd/zed/zed_event.c 42.52% <0%> (-18.3%) ⬇️
cmd/zed/agents/zfs_agents.c 75.78% <0%> (-14.07%) ⬇️
module/zfs/zio_inject.c 65.49% <0%> (-11.38%) ⬇️
lib/libuutil/uu_list.c 62.75% <0%> (-7.04%) ⬇️
... and 45 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 64b8c58...8c54df9. Read the comment docs.

Copy link
Member

@gmelikov gmelikov left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@behlendorf behlendorf merged commit 8dcaf24 into openzfs:master Oct 26, 2017
@dinatale2 dinatale2 deleted the coverity-commit-checker branch October 27, 2017 22:07
Nasf-Fan pushed a commit to Nasf-Fan/zfs that referenced this pull request Nov 4, 2017
Enable commitcheck.sh to test if a commit message is
in the expected format for a coverity defect fix.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Closes openzfs#6777
Nasf-Fan pushed a commit to Nasf-Fan/zfs that referenced this pull request Nov 6, 2017
Enable commitcheck.sh to test if a commit message is
in the expected format for a coverity defect fix.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Closes openzfs#6777
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Jan 18, 2018
Enable commitcheck.sh to test if a commit message is
in the expected format for a coverity defect fix.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Closes openzfs#6777
Nasf-Fan pushed a commit to Nasf-Fan/zfs that referenced this pull request Jan 29, 2018
Enable commitcheck.sh to test if a commit message is
in the expected format for a coverity defect fix.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Closes openzfs#6777
Nasf-Fan pushed a commit to Nasf-Fan/zfs that referenced this pull request Feb 13, 2018
Enable commitcheck.sh to test if a commit message is
in the expected format for a coverity defect fix.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Closes openzfs#6777
FransUrbo pushed a commit to FransUrbo/zfs that referenced this pull request Apr 28, 2019
Enable commitcheck.sh to test if a commit message is
in the expected format for a coverity defect fix.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Closes openzfs#6777
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants