Repository navigation
CI: Add smatch static analysis workflow - #17935
Conversation
8eb1ad7 to
9f00998
Compare
|
Do you have sample output from smatch too? |
|
I'd a look at the ICP smatch errors. They're all about uninitialized symbols and caused by the fact that smatch doesn't know about |
I see. I think, this is good point to check with Dan Carpenter :) |
Smatch is an actively maintained kernel-aware static analyzer for C with a low false positive rate. Since the code checker can be run relatively quickly against the entire OpenZFS code base (15 min) it makes sense to add it as a GitHub Actions workflow. Today smatch reports a significant numbers warnings so the workflow is configured to always pass as long as the analysis was run. The results are available for reference. Long term it would ideal to resolve all of the errors/warnings at which point the workflow can be updated to fail when new problems are detected. ZFS-CI-Type: quick Signed-off-by: Brian Behlendorf
9f00998 to
ed65fb6
Compare
|
I added a "Smatch results log" section. It simply greps out of the build log any errors or warning. I can't see any real downside to adding this workflow, so I'm going to pull it in so folks can use it as a starting point and refine as needed to get something we're happy with. |
Smatch is an actively maintained kernel-aware static analyzer for C with a low false positive rate. Since the code checker can be run relatively quickly against the entire OpenZFS code base (15 min) it makes sense to add it as a GitHub Actions workflow. Today smatch reports a significant numbers warnings so the workflow is configured to always pass as long as the analysis was run. The results are available for reference. Long term it would ideal to resolve all of the errors/warnings at which point the workflow can be updated to fail when new problems are detected. Reviewed-by: Tony HutterReviewed-by: Toomas Soome Signed-off-by: Brian Behlendorf Closes openzfs#17935
Smatch is an actively maintained kernel-aware static analyzer for C with a low false positive rate. Since the code checker can be run relatively quickly against the entire OpenZFS code base (15 min) it makes sense to add it as a GitHub Actions workflow. Today smatch reports a significant numbers warnings so the workflow is configured to always pass as long as the analysis was run. The results are available for reference. Long term it would ideal to resolve all of the errors/warnings at which point the workflow can be updated to fail when new problems are detected. Reviewed-by: Tony HutterReviewed-by: Toomas Soome Signed-off-by: Brian Behlendorf Closes openzfs#17935
Smatch is an actively maintained kernel-aware static analyzer for C with a low false positive rate. Since the code checker can be run relatively quickly against the entire OpenZFS code base (15 min) it makes sense to add it as a GitHub Actions workflow. Today smatch reports a significant numbers warnings so the workflow is configured to always pass as long as the analysis was run. The results are available for reference. Long term it would ideal to resolve all of the errors/warnings at which point the workflow can be updated to fail when new problems are detected. Reviewed-by: Tony HutterReviewed-by: Toomas Soome Signed-off-by: Brian Behlendorf Closes openzfs#17935
Smatch is an actively maintained kernel-aware static analyzer for C with a low false positive rate. Since the code checker can be run relatively quickly against the entire OpenZFS code base (15 min) it makes sense to add it as a GitHub Actions workflow. Today smatch reports a significant numbers warnings so the workflow is configured to always pass as long as the analysis was run. The results are available for reference. Long term it would ideal to resolve all of the errors/warnings at which point the workflow can be updated to fail when new problems are detected. Reviewed-by: Tony HutterReviewed-by: Toomas Soome Signed-off-by: Brian Behlendorf Closes openzfs#17935
Smatch is an actively maintained kernel-aware static analyzer for C with a low false positive rate. Since the code checker can be run relatively quickly against the entire OpenZFS code base (15 min) it makes sense to add it as a GitHub Actions workflow. Today smatch reports a significant numbers warnings so the workflow is configured to always pass as long as the analysis was run. The results are available for reference. Long term it would ideal to resolve all of the errors/warnings at which point the workflow can be updated to fail when new problems are detected. Reviewed-by: Tony HutterReviewed-by: Toomas Soome Signed-off-by: Brian Behlendorf Closes openzfs#17935
Smatch is an actively maintained kernel-aware static analyzer for C with a low false positive rate. Since the code checker can be run relatively quickly against the entire OpenZFS code base (15 min) it makes sense to add it as a GitHub Actions workflow. Today smatch reports a significant numbers warnings so the workflow is configured to always pass as long as the analysis was run. The results are available for reference. Long term it would ideal to resolve all of the errors/warnings at which point the workflow can be updated to fail when new problems are detected. Reviewed-by: Tony HutterReviewed-by: Toomas Soome Signed-off-by: Brian Behlendorf Closes openzfs#17935
Smatch is an actively maintained kernel-aware static analyzer for C with a low false positive rate. Since the code checker can be run relatively quickly against the entire OpenZFS code base (15 min) it makes sense to add it as a GitHub Actions workflow. Today smatch reports a significant numbers warnings so the workflow is configured to always pass as long as the analysis was run. The results are available for reference. Long term it would ideal to resolve all of the errors/warnings at which point the workflow can be updated to fail when new problems are detected. Reviewed-by: Tony HutterReviewed-by: Toomas Soome Signed-off-by: Brian Behlendorf Closes #17935
Motivation and Context
As discussed in #17885 we want to enforce certain cstyle guidelines and catch bugs early in the development process. Adding the smatch code checker to the CI can help with both of these things. This PR automates running the analysis but it will take a concerted effort to resolve all the warnings.
Description
Smatch is an actively maintained kernel-aware static analyzer for C with a low false positive rate. Since the code checker can be run relatively quickly against the entire OpenZFS code base (15 min) it makes sense to add it as a GitHub Actions workflow. Today smatch reports a significant numbers warnings so the workflow is configured to always pass as long as the analysis was run. The results are available for reference. Long term it would ideal to resolve all of the errors/warnings at which point the workflow can be updated to fail when new problems are detected.
How Has This Been Tested?
Lightly tested here, https://github.com/behlendorf/zfs/actions/runs/19380431337
Types of changes
Checklist:
Signed-off-by.