mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-15 23:41:35 -04:00
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:3789d5eecd("selftests: riscv: verify syscalls discard vector context") Fixes:30eb191c89("selftests: riscv: verify ptrace rejects invalid vector csr inputs") Fixes:849f05ae1e("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>
This commit is contained in:
committed by
Paul Walmsley
parent
87ad7cc9aa
commit
511361fe7a
@@ -290,10 +290,11 @@ TEST(ptrace_v_syscall_clobbering)
|
||||
|
||||
/* verify initial vsetvli settings */
|
||||
|
||||
if (is_xtheadvector_supported())
|
||||
if (is_xtheadvector_supported()) {
|
||||
EXPECT_EQ(5UL, regset_data->vtype);
|
||||
else
|
||||
} else {
|
||||
EXPECT_EQ(9UL, regset_data->vtype);
|
||||
}
|
||||
|
||||
EXPECT_EQ(regset_data->vlenb, regset_data->vl);
|
||||
EXPECT_EQ(vlenb, regset_data->vlenb);
|
||||
@@ -619,10 +620,11 @@ TEST_F(v_csr_invalid, ptrace_v_invalid_values)
|
||||
|
||||
/* verify initial vsetvli settings */
|
||||
|
||||
if (is_xtheadvector_supported())
|
||||
if (is_xtheadvector_supported()) {
|
||||
EXPECT_EQ(5UL, regset_data->vtype);
|
||||
else
|
||||
} else {
|
||||
EXPECT_EQ(9UL, regset_data->vtype);
|
||||
}
|
||||
|
||||
EXPECT_EQ(regset_data->vlenb, regset_data->vl);
|
||||
EXPECT_EQ(vlenb, regset_data->vlenb);
|
||||
@@ -827,10 +829,11 @@ TEST_F(v_csr_valid, ptrace_v_valid_values)
|
||||
|
||||
/* verify initial vsetvli settings */
|
||||
|
||||
if (is_xtheadvector_supported())
|
||||
if (is_xtheadvector_supported()) {
|
||||
EXPECT_EQ(5UL, regset_data->vtype);
|
||||
else
|
||||
} else {
|
||||
EXPECT_EQ(9UL, regset_data->vtype);
|
||||
}
|
||||
|
||||
EXPECT_EQ(regset_data->vlenb, regset_data->vl);
|
||||
EXPECT_EQ(vlenb, regset_data->vlenb);
|
||||
|
||||
Reference in New Issue
Block a user