Unable to build net/reuseport_bpf and other tests in ubuntu_kernel_selftests on Bionic with make command

Bug #1949889 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Undecided
Po-Hsu Lin
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Po-Hsu Lin

Bug Description

[Impact]
With 4.15 kernel, not all binary files inside a subtest directory in
tools/testing/selftests of a kernel tree can be built with command:

    make TARGETS=$subtest

For example, the following binaries in net directory won't be built:
 * reuseport_bpf
 * reuseport_bpf_cpu
 * reuseport_dualstack
 * reuseaddr_conflict
 * reuseport_bpf_numa

They can only be build with:

    make TARGETS=net run_tests

However, this will also start all of the tests in this subset and it's
is not ideal for the granularity improvement, in which we will want to
run tests one-by-one.

[Fix]
1. 14f1889f selftests: Fix loss of test output in run_kselftests.sh
2. 44f01352 selftests: Makefile set KSFT_TAP_LEVEL to prevent nested TAP headers
3. 8ce72dc3 selftests: fix headers_install circular dependency
4. 27d79a2b selftests: fix bpf build/test workflow regression when KBUILD_OUTPUT is set
5. e2e88325 selftests: vm: Fix test build failure when built by itself

The 1st and 5th patch can be cherry-picked. The 2nd needs to be
backported with some context adjustment (can be applied with git -cp
but not git am -C2). The 3rd and 4th patch would need to be applied
with -C2.

The third patch (8ce72dc3) is the fix for this issue. To get it
applied more easily we will need the first two.

The 4th (27d79a2b) and the 5th (e2e88325) patches are included here as
they have been marked as a fix for 8ce72dc3. Since we don't use
KBUILD_OUTPUT and the vm test, I think the risk of adding these two is
pretty low.

[Test]
Tested on a baremetal node "glameow" with 4.15.0-159-generic, the test
cases number and results are identical before and after applying this
change (compared side-by-side).

Please find attachment in the bug report for the test result.

[Where problems could occur]
As this is just tested with generic Bionic 4.15 kernel on a bare-metal
system, it's is possible to see other issues on different variants. If
this change is incorrect it will cause issue to our automated-testing
and regression-testing, but it won't affect the real kernel
functionality.

Po-Hsu Lin (cypressyew)
summary: - Unable to build reuseport_bpf test in ubuntu_kernel_selftests on Bionic
- with make command
+ Unable to build net/reuseport_bpf and other tests in
+ ubuntu_kernel_selftests on Bionic with make command
Changed in linux (Ubuntu):
status: New → Fix Released
Po-Hsu Lin (cypressyew)
description: updated
Po-Hsu Lin (cypressyew)
description: updated
Po-Hsu Lin (cypressyew)
description: updated
Po-Hsu Lin (cypressyew)
description: updated
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Test report before applying this patchset. Note that empty lines (or empty lines with "-") has been added to make it easier to run vimdiff.

tags: added: 4.15 bionic
tags: added: ubuntu-kernel-selftests
description: updated
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Test report after applying this patchset. Note that empty lines (or empty lines with "-") has been added to make it easier to run vimdiff.

Po-Hsu Lin (cypressyew)
description: updated
Po-Hsu Lin (cypressyew)
description: updated
Changed in ubuntu-kernel-tests:
assignee: nobody → Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu Bionic):
assignee: nobody → Po-Hsu Lin (cypressyew)
status: New → In Progress
Changed in ubuntu-kernel-tests:
status: New → In Progress
Changed in linux (Ubuntu Bionic):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux/4.15.0-163.171 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-bionic' to 'verification-done-bionic'. If the problem still exists, change the tag 'verification-needed-bionic' to 'verification-failed-bionic'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-bionic
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

I can see tests being build and executed:
  * ubuntu_kernel_selftests.net:reuseport_bpf
  * ubuntu_kernel_selftests.net:reuseport_bpf_cpu
  * ubuntu_kernel_selftests.net:reuseport_dualstack
  * ubuntu_kernel_selftests.net:reuseaddr_conflict
  * buntu_kernel_selftests.net:reuseport_bpf_numa

With Bionic 4.15.0-163.171

tags: added: verification-done-bionic
removed: verification-needed-bionic
Changed in ubuntu-kernel-tests:
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (7.3 KiB)

This bug was fixed in the package linux - 4.15.0-163.171

---------------
linux (4.15.0-163.171) bionic; urgency=medium

  * bionic/linux: 4.15.0-163.171 -proposed tracker (LP: #1949874)

  * Packaging resync (LP: #1786013)
    - [Packaging] update Ubuntu.md
    - debian/dkms-versions -- update from kernel-versions (main/2021.11.08)

  * Unable to build net/reuseport_bpf and other tests in ubuntu_kernel_selftests
    on Bionic with make command (LP: #1949889)
    - selftests: Fix loss of test output in run_kselftests.sh
    - selftests: Makefile set KSFT_TAP_LEVEL to prevent nested TAP headers
    - selftests: fix headers_install circular dependency
    - selftests: fix bpf build/test workflow regression when KBUILD_OUTPUT is set
    - selftests: vm: Fix test build failure when built by itself

  * KVM emulation failure when booting into VM crash kernel with multiple CPUs
    (LP: #1948862)
    - KVM: x86: Properly reset MMU context at vCPU RESET/INIT

  * aufs: kernel bug with apparmor and fuseblk (LP: #1948470)
    - SAUCE: aufs: bugfix, stop omitting path->mnt

  * ebpf: bpf_redirect fails with ip6 gre interfaces (LP: #1947164)
    - net: handle ARPHRD_IP6GRE in dev_is_mac_header_xmit()

  * require CAP_NET_ADMIN to attach N_HCI ldisc (LP: #1949516)
    - Bluetooth: hci_ldisc: require CAP_NET_ADMIN to attach N_HCI ldisc

  * ACL updates on OCFS2 are not revalidated (LP: #1947161)
    - ocfs2: fix remounting needed after setfacl command

  * ppc64 BPF JIT mod by 1 will not return 0 (LP: #1948351)
    - powerpc/bpf: Fix BPF_MOD when imm == 1

  * Drop "UBUNTU: SAUCE: cachefiles: Page leaking in
    cachefiles_read_backing_file while vmscan is active" (LP: #1947709)
    - Revert "UBUNTU: SAUCE: cachefiles: Page leaking in
      cachefiles_read_backing_file while vmscan is active"
    - cachefiles: Fix page leak in cachefiles_read_backing_file while vmscan is
      active

  * Some test in ubuntu_bpf test_verifier failed on i386 Bionic kernel
    (LP: #1788578)
    - bpf: fix context access in tracing progs on 32 bit archs

  * test_bpf.sh from ubuntu_kernel_selftests.net from linux ADT test failure
    with linux/4.15.0-149.153 i386 (Segmentation fault) (LP: #1934414)
    - selftests/bpf: make test_verifier run most programs
    - bpf: add couple of test cases for div/mod by zero
    - bpf: add further test cases around div/mod and others

  * Bionic update: upstream stable patchset 2021-11-02 (LP: #1949512)
    - usb: gadget: r8a66597: fix a loop in set_feature()
    - usb: musb: tusb6010: uninitialized data in tusb_fifo_write_unaligned()
    - cifs: fix incorrect check for null pointer in header_assemble
    - xen/x86: fix PV trap handling on secondary processors
    - usb-storage: Add quirk for ScanLogic SL11R-IDE older than 2.6c
    - USB: serial: cp210x: add ID for GW Instek GDM-834x Digital Multimeter
    - staging: greybus: uart: fix tty use after free
    - Re-enable UAS for LaCie Rugged USB3-FW with fk quirk
    - USB: serial: mos7840: remove duplicated 0xac24 device ID
    - USB: serial: option: add Telit LN920 compositions
    - USB: serial: option: remove duplicate USB device ID
    - USB: serial: option: add device id for Foxco...

Read more...

Changed in linux (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.