mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2026-01-20 20:19:47 +00:00
Add NULL checks to KUNIT_BINARY_STR_ASSERTION() so that it will fail cleanly if either pointer is NULL, instead of causing a NULL pointer dereference in the strcmp(). A test failure could be that a string is unexpectedly NULL. This could be trapped by KUNIT_ASSERT_NOT_NULL() but that would terminate the test at that point. It's preferable that the KUNIT_EXPECT_STR*() macros can handle NULL pointers as a failure. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Reviewed-by: David Gow <davidgow@google.com> Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> |
||
|---|---|---|
| .. | ||
| assert.h | ||
| attributes.h | ||
| device.h | ||
| resource.h | ||
| static_stub.h | ||
| test-bug.h | ||
| test.h | ||
| try-catch.h | ||
| visibility.h | ||