Hi

I checked out the latest "switch01.c" and tested it on the PPC64 machine.
http://ltp.cvs.sourceforge.net/ltp/ltp/testcases/kernel/syscalls/switch/switch01.c

However, I got the build error:
====================
# uname -a
Linux medusalp1.upt.austin.ibm.com 2.6.18-92.el5 #1 SMP Tue Apr 29 13:21:29
EDT
2008 ppc64 ppc64 ppc64 GNU/Linux

cc -Wall  -I../../include -g -Wall -I../../../../include -Wall
switch01.c
-L../../../../lib -lltp  -o switch01
switch01.c:111: warning: ‘main’ takes only zero or two arguments
switch01.c:87:1: error: unterminated #else
make[4]: *** [switch01] Error 1
=====================
It  missed some lines.

Signed-off-by: Jin Bing Guo <[EMAIL PROTECTED]>
---------
--- cvs_ltp.orig/testcases/kernel/syscalls/switch/switch01.c
2008-09-05 01:29:14.000000000 -0500
+++ cvs_ltp/testcases/kernel/syscalls/switch/switch01.c     2008-09-08
04:07:48.000000000 -0500
@@ -132,3 +132,6 @@ int main() {

         tst_brkm(TCONF, cleanup, "This system does not support running of
switch() syscall");
         tst_exit();
+}
+
+#endif

And there still are some build warnings.
=========
# make
cc -I../../../../include -Wall -g    switch01.c  -L../../../../lib -lltp
-o switch01
switch01.c:111: warning: 'main' takes only zero or two arguments
switch01.c:64: warning: 'setup' defined but not used
=========

I tested it on a p570 mahine with RHEL4.7.
==========
# uname -a
Linux rulerlp2.upt.austin.ibm.com 2.6.9-78.EL #1 SMP Wed Jul 9 15:37:15 EDT
2008 ppc64 ppc64 ppc64 GNU/Linux
# ./switch01
switch01    1  FAIL  :  Got SIGILL - test failed
# echo $?
1
=========
So does it need to check the kernel version before running it?


Best regards!

Jin Bing Guo  郭晋兵

Linux for System p Test
IBM China Systems & Technology Laboratory in Beijing
Tel:   +86-10-82454439
Email: [EMAIL PROTECTED]
-------------------------------------
"Do today what others won't so tomorrow you do what other's can't"
-------------------------------------------------------------------------
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

Reply via email to