selftests/bpf: fix compiling loop{1, 2, 3}.c on s390

Use PT_REGS_RC(ctx) instead of ctx->rax, which is not present on s390.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Stanislav Fomichev <sdf@google.com>
Tested-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
Ilya Leoshkevich
2019-07-11 16:29:30 +02:00
committed by Daniel Borkmann
parent 7cd04535ab
commit af3c24e0e2
3 changed files with 3 additions and 3 deletions

View File

@@ -16,7 +16,7 @@ int while_true(volatile struct pt_regs* ctx)
int i = 0;
while (true) {
if (ctx->rax & 1)
if (PT_REGS_RC(ctx) & 1)
i += 3;
else
i += 7;