kunit: mock: print the mock method name when the return value is missing

1. not check the type of retval, the return from the mock method.
2. abort the test and output the mock method name in the error message, if the return value is empty.

Google-Bug-Id: 110154346
Signed-off-by: Lin Xinan <linxinan@google.com>
Change-Id: Ife1ac37153284e2583c0e5c13ada6288cd5c2cfe
diff --git a/include/test/mock.h b/include/test/mock.h
index 1796adc..3008f83 100644
--- a/include/test/mock.h
+++ b/include/test/mock.h
@@ -654,11 +654,10 @@
 						 param_type_names,	       \
 						 params,		       \
 						 ARRAY_SIZE(params));	       \
-			ASSERT_NOT_ERR_OR_NULL(mock->test, retval);	       \
 			if (!retval) {					       \
-				test_info(mock->test,			       \
-					  "no action installed for "#name);    \
-				BUG();					       \
+				ASSERT_FAILURE(mock->test, "mock " #name       \
+					       " expects to return a value,"   \
+					       " but none is provided.");      \
 			}						       \
 			RETURN(return_type, retval);			       \
 		}