Add tests for save_param_buffer() and dump_param_buffer()
vvaltchev opened this issue · 2 comments
vvaltchev commented
As it can be seen here: https://app.codecov.io/gh/vvaltchev/tilck/blob/master/modules/tracing/ptype_buffer.c, both the functions don't have enough coverage.
It will be great to write unit tests for both the functions. Hints:
- Both the functions are
staticand need to be madeSTATICin order to be used from unit tests - Testing
save_param_buffer()requires mockingcopy_str_from_user()andcopy_from_user(), in order to make them fail. - As an example of a similar issue, see: #120
rviu commented
Hi, I would like to take this up