Hi Jin,

On Mon, 2008-09-08 at 17:23 +0800, Jin Bing Guo wrote:
> 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 

Thanks. I do not know how i missed this one. Fixed.

> 
> 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 have added the setup() in the initial main. However the warning will
keep coming for machines where it will actually enter only the #else
loop. Nothing to worry.

> =========
> 
> 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?

The kernel checking is deliberately kept aside as this syscall may get
backported. The important thing is whether the CPU is P6. Let the test
fail when the Kernel is less than 2.6.26 but CPU is P6.

Regards--
Subrata

> 
> 
> 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