-
Notifications
You must be signed in to change notification settings - Fork 22
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
Improved trdelnik-tests folder structure for PoC and Fuzz Tests #109
Conversation
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.
Do I understand it correctly that your proposed structure will have separate Cargo.toml files for each fuzz test? I think this is quite sub-optimal as it effectively introduces new rust project for each and every fuzz test and it will blow the target folder size and compilation times as the compilation artifacts cannot be shared between tests. I think the two options that we spoke about (and are noted in Jira) would be a better way to go...
I went through some research and testing. Next thing I noticed (which is probably not likely to happen often), but let`s say if we need to modify Cargo files. for example if we add new program inside programs folder. We need to add something like:
Into the Cargo files. If we use one Package for all fuzz tests that would mean every fuzz test would need to be re-built, on the other hand if we use "package for every fuzz test" only the fuzz tests where we include the program dep for the new program would need to be re-built. And same goes for some other Cargo manifest modifications. However the one that is most likely to happen is dependency modifications (let`s say adding anchor-spl) as mentioned above, all packages in the workspace share common Cargo.lock and new dep will modify this Cargo that means all fuzz tests would need to be re-built for both options. Finally, I will refactor PR to use one Cargo = fuzz tests as one package, which I eventually find simpler to use and read. |
Comment on the latest commits
|
… poc_tests, update manifest templates
…zzer with exit code + moved exit code logic from cli to commander
…that they correctly generate fuzz_tests folder
86275c2
to
35e314a
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.
Good job, only minor question about the gitignore file and we can merge it afterwards. I created issues in Jira regarding the other two comments.
Purpose of this PR is to improve structure of trdelnik-tests folder
Currently the structure is as follows:
trdelnik-tests
Incoming structure
trdelnik-tests
commands can be executed:
Each fuzz test has its own directory that has to be added into project root Cargo.toml as a new member. This is done automatically during trdelnik fuzz add command. Further this command does not expect any additional arguments, that means no custom fuzz test names.
Both types of the tests (Fuzz/PoC) now has their own Cargo.toml template.
Examples within the examples folder were updated to the incoming trdelnik-test folder structure
Note: based on the incoming changes, following points were accordingly updated