Skip to content

Commit

Permalink
server_map's value size is 8, but the test tries to put an int there.
Browse files Browse the repository at this point in the history
This sort of works on x86 (unless followed by non-0), but hard fails on
s390.

Fix by using __s64 instead of int.

Fixes: 2d7824f ("selftests: bpf: Add test for sk_assign")
Signed-off-by: Ilya Leoshkevich <[email protected]>
---

v1->v2: Use __s64.

tools/testing/selftests/bpf/prog_tests/sk_assign.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  • Loading branch information
iii-i authored and kernel-patches-bot committed Sep 17, 2020
1 parent 5a11654 commit efa1715
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/bpf/prog_tests/sk_assign.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ void test_sk_assign(void)
TEST("ipv6 udp port redir", AF_INET6, SOCK_DGRAM, false),
TEST("ipv6 udp addr redir", AF_INET6, SOCK_DGRAM, true),
};
int server = -1;
__s64 server = -1;
int server_map;
int self_net;
int i;
Expand Down

0 comments on commit efa1715

Please sign in to comment.