[dpdk-test-report] |WARNING| pw31992 [PATCH v3 3/5] bbdev: test applications

checkpatch at dpdk.org checkpatch at dpdk.org
Thu Dec 7 22:41:50 CET 2017


Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/31992

_coding style issues_


WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#544: FILE: app/test-bbdev/main.h:51:
+#define TEST_ASSERT(cond, msg, ...) do {  \
+		if (!(cond)) {  \
+			printf("TestCase %s() line %d failed: " \
+				msg "
", __func__, __LINE__, ##__VA_ARGS__); \
+			return TEST_FAILED;  \
+		} \
+} while (0)

WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#553: FILE: app/test-bbdev/main.h:60:
+#define TEST_ASSERT_BUFFERS_ARE_EQUAL(a, b, len, msg, ...) do { \
+	if (memcmp((a), (b), len)) { \
+		printf("TestCase %s() line %d failed: " \
+			msg "
", __func__, __LINE__, ##__VA_ARGS__); \
+		rte_memdump(stdout, "Buffer A", (a), len); \
+		rte_memdump(stdout, "Buffer B", (b), len); \
+		return TEST_FAILED; \
+	} \
+} while (0)

WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#563: FILE: app/test-bbdev/main.h:70:
+#define TEST_ASSERT_SUCCESS(val, msg, ...) do { \
+		typeof(val) _val = (val); \
+		if (!(_val == 0)) { \
+			printf("TestCase %s() line %d failed (err %d): " \
+				msg "
", __func__, __LINE__, _val, \
+				##__VA_ARGS__); \
+			return TEST_FAILED; \
+		} \
+} while (0)

WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#576: FILE: app/test-bbdev/main.h:83:
+#define TEST_ASSERT_NOT_NULL(val, msg, ...) do { \
+		if ((val) == NULL) { \
+			printf("TestCase %s() line %d failed (null): " \
+				msg "
", __func__, __LINE__, ##__VA_ARGS__); \
+			return TEST_FAILED;  \
+		} \
+} while (0)

total: 0 errors, 4 warnings, 5535 lines checked


More information about the test-report mailing list