From: Ilya Leoshkevich <iii@linux.ibm.com>
To: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>
Cc: bpf@vger.kernel.org, Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Ilya Leoshkevich <iii@linux.ibm.com>
Subject: [PATCH bpf-next 3/3] selftests/bpf: Fix endianness issue in sk_assign
Date: Thu, 10 Sep 2020 01:24:43 +0200 [thread overview]
Message-ID: <20200909232443.3099637-4-iii@linux.ibm.com> (raw)
In-Reply-To: <20200909232443.3099637-1-iii@linux.ibm.com>
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 long instead of int.
Fixes: 2d7824ffd25c ("selftests: bpf: Add test for sk_assign")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
tools/testing/selftests/bpf/prog_tests/sk_assign.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/sk_assign.c b/tools/testing/selftests/bpf/prog_tests/sk_assign.c
index a49a26f95a8b..402d0da8e05a 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;
+ long server = -1;
int server_map;
int self_net;
int i;
--
2.25.4
next prev parent reply other threads:[~2020-09-10 1:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 23:24 [PATCH bpf-next 0/3] Fix three endianness issues in test_progs Ilya Leoshkevich
2020-09-09 23:24 ` [PATCH bpf-next 1/3] selftests/bpf: Fix endianness issue in test_sockopt_sk Ilya Leoshkevich
2020-09-10 16:49 ` Andrii Nakryiko
2020-09-09 23:24 ` [PATCH bpf-next 2/3] selftests/bpf: Fix endianness issues in sk_lookup/ctx_narrow_access Ilya Leoshkevich
2020-09-10 16:55 ` Andrii Nakryiko
2020-09-23 21:12 ` Ilya Leoshkevich
2020-09-24 7:49 ` Jakub Sitnicki
2020-09-24 9:24 ` Jakub Sitnicki
2020-09-09 23:24 ` Ilya Leoshkevich [this message]
2020-09-10 16:56 ` [PATCH bpf-next 3/3] selftests/bpf: Fix endianness issue in sk_assign Andrii Nakryiko
2020-09-10 16:58 ` [PATCH bpf-next 0/3] Fix three endianness issues in test_progs Andrii Nakryiko
2020-09-10 21:55 ` Ilya Leoshkevich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200909232443.3099637-4-iii@linux.ibm.com \
--to=iii@linux.ibm.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.