Re: [PATCH] selftests: gpio: fix Makefile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28 March 2017 at 06:00, Michael Ellerman <mpe@xxxxxxxxxxxxxx> wrote:
> Fathi Boudra <fathi.boudra@xxxxxxxxxx> writes:
>> diff --git a/tools/testing/selftests/gpio/Makefile b/tools/testing/selftests/gpio/Makefile
>> index 205e4d10e085..714f1f7df04d 100644
>> --- a/tools/testing/selftests/gpio/Makefile
>> +++ b/tools/testing/selftests/gpio/Makefile
>> @@ -1,23 +1,24 @@
>> +CFLAGS += -O2 -g -std=gnu99 -Wall
>> +CFLAGS += -I../../../../include/uapi/ -I../../../../include/
>
> Those are kernel headers, they *might* work in userspace but they're not
> designed to.

except some tests are using uapi and some others are using the
generated headers inconsistently, so it looks like using uapi directly
is allowed. Do you suggest to fix the tests to only use the exported
headers consistently across selftests and add the dependency to
headers_install when necessary?

> Use the exported headers:
>
> CFLAGS += -I../../../../usr/include
>
>
> If they're not there, then the user can install them, or fall back to
> the system headers.
>
>> +CFLAGS += $(shell pkg-config --cflags mount)
>> +LDLIBS += $(shell pkg-config --libs mount)
>
> What if pkg-config isn't installed?

it gives an error (command not found) and gpio test will fail to build
because it won't be able to find the headers or link to libmount
library.

> cheers
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux