@@ -77,13 +77,14 @@ void kunit_ptr_not_err_assert_format(const struct kunit_assert *assert,
assert);
if (!ptr_assert->value) {
- string_stream_add(stream,
- KUNIT_SUBTEST_INDENT "Expected %s is not null, but is\n",
+ string_stream_add(stream, KUNIT_SUBTEST_INDENT
+ "Expected %s is not null, but is\n",
ptr_assert->text);
} else if (IS_ERR(ptr_assert->value)) {
- string_stream_add(stream,
- KUNIT_SUBTEST_INDENT "Expected %s is not error, but is: %ld\n",
+ string_stream_add(stream, KUNIT_SUBTEST_INDENT
+ "Expected %s is not error, but is %pe (%ld)\n",
ptr_assert->text,
+ ptr_assert->value,
PTR_ERR(ptr_assert->value));
}
kunit_assert_print_msg(message, stream);