[PW_SID:1064028] selftests: riscv: Fix compilation issues for v_ptrace and cfi#1582
[PW_SID:1064028] selftests: riscv: Fix compilation issues for v_ptrace and cfi#1582linux-riscv-bot wants to merge 4 commits into
Conversation
The BIT() macros is used by the validate_v_ptrace() test case, but not defined. Include linux/bits.h to pull in this definition. To ensure that the header in the kernel source is used, add tools/include to the header search path. Fixes: 30eb191 ("selftests: riscv: verify ptrace rejects invalid vector csr inputs") Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
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: 3789d5e ("selftests: riscv: verify syscalls discard vector context") Fixes: 30eb191 ("selftests: riscv: verify ptrace rejects invalid vector csr inputs") Fixes: 849f05a ("selftests: riscv: verify ptrace accepts valid vector csr values") Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
BIT() is being used in ptrace.h without a definition, resulting in compilation errors in tools/testing/selftests/riscv/cfi/cfitests.c: cfitests.c:101:60: error: implicit declaration of function ‘BIT’ [-Wimplicit-function-declaration] 101 | if ((cfi_reg.cfi_status.cfi_state & CFI_ENABLE_MASK) != CFI_ENABLE_MASK) Include linux/bits.h to resolve this issue. Fixes: 2af7c9c ("riscv/ptrace: expose riscv CFI status and state via ptrace and in core files") Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Reviewed-by: Deepak Gupta <debug@rivosinc.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The cfi selftest was missing a license so add it. Signed-off-by: Charlie Jenkins <thecharlesjenkins@gmail.com> Reviewed-by: Deepak Gupta <debug@rivosinc.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v2,1/4] selftests: riscv: Add definition of BIT() macro" |
|
Patch 1: "[v2,1/4] selftests: riscv: Add definition of BIT() macro" |
|
Patch 1: "[v2,1/4] selftests: riscv: Add definition of BIT() macro" |
|
Patch 1: "[v2,1/4] selftests: riscv: Add definition of BIT() macro" |
|
Patch 1: "[v2,1/4] selftests: riscv: Add definition of BIT() macro" |
|
Patch 1: "[v2,1/4] selftests: riscv: Add definition of BIT() macro" |
|
Patch 1: "[v2,1/4] selftests: riscv: Add definition of BIT() macro" |
|
Patch 1: "[v2,1/4] selftests: riscv: Add definition of BIT() macro" |
|
Patch 1: "[v2,1/4] selftests: riscv: Add definition of BIT() macro" |
|
Patch 1: "[v2,1/4] selftests: riscv: Add definition of BIT() macro" |
|
Patch 1: "[v2,1/4] selftests: riscv: Add definition of BIT() macro" |
|
Patch 1: "[v2,1/4] selftests: riscv: Add definition of BIT() macro" |
|
Patch 2: "[v2,2/4] selftests: riscv: Add braces around EXPECT_EQ()" |
|
Patch 2: "[v2,2/4] selftests: riscv: Add braces around EXPECT_EQ()" |
|
Patch 2: "[v2,2/4] selftests: riscv: Add braces around EXPECT_EQ()" |
|
Patch 2: "[v2,2/4] selftests: riscv: Add braces around EXPECT_EQ()" |
|
Patch 2: "[v2,2/4] selftests: riscv: Add braces around EXPECT_EQ()" |
|
Patch 2: "[v2,2/4] selftests: riscv: Add braces around EXPECT_EQ()" |
|
Patch 2: "[v2,2/4] selftests: riscv: Add braces around EXPECT_EQ()" |
|
Patch 2: "[v2,2/4] selftests: riscv: Add braces around EXPECT_EQ()" |
|
Patch 2: "[v2,2/4] selftests: riscv: Add braces around EXPECT_EQ()" |
|
Patch 2: "[v2,2/4] selftests: riscv: Add braces around EXPECT_EQ()" |
|
Patch 2: "[v2,2/4] selftests: riscv: Add braces around EXPECT_EQ()" |
|
Patch 2: "[v2,2/4] selftests: riscv: Add braces around EXPECT_EQ()" |
|
Patch 3: "[v2,3/4] riscv: ptrace: Fix BIT() compilation issues" |
|
Patch 3: "[v2,3/4] riscv: ptrace: Fix BIT() compilation issues" |
|
Patch 3: "[v2,3/4] riscv: ptrace: Fix BIT() compilation issues" |
|
Patch 3: "[v2,3/4] riscv: ptrace: Fix BIT() compilation issues" |
|
Patch 3: "[v2,3/4] riscv: ptrace: Fix BIT() compilation issues" |
|
Patch 3: "[v2,3/4] riscv: ptrace: Fix BIT() compilation issues" |
|
Patch 3: "[v2,3/4] riscv: ptrace: Fix BIT() compilation issues" |
|
Patch 3: "[v2,3/4] riscv: ptrace: Fix BIT() compilation issues" |
|
Patch 3: "[v2,3/4] riscv: ptrace: Fix BIT() compilation issues" |
|
Patch 3: "[v2,3/4] riscv: ptrace: Fix BIT() compilation issues" |
|
Patch 3: "[v2,3/4] riscv: ptrace: Fix BIT() compilation issues" |
|
Patch 3: "[v2,3/4] riscv: ptrace: Fix BIT() compilation issues" |
|
Patch 4: "[v2,4/4] selftests: riscv: Add license to cfi selftest" |
|
Patch 4: "[v2,4/4] selftests: riscv: Add license to cfi selftest" |
|
Patch 4: "[v2,4/4] selftests: riscv: Add license to cfi selftest" |
|
Patch 4: "[v2,4/4] selftests: riscv: Add license to cfi selftest" |
|
Patch 4: "[v2,4/4] selftests: riscv: Add license to cfi selftest" |
|
Patch 4: "[v2,4/4] selftests: riscv: Add license to cfi selftest" |
|
Patch 4: "[v2,4/4] selftests: riscv: Add license to cfi selftest" |
|
Patch 4: "[v2,4/4] selftests: riscv: Add license to cfi selftest" |
|
Patch 4: "[v2,4/4] selftests: riscv: Add license to cfi selftest" |
|
Patch 4: "[v2,4/4] selftests: riscv: Add license to cfi selftest" |
|
Patch 4: "[v2,4/4] selftests: riscv: Add license to cfi selftest" |
|
Patch 4: "[v2,4/4] selftests: riscv: Add license to cfi selftest" |
PR for series 1064028 applied to workflow__riscv__fixes
Name: selftests: riscv: Fix compilation issues for v_ptrace and cfi
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1064028
Version: 2