Re: [GIT PULL] Kselftest update for Linux 5.2-rc1

From: Shuah Khan
Date: Fri May 10 2019 - 22:54:28 EST


On 5/9/19 8:17 PM, Alexei Starovoitov wrote:
On Thu, May 09, 2019 at 07:42:09PM -0600, Shuah Khan wrote:
On 5/9/19 4:40 PM, Shuah Khan wrote:
On 5/9/19 4:20 PM, Alexei Starovoitov wrote:
On Mon, May 06, 2019 at 10:56:56AM -0600, Shuah Khan wrote:
Hi Linus,

Please pull the following Kselftest update for Linux 5.2-rc1

This Kselftest update for Linux 5.2-rc1 consists of

- fixes to seccomp test, and kselftest framework
- cleanups to remove duplicate header defines
- fixes to efivarfs "make clean" target
- cgroup cleanup path
- Moving the IMA kexec_load selftest to selftests/kexec work from
ÂÂ Mimi Johar and Petr Vorel
- A framework to kselftest for writing kernel test modules addition
ÂÂ from Tobin C. Harding

diff is attached.

thanks,
-- Shuah


----------------------------------------------------------------
The following changes since commit
15ade5d2e7775667cf191cf2f94327a4889f8b9d:

ÂÂ Linux 5.1-rc4 (2019-04-07 14:09:59 -1000)

are available in the Git repository at:

ÂÂ git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
tags/linux-kselftest-5.2-rc1

for you to fetch changes up to d917fb876f6eaeeea8a2b620d2a266ce26372f4d:

ÂÂ selftests: build and run gpio when output directory is the src dir
(2019-04-22 17:02:26 -0600)

----------------------------------------------------------------
linux-kselftest-5.2-rc1

This Kselftest update for Linux 5.2-rc1 consists of

- fixes to seccomp test, and kselftest framework
- cleanups to remove duplicate header defines
- fixes to efivarfs "make clean" target
- cgroup cleanup path
- Moving the IMA kexec_load selftest to selftests/kexec work from
ÂÂ Mimi Johar and Petr Vorel
- A framework to kselftest for writing kernel test modules addition
ÂÂ from Tobin C. Harding

----------------------------------------------------------------
Kees Cook (3):
ÂÂÂÂÂÂ selftests/seccomp: Handle namespace failures gracefully
ÂÂÂÂÂÂ selftests/harness: Add 30 second timeout per test
ÂÂÂÂÂÂ selftests/ipc: Fix msgque compiler warnings

Mathieu Desnoyers (1):
ÂÂÂÂÂÂ rseq/selftests: Adapt number of threads to the number of
detected cpus

Mimi Zohar (9):
ÂÂÂÂÂÂ selftests/kexec: move the IMA kexec_load selftest to
selftests/kexec
ÂÂÂÂÂÂ selftests/kexec: cleanup the kexec selftest
ÂÂÂÂÂÂ selftests/kexec: define a set of common functions
ÂÂÂÂÂÂ selftests/kexec: define common logging functions
ÂÂÂÂÂÂ selftests/kexec: define "require_root_privileges"
ÂÂÂÂÂÂ selftests/kexec: kexec_file_load syscall test
ÂÂÂÂÂÂ selftests/kexec: check kexec_load and kexec_file_load are enabled
ÂÂÂÂÂÂ selftests/kexec: make kexec_load test independent of IMA
being enabled
ÂÂÂÂÂÂ selftests/kexec: update get_secureboot_mode

Petr Vorel (1):
ÂÂÂÂÂÂ selftests/kexec: Add missing '=y' to config options

Po-Hsu Lin (1):
ÂÂÂÂÂÂ selftests/efivarfs: clean up test files from test_create*()

Roman Gushchin (1):
ÂÂÂÂÂÂ selftests: cgroup: fix cleanup path in
test_memcg_subtree_control()

Sabyasachi Gupta (4):
ÂÂÂÂÂÂ selftest/x86/mpx-dig.c: Remove duplicate header
ÂÂÂÂÂÂ selftest/timers: Remove duplicate header
ÂÂÂÂÂÂ selftest/rseq: Remove duplicate header
ÂÂÂÂÂÂ selftest/gpio: Remove duplicate header

Shuah Khan (2):
ÂÂÂÂÂÂ selftests: fix headers_install circular dependency

Shuah,

the commit 8ce72dc32578 ("selftests: fix headers_install circular
dependency")
broke our build/test workflow, since it added:
ÂÂ ifneq ($(KBUILD_OUTPUT),)
ÂÂÂÂÂÂÂÂÂÂ OUTPUT := $(KBUILD_OUTPUT)
ÂÂ else

which means that all of selftests/bpf artifacts are now going into
main build directory cluttering it with all sorts of .o, generated files
and executables.
The end result is humans and scripts can no longer find tests.

bpf build fails with the above commit. However, even without it, I am
seeing bpf objects going to tools/testing/selftests/bpf

I reverted the commit and ran your use-case:

export KBUILD_OUTPUT=/tmp/kselftest_bpf
cd tools/testing/selftests/bpf/
make
./test_verifier

I see bpf objects in tools/testing/selftests/bpf/ and I can run the
test.

What am I missing? The only way ./test_verifier would work is if
test_verifier is in tools/testing/selftests/bpf/

That's the point. All artifacts should be in tools/testing/selftests/bpf/
if 'make' was done there regardless of KBUILD_OUTPUT.


Alexei,

Thanks for reporting the problem. Fix is on the way. Please test and let
me know if it works for you. I verified bpf build/test workflow with
and without KBUILD_OUTPUT set.

thanks,
-- Shuah