On Mon, Sep 09, 2019 at 12:42:06PM +0000, Amit Kachhap wrote:
Hi,
On 9/5/19 11:27 PM, Cristian Marussi wrote:
Hi Amit
On 03/09/2019 10:26, Amit Kachhap wrote:
Hi Cristian,
On 9/2/19 4:59 PM, Cristian Marussi wrote:
Add a new arm64-specific empty subsystem amongst TARGETS of KSFT build framework; keep these new arm64 KSFT testcases separated into distinct subdirs inside tools/testing/selftests/arm64/ depending on the specific subsystem targeted.
Add into toplevel arm64 KSFT Makefile a mechanism to guess the effective location of Kernel headers as installed by KSFT framework.
Merge with
commit 9ce1263033cd ("selftests, arm64: add a selftest for passing tagged pointers to kernel")
while moving such KSFT tags tests inside their own subdirectory (arm64/tags).
Signed-off-by: Cristian Marussi cristian.marussi@arm.com
v4 --> v5
- rebased on arm64/for-next/core
- merged this patch with KSFT arm64 tags patch, while moving the latter into its own subdir
- moved kernel header includes search mechanism from KSFT arm64 SIGNAL Makefile
This approach breaks the compilation of individual test cases which need to export includes individually.
make -C tools/testing/selftests/arm64/signal
../../lib.mk:25: ../../../../scripts/subarch.include: No such file or directory Makefile:25: warning: overriding recipe for target 'clean' ../../lib.mk:123: warning: ignoring old recipe for target 'clean' make: *** No rule to make target '../../../../scripts/subarch.include'. Stop.
However tags test works well, make -C tools/testing/selftests/arm64/tags
aarch64-none-linux-gnu-gcc tags_test.c -o /home/amikac01/work/MTE_WORK/linux-server/linux/tools/testing/selftests/arm64/tags/tags_test
Thanks, Amit Daniel
So at the end I think I'll opt for the following in V6 regarding the issue of being able to build specific KSFT arm64 subsystems while properly searching kernel headers (and keeping compatible with the KSFT framework completely):
only arm64 toplevel KSFT Makefile searches for the kernel headers location for all and propagates down the info
you can also now optionally specify which arm64 subsystem to build (to avoid have to build, say, all of signal/ if you are not interested into....a sort of standalone mode without all the burden of the old standalone mode)
ok.
So you can issue:
$ make TARGETS=arm64 kselftest
or similarly:
$ make -C tools/testing/selftests TARGETS=arm64 \ INSTALL_PATH=<your-installation-path> install
or select subsystems:
$ make -C tools/testing/selftests TARGETS=arm64 SUBTARGETS="tags signal" \ INSTALL_PATH=<your-installation-path> install
This option will be useful as it is better to compile just one subtarget in development phase.
Agreed, this seems a reasonable approach.
[...]
Cheers ---Dave