lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <30f8bb02-5271-4a6a-9f59-12382b6e41a0@ghiti.fr>
Date: Fri, 15 Dec 2023 14:44:25 +0100
From: Alexandre Ghiti <alex@...ti.fr>
To: Christoph Muellner <christoph.muellner@...ll.eu>,
 linux-riscv@...ts.infradead.org, linux-kselftest@...r.kernel.org,
 linux-kernel@...r.kernel.org, Palmer Dabbelt <palmer@...belt.com>,
 Paul Walmsley <paul.walmsley@...ive.com>, Albert Ou <aou@...s.berkeley.edu>,
 Shuah Khan <shuah@...nel.org>
Cc: Philipp Tomsich <philipp.tomsich@...ll.eu>,
 Andrew Jones <ajones@...tanamicro.com>, Evan Green <evan@...osinc.com>,
 Xiao Wang <xiao.w.wang@...el.com>, Alexandre Ghiti <alexghiti@...osinc.com>,
 Andy Chiu <andy.chiu@...ive.com>, Björn Töpel
 <bjorn@...osinc.com>, Charlie Jenkins <charlie@...osinc.com>
Subject: Re: [PATCH 4/5] tools: selftests: riscv: Fix compile warnings in
 vector tests

On 23/11/2023 19:58, Christoph Muellner wrote:
> From: Christoph Müllner <christoph.muellner@...ll.eu>
>
> GCC prints a couple of format string warnings when compiling
> the vector tests. Let's follow the recommendation in
> Documentation/printk-formats.txt to fix these warnings.
>
> Signed-off-by: Christoph Müllner <christoph.muellner@...ll.eu>
> ---
>   tools/testing/selftests/riscv/vector/v_initval_nolibc.c | 2 +-
>   tools/testing/selftests/riscv/vector/vstate_prctl.c     | 4 ++--
>   2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/riscv/vector/v_initval_nolibc.c b/tools/testing/selftests/riscv/vector/v_initval_nolibc.c
> index 66764edb0d52..1dd94197da30 100644
> --- a/tools/testing/selftests/riscv/vector/v_initval_nolibc.c
> +++ b/tools/testing/selftests/riscv/vector/v_initval_nolibc.c
> @@ -27,7 +27,7 @@ int main(void)
>   
>   	datap = malloc(MAX_VSIZE);
>   	if (!datap) {
> -		ksft_test_result_fail("fail to allocate memory for size = %lu\n", MAX_VSIZE);
> +		ksft_test_result_fail("fail to allocate memory for size = %d\n", MAX_VSIZE);
>   		exit(-1);
>   	}
>   
> diff --git a/tools/testing/selftests/riscv/vector/vstate_prctl.c b/tools/testing/selftests/riscv/vector/vstate_prctl.c
> index b348b475be57..8ad94e08ff4d 100644
> --- a/tools/testing/selftests/riscv/vector/vstate_prctl.c
> +++ b/tools/testing/selftests/riscv/vector/vstate_prctl.c
> @@ -68,7 +68,7 @@ int test_and_compare_child(long provided, long expected, int inherit)
>   	}
>   	rc = launch_test(inherit);
>   	if (rc != expected) {
> -		ksft_test_result_fail("Test failed, check %d != %d\n", rc,
> +		ksft_test_result_fail("Test failed, check %d != %ld\n", rc,
>   				      expected);
>   		return -2;
>   	}
> @@ -87,7 +87,7 @@ int main(void)
>   	pair.key = RISCV_HWPROBE_KEY_IMA_EXT_0;
>   	rc = riscv_hwprobe(&pair, 1, 0, NULL, 0);
>   	if (rc < 0) {
> -		ksft_test_result_fail("hwprobe() failed with %d\n", rc);
> +		ksft_test_result_fail("hwprobe() failed with %ld\n", rc);
>   		return -1;
>   	}
>   


You can add:

Reviewed-by: Alexandre Ghiti <alexghiti@...osinc.com>

Thanks!

Alex


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ