[1/1] test/hash: fix error log output

Message ID 20230912115239.861800-1-zhoumin@loongson.cn (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [1/1] test/hash: fix error log output |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS

Commit Message

zhoumin Sept. 12, 2023, 11:52 a.m. UTC
  Caught while running meson test:
hash creation failedTest Failed

Add missing \n.

Fixes: 0eb3726ebcf ("test/hash: add test for read/write concurrency")

Signed-off-by: Min Zhou <zhoumin@loongson.cn>
---
 app/test/test_hash_readwrite.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Stephen Hemminger Sept. 13, 2023, 7:30 a.m. UTC | #1
On Tue, 12 Sep 2023 19:52:39 +0800
Min Zhou <zhoumin@loongson.cn> wrote:

> diff --git a/app/test/test_hash_readwrite.c
> b/app/test/test_hash_readwrite.c index 74ca13912f..4997a01249 100644
> --- a/app/test/test_hash_readwrite.c
> +++ b/app/test/test_hash_readwrite.c
> @@ -162,7 +162,7 @@ init_params(int use_ext, int use_htm, int rw_lf,
> int use_jhash) 
>  	handle = rte_hash_create(&hash_params);
>  	if (handle == NULL) {
> -		printf("hash creation failed");
> +		printf("hash creation failed\n");

Errors should be writen to stderr, not stdout?
It looks like the hash test doesn't do that anywhere though.
  
zhoumin Sept. 13, 2023, 9:23 a.m. UTC | #2
On Wed, Sep 13, 2023 at 3:30PM, Stephen Hemminger wrote:
> On Tue, 12 Sep 2023 19:52:39 +0800
> Min Zhou <zhoumin@loongson.cn> wrote:
>
>> diff --git a/app/test/test_hash_readwrite.c
>> b/app/test/test_hash_readwrite.c index 74ca13912f..4997a01249 100644
>> --- a/app/test/test_hash_readwrite.c
>> +++ b/app/test/test_hash_readwrite.c
>> @@ -162,7 +162,7 @@ init_params(int use_ext, int use_htm, int rw_lf,
>> int use_jhash)
>>   	handle = rte_hash_create(&hash_params);
>>   	if (handle == NULL) {
>> -		printf("hash creation failed");
>> +		printf("hash creation failed\n");
> Errors should be writen to stderr, not stdout?
> It looks like the hash test doesn't do that anywhere though.

Agree! The errors should go to stderr. However, there are many such 
cases in app/test that errors were written to stderr.  It requires huge 
effort to fix them.

Regards,

Min
  
Thomas Monjalon Nov. 23, 2023, 12:44 a.m. UTC | #3
12/09/2023 13:52, Min Zhou:
> Caught while running meson test:
> hash creation failedTest Failed
> 
> Add missing \n.
> 
> Fixes: 0eb3726ebcf ("test/hash: add test for read/write concurrency")
> 
> Signed-off-by: Min Zhou <zhoumin@loongson.cn>

Applied, thanks.
  

Patch

diff --git a/app/test/test_hash_readwrite.c b/app/test/test_hash_readwrite.c
index 74ca13912f..4997a01249 100644
--- a/app/test/test_hash_readwrite.c
+++ b/app/test/test_hash_readwrite.c
@@ -162,7 +162,7 @@  init_params(int use_ext, int use_htm, int rw_lf, int use_jhash)
 
 	handle = rte_hash_create(&hash_params);
 	if (handle == NULL) {
-		printf("hash creation failed");
+		printf("hash creation failed\n");
 		return -1;
 	}