[v2] eal: change the log level for test assert macro

Message ID 20200716183927.32967-1-honnappa.nagarahalli@arm.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series [v2] eal: change the log level for test assert macro |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS

Commit Message

Honnappa Nagarahalli July 16, 2020, 6:39 p.m. UTC
  Change the log level for RTE_TEST_ASSERT macro to error to help
log errors while running test cases.

Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
---
v2 - Added the suggested-by tag

 lib/librte_eal/include/rte_test.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

David Marchand July 17, 2020, 8:54 a.m. UTC | #1
On Thu, Jul 16, 2020 at 8:39 PM Honnappa Nagarahalli
<honnappa.nagarahalli@arm.com> wrote:
>
> Change the log level for RTE_TEST_ASSERT macro to error to help
> log errors while running test cases.
>
> Suggested-by: David Marchand <david.marchand@redhat.com>
> Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> Acked-by: Aaron Conole <aconole@redhat.com>
> Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>

We need this patch for the CI.
The change looks safe to me, so I went and applied it without waiting
for feedback from eventdev guys.

Thanks Honnappa.
  

Patch

diff --git a/lib/librte_eal/include/rte_test.h b/lib/librte_eal/include/rte_test.h
index 89e47f47a..62c8f165a 100644
--- a/lib/librte_eal/include/rte_test.h
+++ b/lib/librte_eal/include/rte_test.h
@@ -18,7 +18,7 @@ 
 
 #define RTE_TEST_ASSERT(cond, msg, ...) do {                                  \
 	if (!(cond)) {                                                        \
-		RTE_LOG(DEBUG, EAL, "Test assert %s line %d failed: "         \
+		RTE_LOG(ERR, EAL, "Test assert %s line %d failed: "           \
 				msg "\n", __func__, __LINE__, ##__VA_ARGS__); \
 		RTE_TEST_TRACE_FAILURE(__FILE__, __LINE__, __func__);         \
 		return -1;                                                    \