All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@openvz.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Pavel Emelyanov <xemul@openvz.org>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
	Pavel Emelyanov <xemul@parallels.com>,
	Andrey Vagin <avagin@openvz.org>,
	KOSAKI Motohiro <kosaki.motohiro@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Glauber Costa <glommer@parallels.com>,
	Andi Kleen <andi@firstfloor.org>, Tejun Heo <tj@kernel.org>,
	Matt Helsley <matthltc@us.ibm.com>,
	Pekka Enberg <penberg@kernel.org>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	Vasiliy Kulikov <segoon@openwall.com>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Valdis.Kletnieks@vt.edu, Michal Marek <mmarek@suse.cz>
Subject: Re: [patch 2/4] syscalls, x86: Add __NR_kcmp syscall v8
Date: Wed, 15 Feb 2012 10:52:45 +0400	[thread overview]
Message-ID: <20120215065245.GB1894@moon> (raw)
In-Reply-To: <20120214151312.92afd44a.akpm@linux-foundation.org>

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 and,
>   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 from
> 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 function)
...
> 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>
+#else
+#include <asm/unistd_32.h>
+#endif

	Cyrill

  reply	other threads:[~2012-02-15  6:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-13 16:48 [patch 0/4] Resending, c/r series v2 Cyrill Gorcunov
2012-02-13 16:48 ` [patch 1/4] fs, proc: Introduce /proc/<pid>/task/<tid>/children entry v9 Cyrill Gorcunov
2012-02-13 16:48 ` [patch 2/4] syscalls, x86: Add __NR_kcmp syscall v8 Cyrill Gorcunov
2012-02-14 23:13   ` Andrew Morton
2012-02-15  6:52     ` Cyrill Gorcunov [this message]
2012-02-15  6:55       ` hpanvin@gmail.com
2012-02-15  7:04         ` Cyrill Gorcunov
2012-02-15  7:24           ` Cyrill Gorcunov
2012-02-15 21:53             ` Andrew Morton
2012-02-15 22:00               ` Cyrill Gorcunov
2012-02-15 22:09                 ` Cyrill Gorcunov
2012-02-13 16:48 ` [patch 3/4] c/r: procfs: add arg_start/end, env_start/end and exit_code members to /proc/$pid/stat Cyrill Gorcunov
2012-02-13 16:48 ` [patch 4/4] c/r: prctl: Extend PR_SET_MM to set up more mm_struct entries v2 Cyrill Gorcunov
2012-02-14 22:51 ` [patch 0/4] Resending, c/r series v2 Andrew Morton
2012-02-15  4:52   ` Pavel Emelyanov
2012-02-15  7:42     ` Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120215065245.GB1894@moon \
    --to=gorcunov@openvz.org \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=avagin@openvz.org \
    --cc=ebiederm@xmission.com \
    --cc=eric.dumazet@gmail.com \
    --cc=glommer@parallels.com \
    --cc=hpa@zytor.com \
    --cc=kosaki.motohiro@gmail.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthltc@us.ibm.com \
    --cc=mingo@elte.hu \
    --cc=mmarek@suse.cz \
    --cc=penberg@kernel.org \
    --cc=segoon@openwall.com \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=xemul@openvz.org \
    --cc=xemul@parallels.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.