On 4/29/24 22:26, Rae Moar wrote:
On Sat, Apr 27, 2024 at 6:04 PM Ivan Orlov ivan.orlov0322@gmail.com wrote:
There are multiple assertion formatting functions in the `assert.c` file, which are not covered with tests yet. Implement the KUnit test for these functions.
The test consists of 11 test cases for the following functions:
- 'is_literal'
- 'is_str_literal'
- 'kunit_assert_prologue', test case for multiple assert types
- 'kunit_assert_print_msg'
- 'kunit_unary_assert_format'
- 'kunit_ptr_not_err_assert_format'
- 'kunit_binary_assert_format'
- 'kunit_binary_ptr_assert_format'
- 'kunit_binary_str_assert_format'
- 'kunit_assert_hexdump'
- 'kunit_mem_assert_format'
The test aims at maximizing the branch coverage for the assertion formatting functions. As you can see, it covers some of the static helper functions as well, so we have to import the test source in the `assert.c` file in order to be able to call and validate them.
Signed-off-by: Ivan Orlov ivan.orlov0322@gmail.com
Hello,
I'll give this a full review tomorrow. But with a quick glance and test, this is looking good to me.
Tested-by: Rae Moar rmoar@google.com
Thanks! -Rae
Hi Rae,
Thanks a lot for testing the patch.
Looking forward to seeing your review! :)