kunit: test.h: fix format string for ASSERT_NOT_ERR_OR_NULL
davidchiang@ pointed out the format string differs from
EXPECT_NOT_ERR_OR_NULL.
The latter correctly uses %s while this uses %ld, producing stuff like
> Asserted ptr is not error, but is: 1887632768
This was missed in 1304e037936b2 which added the strerror_r() call.
Fixing that, the two macros are again identical in all the ways we expect.
Change-Id: I8af8e5ba2770e92f8d4fe1967091256f2c74a252
Signed-off-by: Daniel Latypov <dlatypov@google.com>
diff --git a/include/test/test.h b/include/test/test.h
index 1369963..755baf8 100644
--- a/include/test/test.h
+++ b/include/test/test.h
@@ -942,7 +942,7 @@ static inline void test_assert_binary(struct test *test,
"Asserted " #ptr " is not null, but is."); \
if (IS_ERR(__ptr)) \
__stream->add(__stream, \
- "Asserted " #ptr " is not error, but is: %ld", \
+ "Asserted " #ptr " is not error, but is: %s", \
strerror_r(-PTR_ERR(__ptr), buf, sizeof(buf))); \
\
ASSERT_END(test, !IS_ERR_OR_NULL(__ptr), __stream); \