mbox series

[bpf-next,0/3] Fix three endianness issues in test_progs

Message ID 20200909232443.3099637-1-iii@linux.ibm.com
Headers show
Series Fix three endianness issues in test_progs | expand

Message

Ilya Leoshkevich Sept. 9, 2020, 11:24 p.m. UTC
This series fixes three test_progs failures on s390, all of which occur
because of endianness issues.

Ilya Leoshkevich (3):
  selftests/bpf: Fix endianness issue in test_sockopt_sk
  selftests/bpf: Fix endianness issues in sk_lookup/ctx_narrow_access
  selftests/bpf: Fix endianness issue in sk_assign

 .../selftests/bpf/prog_tests/sk_assign.c      |   2 +-
 .../selftests/bpf/prog_tests/sockopt_sk.c     |   2 +-
 .../selftests/bpf/progs/test_sk_lookup.c      | 264 ++++++++++--------
 3 files changed, 151 insertions(+), 117 deletions(-)

Comments

Andrii Nakryiko Sept. 10, 2020, 4:58 p.m. UTC | #1
On Wed, Sep 9, 2020 at 6:59 PM Ilya Leoshkevich <iii@linux.ibm.com> wrote:
>
> This series fixes three test_progs failures on s390, all of which occur
> because of endianness issues.
>
> Ilya Leoshkevich (3):
>   selftests/bpf: Fix endianness issue in test_sockopt_sk
>   selftests/bpf: Fix endianness issues in sk_lookup/ctx_narrow_access
>   selftests/bpf: Fix endianness issue in sk_assign
>
>  .../selftests/bpf/prog_tests/sk_assign.c      |   2 +-
>  .../selftests/bpf/prog_tests/sockopt_sk.c     |   2 +-
>  .../selftests/bpf/progs/test_sk_lookup.c      | 264 ++++++++++--------
>  3 files changed, 151 insertions(+), 117 deletions(-)
>
> --
> 2.25.4
>

Ilya,

libbpf Travis CI setup does only a build of libbpf for s390x right
now. But we additionally have a test that builds the latest kernel and
selftests and runs them in qemu. All this is implemented for x86-64
right now. But if you'd like to spend some time to set this up for
s390x as well, please let me know. You'll be able to detect issues
like this much earlier.
Ilya Leoshkevich Sept. 10, 2020, 9:55 p.m. UTC | #2
On Thu, 2020-09-10 at 09:58 -0700, Andrii Nakryiko wrote:
> On Wed, Sep 9, 2020 at 6:59 PM Ilya Leoshkevich <iii@linux.ibm.com>
> wrote:
> > This series fixes three test_progs failures on s390, all of which
> > occur
> > because of endianness issues.
> > 
> > Ilya Leoshkevich (3):
> >   selftests/bpf: Fix endianness issue in test_sockopt_sk
> >   selftests/bpf: Fix endianness issues in
> > sk_lookup/ctx_narrow_access
> >   selftests/bpf: Fix endianness issue in sk_assign
> > 
> >  .../selftests/bpf/prog_tests/sk_assign.c      |   2 +-
> >  .../selftests/bpf/prog_tests/sockopt_sk.c     |   2 +-
> >  .../selftests/bpf/progs/test_sk_lookup.c      | 264 ++++++++++--
> > ------
> >  3 files changed, 151 insertions(+), 117 deletions(-)
> > 
> > --
> > 2.25.4
> > 
> 
> Ilya,
> 
> libbpf Travis CI setup does only a build of libbpf for s390x right
> now. But we additionally have a test that builds the latest kernel
> and
> selftests and runs them in qemu. All this is implemented for x86-64
> right now. But if you'd like to spend some time to set this up for
> s390x as well, please let me know. You'll be able to detect issues
> like this much earlier.

That sounds interesting. I will try to adjust your scripts to create a
s390x rootfs, cross-compile s390x kernel and selftests, and run them
on my laptop; when this works, I will send a PR.