[1/1] test/hash: fix error log output
Checks
Commit Message
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
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.
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
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.
@@ -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;
}