Hello Xu,
 
you can do the following:
 
1. Build your program using normal clang or gcc with the following changes:
- enable coverage instrumentation (-fprofile-arcs -ftest-coverage for gcc and -fprofile-instr-generate -fcoverage-mapping for clang)
- link to libkleeRuntest (-lkleeRuntest)
2. Run the compiled program with KTEST_FILE environment variable pointing to the testcase
 
Coverage data create by the instrumented binary can then be viewed or converted to a HTML report.
 
Also check the last section here: https://klee.github.io/tutorials/testing-function/
 
Best Regards,
 
Vlad
 
31.10.2021, 11:12, "rongze xv" <[email protected]>:
Hi klee-dev members,
 
I would like to ask how to use KLEE to get the execution coverage of each test case instead of the overall coverage of all test cases run this time?

If you can reply to me in your spare time, thank you very much!!  
 
Sincerely,
Xu Rongze
,

_______________________________________________
klee-dev mailing list
[email protected]
https://mailman.ic.ac.uk/mailman/listinfo/klee-dev

_______________________________________________
klee-dev mailing list
[email protected]
https://mailman.ic.ac.uk/mailman/listinfo/klee-dev

Reply via email to