[lkml]   [2012]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch 2/4] syscalls, x86: Add __NR_kcmp syscall v8
What?  <linux/unistd.h> should be used, and it should handle the.inclusions.

Cyrill Gorcunov <> wrote:

>On Tue, Feb 14, 2012 at 03:13:12PM -0800, Andrew Morton wrote:
>> hm, what does all this stuff in the selftest makefile do?
>> The selftests code has undergone some changes since you last looked.
>Hmm, thanks for pointing.
>> The rules are, roughly:
>> - In tools/testing/selftests, a "make" will compile but not run all
>> selftest code.
>> - In tools/testing/selftests, a "make run_tests" will compile all
>> selftest code (if needed) and will then run all the tests.
>> If a test is not applicable (eg wrong architecture, kernel feature
>> not enabled, etc) then it should try to avoid breaking the build
>> when executed it should emit a diagnostic and then exit(0) (ie:
>> success) so as to avoid breaking the overall test run.
>> IOW, the test should only fail if the feature is present but isn't
>> working correctly.
>> Also, I hate with a passion Makefiles which hide the command lines
>> me! So I nuked all that E and Q stuff.
>make V=1 will show the command line, I tried to make the output to look
>the same as in case of building kernel.
>> However that didn't work for me:
>> akpm:/usr/src/25/tools/testing/selftests/kcmp> make
>> gcc -DCONFIG_X86_64 -D__x86_64__
>-I../../../../arch/x86/include/generated/ ...
>> kcmp_test.c: In function 'sys_kcmp':
>> kcmp_test.c:22: error: '__NR_kcmp' undeclared (first use in this
>> How are we supposed to be picking up __NR_kcmp?
>Initially I made it to look into arch/x86 directory and find __NR_kcmp
>definition there but then I realised (and someone pointed me as
>well) that headers should be taken from those which are generated
>by kernel, ie the result of 'make headers_install'. So if you run
>make headers_install then the test program should work. If this is
>wrong, I can fix it and make a patch on top.
>Ie instead of
>+#include <linux/unistd.h>
>there will be
>+#ifdef CONFIG_X86_64
>+#include <asm/unistd_64.h>
>+#include <asm/unistd_32.h>
> Cyrill

Sent from my Android phone with K-9 Mail. Please excuse my brevity.

 \ /
  Last update: 2012-02-15 08:01    [W:0.036 / U:5.788 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site