[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87sgnttpoq.fsf@mpe.ellerman.id.au>
Date: Wed, 16 Oct 2019 13:00:21 +1100
From: Michael Ellerman <mpe@...erman.id.au>
To: Shuah Khan <skhan@...uxfoundation.org>,
yamada.masahiro@...ionext.com, michal.lkml@...kovi.net,
shuah@...nel.org
Cc: Shuah Khan <skhan@...uxfoundation.org>,
linux-kbuild@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] selftests: Add kselftest-all and kselftest-install targets
Hi Shuah,
I know this has been merged already, so this is just FYI and in case it
helps anyone else who's tracking down build failures.
Sorry I didn't reply before you merged it, I was on leave.
Shuah Khan <skhan@...uxfoundation.org> writes:
> Add kselftest-all target to build tests from the top level
> Makefile. This is to simplify kselftest use-cases for CI and
> distributions where build and test systems are different.
>
> Current kselftest target builds and runs tests on a development
> system which is a developer use-case.
>
> Add kselftest-install target to install tests from the top level
> Makefile. This is to simplify kselftest use-cases for CI and
> distributions where build and test systems are different.
>
> This change addresses requests from developers and testers to add
> support for installing kselftest from the main Makefile.
>
> In addition, make the install directory the same when install is
> run using "make kselftest-install" or by running kselftest_install.sh.
> Also fix the INSTALL_PATH variable conflict between main Makefile and
> selftests Makefile.
...
> diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
> index c3feccb99ff5..bad18145ed1a 100644
> --- a/tools/testing/selftests/Makefile
> +++ b/tools/testing/selftests/Makefile
> @@ -171,9 +171,12 @@ run_pstore_crash:
> # 1. output_dir=kernel_src
> # 2. a separate output directory is specified using O= KBUILD_OUTPUT
> # 3. a separate output directory is specified using KBUILD_OUTPUT
> +# Avoid conflict with INSTALL_PATH set by the main Makefile
> #
> -INSTALL_PATH ?= $(BUILD)/install
> -INSTALL_PATH := $(abspath $(INSTALL_PATH))
> +KSFT_INSTALL_PATH ?= $(BUILD)/kselftest_install
This change broke all my CI, because the tests no longer install in the
place it's expecting them :/
I can fix it by explicitly specifying the install path in my CI scripts.
> +KSFT_INSTALL_PATH := $(abspath $(KSFT_INSTALL_PATH))
> +# Avoid changing the rest of the logic here and lib.mk.
> +INSTALL_PATH := $(KSFT_INSTALL_PATH)
But because the over-rideable variable changed from INSTALL_PATH to
KSFT_INSTALL_PATH I will need to export both of them in order for my CI
to work with old and new kernels.
So to emulate the old behaviour for old & new kernels you need to do:
# export KSFT_INSTALL_PATH=install
# export INSTALL_PATH=install
# make -C tools/testing/selftests install
cheers
Powered by blists - more mailing lists