summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2020-09-15 14:38:15 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-29 12:07:40 +0300
commitf130c8a0eeac9c62586c5aeecef2a8b8bc2bee4a (patch)
treed7055eea3c423534568776f49c17318e0bcb2841 /tools/testing
parenta1aff5c4417e522dba28c87220f056b30af29694 (diff)
downloadlinux-f130c8a0eeac9c62586c5aeecef2a8b8bc2bee4a.tar.xz
selftests/bpf: Fix endianness issue in sk_assign
[ Upstream commit b6ed6cf4a3acdeab9aed8e0a524850761ec9b152 ] server_map's value size is 8, but the test tries to put an int there. This sort of works on x86 (unless followed by non-0), but hard fails on s390. Fix by using __s64 instead of int. Fixes: 2d7824ffd25c ("selftests: bpf: Add test for sk_assign") Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/20200915113815.3768217-1-iii@linux.ibm.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/sk_assign.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/sk_assign.c b/tools/testing/selftests/bpf/prog_tests/sk_assign.c
index 47fa04adc147..21c2d265c3e8 100644
--- a/tools/testing/selftests/bpf/prog_tests/sk_assign.c
+++ b/tools/testing/selftests/bpf/prog_tests/sk_assign.c
@@ -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;