mbox series

[SRU,Groovy,0/1] Fix bpf selftest build failure on Groovy

Message ID 20210304175051.949944-1-kleber.souza@canonical.com
Headers show
Series Fix bpf selftest build failure on Groovy | expand

Message

Kleber Sacilotto de Souza March 4, 2021, 5:50 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1917609

[Impact]
Upstream commit d3bec0138bfbe58606fc1d6f57a4cdc1a20218db (bpf: Zero-fill
re-used per-cpu map element) was applied to Groovy as part of an
upstream stable update. This patch fixes a bpf issue and at the same
time adds new selftests to verify these changes. However, the selftests
can't be compiled on 5.8 due to missing helper functions that were added
only later. The bpf selftest build fails with errors such as:

/usr/bin/ld:
/tmp/autopkgtest.IzBxE1/build.8NX/src/autotest/client/tmp/ubuntu_kernel_selftests/
src/linux/tools/testing/selftests/bpf/map_init.test.o:
in function `prog_run_insert_elem':
/tmp/autopkgtest.IzBxE1/build.8NX/src/autotest/client/tmp/ubuntu_kernel_selftests/
src/linux/tools/testing/selftests/bpf/prog_tests/map_init.c:89:
undefined reference to `ASSERT_OK'

[Fix]
The proposed fix it to partially revert this commit by removing the
selftests parts.

[Testcase]
On a groovy/linux repo:

$ make -C tools/testing/selftests TARGETS=bpf SKIP_TARGETS=

[Where problems could occur]
By removing the selftests we could be introducing a regression with the
bpf code change which would be likely unoticed during the tests.

Kleber Sacilotto de Souza (1):
  UBUNTU: SAUCE: partially revert "bpf: Zero-fill re-used per-cpu map
    element"

 .../selftests/bpf/prog_tests/map_init.c       | 214 ------------------
 .../selftests/bpf/progs/test_map_init.c       |  33 ---
 2 files changed, 247 deletions(-)
 delete mode 100644 tools/testing/selftests/bpf/prog_tests/map_init.c
 delete mode 100644 tools/testing/selftests/bpf/progs/test_map_init.c

Comments

Tim Gardner March 5, 2021, 12:43 p.m. UTC | #1
Acked-by: Tim Gardner <tim.gardner@canonical.com>

On 3/4/21 10:50 AM, Kleber Sacilotto de Souza wrote:
> BugLink: https://bugs.launchpad.net/bugs/1917609
> 
> [Impact]
> Upstream commit d3bec0138bfbe58606fc1d6f57a4cdc1a20218db (bpf: Zero-fill
> re-used per-cpu map element) was applied to Groovy as part of an
> upstream stable update. This patch fixes a bpf issue and at the same
> time adds new selftests to verify these changes. However, the selftests
> can't be compiled on 5.8 due to missing helper functions that were added
> only later. The bpf selftest build fails with errors such as:
> 
> /usr/bin/ld:
> /tmp/autopkgtest.IzBxE1/build.8NX/src/autotest/client/tmp/ubuntu_kernel_selftests/
> src/linux/tools/testing/selftests/bpf/map_init.test.o:
> in function `prog_run_insert_elem':
> /tmp/autopkgtest.IzBxE1/build.8NX/src/autotest/client/tmp/ubuntu_kernel_selftests/
> src/linux/tools/testing/selftests/bpf/prog_tests/map_init.c:89:
> undefined reference to `ASSERT_OK'
> 
> [Fix]
> The proposed fix it to partially revert this commit by removing the
> selftests parts.
> 
> [Testcase]
> On a groovy/linux repo:
> 
> $ make -C tools/testing/selftests TARGETS=bpf SKIP_TARGETS=
> 
> [Where problems could occur]
> By removing the selftests we could be introducing a regression with the
> bpf code change which would be likely unoticed during the tests.
> 
> Kleber Sacilotto de Souza (1):
>    UBUNTU: SAUCE: partially revert "bpf: Zero-fill re-used per-cpu map
>      element"
> 
>   .../selftests/bpf/prog_tests/map_init.c       | 214 ------------------
>   .../selftests/bpf/progs/test_map_init.c       |  33 ---
>   2 files changed, 247 deletions(-)
>   delete mode 100644 tools/testing/selftests/bpf/prog_tests/map_init.c
>   delete mode 100644 tools/testing/selftests/bpf/progs/test_map_init.c
>
Kelsey Skunberg March 6, 2021, 1:54 a.m. UTC | #2
Applied to Groovy master-next. thank you! 

-Kelsey

On 2021-03-04 18:50:50 , Kleber Sacilotto de Souza wrote:
> BugLink: https://bugs.launchpad.net/bugs/1917609
> 
> [Impact]
> Upstream commit d3bec0138bfbe58606fc1d6f57a4cdc1a20218db (bpf: Zero-fill
> re-used per-cpu map element) was applied to Groovy as part of an
> upstream stable update. This patch fixes a bpf issue and at the same
> time adds new selftests to verify these changes. However, the selftests
> can't be compiled on 5.8 due to missing helper functions that were added
> only later. The bpf selftest build fails with errors such as:
> 
> /usr/bin/ld:
> /tmp/autopkgtest.IzBxE1/build.8NX/src/autotest/client/tmp/ubuntu_kernel_selftests/
> src/linux/tools/testing/selftests/bpf/map_init.test.o:
> in function `prog_run_insert_elem':
> /tmp/autopkgtest.IzBxE1/build.8NX/src/autotest/client/tmp/ubuntu_kernel_selftests/
> src/linux/tools/testing/selftests/bpf/prog_tests/map_init.c:89:
> undefined reference to `ASSERT_OK'
> 
> [Fix]
> The proposed fix it to partially revert this commit by removing the
> selftests parts.
> 
> [Testcase]
> On a groovy/linux repo:
> 
> $ make -C tools/testing/selftests TARGETS=bpf SKIP_TARGETS=
> 
> [Where problems could occur]
> By removing the selftests we could be introducing a regression with the
> bpf code change which would be likely unoticed during the tests.
> 
> Kleber Sacilotto de Souza (1):
>   UBUNTU: SAUCE: partially revert "bpf: Zero-fill re-used per-cpu map
>     element"
> 
>  .../selftests/bpf/prog_tests/map_init.c       | 214 ------------------
>  .../selftests/bpf/progs/test_map_init.c       |  33 ---
>  2 files changed, 247 deletions(-)
>  delete mode 100644 tools/testing/selftests/bpf/prog_tests/map_init.c
>  delete mode 100644 tools/testing/selftests/bpf/progs/test_map_init.c
> 
> -- 
> 2.27.0
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team