> > On Thu, Nov 20, 2008 at 01:44:47PM +0530, Subrata Modak wrote: > > To check if unshare is supported or not, we can add code to the Makefile > > itself. Even adding code to check Kernel Version in Makefile will be > > better in my opinion. > > Veerendra ?
See http://www.mail-archive.com/[email protected]/msg04345.html "Garrett Cooper" <[EMAIL PROTECTED]> wrote: > kernel headers can be older than the kernel version. A very important, > but subtle point... > The step to use autoconf in your test case: 0. update ltp (via cvs or git); the install autoconf > 2.61 1. Added ltp-SYSTEMCALLNAME.m4 to m4 directory. e.g. pseudo code(ltp-unshare.m4) AC_DEFUN([LTP_CHECK_SYSCALL_UNSHARE],[ AC_CHECK_FUNCS(unshare) ]) 2. Added the macro name to configure.ac like m4_include([m4/ltp-unshare.m4]) LTP_CHECK_SYSCALL_UNSHARE 3. make autoconf 4. modify your test case. 4.1 include config.h (see signalfd01.c) 4.2 #if defined HAVE_UNSHARED ...code for test case... #else ...stub reports "this environment doesn't support unshare syscall"... #endif 5. ./configure 6. cd lib;make;cd .. 7 cd testcases/kernel/syscall/unshare; make 8. Read include config.h and search HAVE_UNSHARED You can see the result of configure. if HAVE_UNSHARED is defined your platform may have the systemcall. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
