Skip to contentSkip to conversation

selftests/seccomp: powerpc: Fix typo in macro variable name

PATCH In review Kees Cook 2 participants 2 messages Nov 17, 2020 – Nov 19, 2020

Subsystems (2)
lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 selftests/seccomp: powerpc: Fix typo in macro variable name

A typo sneaked into the powerpc selftest. Fix the name so it builds again.

Fixes 46138329faea ("selftests/seccomp: powerpc: Fix seccomp return value testing")
---
 tools/testing/selftests/seccomp/seccomp_bpf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/seccomp/seccomp_bpf.c +2 -2
index 76c458055c54..26c72f2b61b1 100644
@@ -1758,10 +1758,10 @@ TEST_F(TRACE_poke, getpid_runs_normally)
 		 * and the code is stored as a positive value.	\
 		 */						\
 		if (_result < 0) {				\
-			SYSCALL_RET(_regs) = -result;		\
+			SYSCALL_RET(_regs) = -_result;		\
 			(_regs).ccr |= 0x10000000;		\
 		} else {					\
-			SYSCALL_RET(_regs) = result;		\
+			SYSCALL_RET(_regs) = _result;		\
 			(_regs).ccr &= ~0x10000000;		\
 		}						\
 	} while (0)
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Kees Cook

A typo sneaked into the powerpc selftest. Fix the name so it builds again.

Fixes 46138329faea ("selftests/seccomp: powerpc: Fix seccomp return value testing")
---
 tools/testing/selftests/seccomp/seccomp_bpf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

I hit that and thought I'd sent a patch for it, but seems I never actually sent it.

So thanks. I assume Shuah will take it.

cheers

Quoted 19 lines
tools/testing/selftests/seccomp/seccomp_bpf.c +2 -2
index 76c458055c54..26c72f2b61b1 100644
@@ -1758,10 +1758,10 @@ TEST_F(TRACE_poke, getpid_runs_normally)
 		 * and the code is stored as a positive value.	\
 		 */						\
 		if (_result < 0) {				\
-			SYSCALL_RET(_regs) = -result;		\
+			SYSCALL_RET(_regs) = -_result;		\
 			(_regs).ccr |= 0x10000000;		\
 		} else {					\
-			SYSCALL_RET(_regs) = result;		\
+			SYSCALL_RET(_regs) = _result;		\
 			(_regs).ccr &= ~0x10000000;		\
 		}						\
 	} while (0)
Signature · 1 line
2.25.1