]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
selftests: riscv: Add braces around EXPECT_EQ()
authorCharlie Jenkins <thecharlesjenkins@gmail.com>
Tue, 10 Mar 2026 01:52:11 +0000 (18:52 -0700)
committerPaul Walmsley <pjw@kernel.org>
Sun, 5 Apr 2026 00:37:57 +0000 (18:37 -0600)
commit511361fe7a8856e2f415010942808c237a1b8061
tree54b05b9834121f82f9bdb8a5741c195407f23c8a
parent87ad7cc9aa7f0a202189640c5015aa985e7e8f3b
selftests: riscv: Add braces around EXPECT_EQ()

EXPECT_EQ() expands to multiple lines, breaking up one-line if
statements. This issue was not present in the patch on the mailing list
but was instead introduced by the maintainer when attempting to fix up
checkpatch warnings. Add braces around EXPECT_EQ() to avoid the error
even though checkpatch suggests them to be removed:

validate_v_ptrace.c:626:17: error: ‘else’ without a previous ‘if’

Fixes: 3789d5eecd5a ("selftests: riscv: verify syscalls discard vector context")
Fixes: 30eb191c895b ("selftests: riscv: verify ptrace rejects invalid vector csr inputs")
Fixes: 849f05ae1ea6 ("selftests: riscv: verify ptrace accepts valid vector csr values")
Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com>
Reviewed-and-tested-by: Sergey Matyukevich <geomatsi@gmail.com>
Link: https://patch.msgid.link/20260309-fix_selftests-v2-2-9d5a553a531e@gmail.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
tools/testing/selftests/riscv/vector/validate_v_ptrace.c