-
Notifications
You must be signed in to change notification settings - Fork 70
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
Fuzz Testing Implementation #298
Conversation
tylerzhao7684
commented
Jun 6, 2023
•
edited
Loading
edited
- Fuzz Testing Directory and contents added
- CMake configured for Fuzz Testing directory
- Header file created to allow unit test to load data from a properly-formatted yaml file
- Python script created to mutate a single variable and output to a new file
- Python script created to do fuzz testing for a single unit test file
- Python script created to do fuzz testing for multiple test files
- Save fuzz testing outputs to a new directory
- Load data for different data types
- Identify which variables are suitable for fuzzing
- Workaround for unit test memory leak issue
- Interpret results from fuzz testing and determine if a failure is "secure"
- Code Coverage Report
- Workflow that triggers fuzz testing
- Documentation on how to do fuzz testing locally
Thanks Tyler for working on this. The approach looks good to me! I assume we won't check-in all unit tests file unless we have the corresponding yml file to fuzz test them, correct? I will take a closer look on the scripts too. |
Proof that the workflow is correctly catching Address Sanitizer errors (ASAN errors): |
Proof that the test is able to detect hangs correctly: |
Proof that the test is able to catch assertion failures correctly: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Tyler, I have reviewed some of your changes. They look very good to me. I had some small comments below. I will continue reviewing some technical details and add more comments.
Thanks for the review Zibai! I thought about it and I changed my mind on this. I believe although I built the fuzz test infra based off the current unit tests, we should not regard them as the same test. In other words. we can add different contents to the fuzz tests and the unit tests. The commonality of fuzz tests and unit tests is that they test the same source function (i.e. This opens up opportunity to create tests that are fuzz test only, such as a more in-depth test that goes through multiple source functions that interacts with the fuzzed variable. I hope this answers:
What do you think? |
Hi Tyler, yeah I agree we should consider those tests are different. But I think the developer should still update the fuzz test if they make the change to the acl_auto_configure.cpp, right? I guess you meant they are similar right now but they can be very different in the future, I agree with you and that means the automation is not neccessary. However, I do believe we should not create duplicate files of those bsp files as I don't think we will do anything different for BSP in fuzz testing. Can you check if there is anyway the fuzz test can just reuse those BSPs? |
Yup I'll remove the BSPs in the fuzz_testing directory. |
f2d041a
to
c421c14
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Tyler. I think this PR is ready to be merged once the pull_request
testing removed in the yml.