Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757783Ab2BOG6u (ORCPT ); Wed, 15 Feb 2012 01:58:50 -0500 Received: from terminus.zytor.com ([198.137.202.10]:47899 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752951Ab2BOG6t (ORCPT ); Wed, 15 Feb 2012 01:58:49 -0500 References: <20120213164822.227219834@openvz.org> <20120213165137.903318774@openvz.org> <20120214151312.92afd44a.akpm@linux-foundation.org> <20120215065245.GB1894@moon> User-Agent: K-9 Mail for Android In-Reply-To: <20120215065245.GB1894@moon> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [patch 2/4] syscalls, x86: Add __NR_kcmp syscall v8 From: "hpanvin@gmail.com" Date: Tue, 14 Feb 2012 22:55:55 -0800 To: Cyrill Gorcunov , Andrew Morton CC: linux-kernel@vger.kernel.org, "Eric W. Biederman" , Pavel Emelyanov , KOSAKI Motohiro , Ingo Molnar , Pavel Emelyanov , Andrey Vagin , KOSAKI Motohiro , Thomas Gleixner , Glauber Costa , Andi Kleen , Tejun Heo , Matt Helsley , Pekka Enberg , Eric Dumazet , Vasiliy Kulikov , Alexey Dobriyan , Valdis.Kletnieks@vt.edu, Michal Marek Message-ID: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2492 Lines: 79 What? 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 >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 > >there will be > >+#ifdef CONFIG_X86_64 >+#include >+#else >+#include >+#endif > > Cyrill -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/