google / atheris

Apache License 2.0
1.35k stars 111 forks source link

Coverage for Tensorflow not show up #41

Closed huan1372 closed 1 year ago

huan1372 commented 1 year ago

Hi, I am working on using Atheris to find the test coverage of tensorflow. For testcode here: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/security/fuzzing/abs_fuzz.py By using command below:

python3 -m coverage run abs_fuzz.py -atheris_runs=10000
python3 -m coverage report

The results only shows as below:

Name                Stmts   Miss  Cover
---------------------------------------
abs_fuzz.py            15      0   100%
python_fuzzing.py      52     14    73%
---------------------------------------
TOTAL                  67     14    79%

Why does that coverage report does not show how abs function covered the tensorflow library itself(like going though thousands of lines)? Even I try to instrumented all, it does not show up Is there any way to make tensorflow's coverage showing up? Thank you!!!

huan1372 commented 1 year ago

I figure that out. -L flag need to be included in coverage