]> git.baikalelectronics.ru Git - kernel.git/commitdiff
selftests: gpio: fix include path to kernel headers for out of tree builds
authorKent Gibson <warthog618@gmail.com>
Tue, 19 Jul 2022 11:06:01 +0000 (19:06 +0800)
committerBartosz Golaszewski <brgl@bgdev.pl>
Wed, 20 Jul 2022 12:35:18 +0000 (14:35 +0200)
When building selftests out of the kernel tree the gpio.h the include
path is incorrect and the build falls back to the system includes
which may be outdated.

Add the KHDR_INCLUDES to the CFLAGS to include the gpio.h from the
build tree.

Fixes: 1fb08349f95c ("selftests: gpio: restore CFLAGS options")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
tools/testing/selftests/gpio/Makefile

index 71b3066023685fc3df4f17d727de85f821c4ba3a..616ed40196554eda9fa746b4d536ab220a0f6c52 100644 (file)
@@ -3,6 +3,6 @@
 TEST_PROGS := gpio-mockup.sh gpio-sim.sh
 TEST_FILES := gpio-mockup-sysfs.sh
 TEST_GEN_PROGS_EXTENDED := gpio-mockup-cdev gpio-chip-info gpio-line-name
-CFLAGS += -O2 -g -Wall -I../../../../usr/include/
+CFLAGS += -O2 -g -Wall -I../../../../usr/include/ $(KHDR_INCLUDES)
 
 include ../lib.mk