-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
[Feature request] Allow external profraws to be imported when using the report
command
#415
Comments
I'm happy to accept the patches needed to support cargo-fuzz. Btw, does cargo-fuzz not work in a way like cargo-afl? |
I have found a way similar, but i'm not a big fan of it : source <(cargo llvm-cov show-env --export-prefix)
cargo +nightly fuzz build #build in release mode
cp ./target/x86_64-unknown-linux-gnu/release/<target> ./target/release/<target>
cp ./fuzz/coverage/<target>/raw/default-<target>.profraw ./target/default-<target>.profraw
cargo llvm-cov report --release I mean, for AFL you didn't have to do the cp command everywhere.
|
Since the report needs the object files to function properly, maybe it's a good idea to add a warning so that the users also includes external object in this case ? Cargo fuzz generate it's own object files, that would maximize compatibility with the profraws. |
As for this |
There is no limit on the number of flags to add, but it may be easier here to add one flag that is specific to integration with cargo-fuzz and handle everything as a feature of that flag, rather than adding multiple generic flags. |
That seems to be the best thing to do, indeed. I was thinking about a The generics flags could be in case where no templates would be adequate for a situation, a custom configured After some thoughts I think I will remove the |
This can may be useful when using
llvm-cov
asidefuzz
cargo command, especially when using thefuzz coverage
command.Why ?
I'm learning to do fuzzing on a library I'm creating, and while
fuzz
is a great tool to actually do fuzzing, it's not as good to show the results of the coverages in a meaningfull way. On the other hand, your tool allows to show the results of the coverage in an understandable way, but seems to only support wellcargo run
,cargo test
, andcargo nextest
.So why not create a bridge between the two ?
How ?
The possibility i had in mind would be to have an argument
--import
/--external
which could be used multiple times per command. Each time that argument is provided, the path of the profraw file should be put after.I'm not sure if copying the profraw files to the the
llvm-cov-target
directory each time we use the report command is a good idea from a UX perspective, which is why i would suggest a flag argument--copy-all-external
to be added as well.PS
It seems that your tool allows to use external results (from what i can see here), but i didn't understood how to import my profdata / profraw into
llvm-cov
from there. Maybe this part is not even concerned with my feature request, idk.What do you guys think about it ?
The text was updated successfully, but these errors were encountered: