vvaltchev/tilck

Add tests for save_param_buffer() and dump_param_buffer()

vvaltchev opened this issue · 2 comments

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:

  1. Both the functions are static and need to be made STATIC in order to be used from unit tests
  2. Testing save_param_buffer() requires mocking copy_str_from_user() and copy_from_user(), in order to make them fail.
  3. As an example of a similar issue, see: #120
rviu commented

Hi, I would like to take this up

Hello @rviu, you're welcome to take this issue.