Re: [PATCH 1/7] selftest: sync: basic tests for sw_sync framework

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

 



Hi,

El 27/09/16 a las 01:23, Michael Ellerman escribió:
Emilio López <emilio.lopez@xxxxxxxxxxxxxxx> writes:
El 22/09/16 a las 06:43, Michael Ellerman escribió:
Emilio López <emilio.lopez@xxxxxxxxxxxxxxx> writes:

Please don't include the *kernel* headers, they're really not meant to
be used in userspace programs :)

+CFLAGS += -I../../../../usr/include/

That is the correct place to get them from. They'll have been put there
by 'make headers_install'.

My inspiration here has been tools/testing/selftests/memfd/Makefile,
which does it this way. If I only include the ones on usr then it
doesn't build, as there's no sync_file.h available, even after running
make headers_install. How am I supposed to use the ioctls from there?

It looks like it's missing from include/uapi/linux/Kbuild, you need to
add it to the list of exported headers:

I tried that over the weekend and it worked, but I wondered if it was the way to go. Thanks for the confirmation :) I've sent a patch for that[0] now.

With that resolved, CFLAGS can just be

CFLAGS += -O2 -g -std=gnu89 -pthread -Wall -Wextra
CFLAGS += -I../../../../usr/include/

I'll wait a bit more to see if anyone else has any comments, otherwise I'll send a v2 in a couple of days.

Thanks!
Emilio

[0] https://lkml.org/lkml/2016/9/27/289
--
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