Subrata Modak wrote:
> On Thu, 2008-08-21 at 15:54 +0530, Sharyathi Nagesh wrote:
>> Subrata
>>     I am attaching the patch after making the suggested changes.
>> I was not able to test it on s390 or ia64 as machines were not available 
>> for testing. Please review the patch and let me know your thoughts
> 
> Hi Sharayathi,
> 
> Thanks for re-posting the patch for getcpu() syscall. Here are my test
> results and observations. There are some build errors on some
> machine(s). They need to be fixed. And some odd failures on systems
> where it built & installed properly.
> 
> 1) Linux 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:15 EDT 2008 x86_64 x86_64
> x86_64 GNU/Linux
> 
> make[4]: Entering directory
> `/root/subrata/ltp/ltp-intermediate-20080820/testcases/kernel/syscalls/getcpu'
> cc -Wall  -I../../include -g -Wall -I../../../../include -Wall
> getcpu01.c  -L../../../../lib -lltp -o getcpu01
> getcpu01.c: In function ‘main’:
> getcpu01.c:96: warning: unused variable ‘node_set’
> getcpu01.c: In function ‘getcpu’:
> getcpu01.c:166: warning: implicit declaration of function ‘sched_getcpu’
> /tmp/ccue3FLD.o: In function `getcpu':
> /root/subrata/ltp/ltp-intermediate-20080820/testcases/kernel/syscalls/getcpu/getcpu01.c:166:
>  undefined reference to `sched_getcpu'
> collect2: ld returned 1 exit status
> make[4]: *** [getcpu01] Error 1

This occurs because of the grep in the Makefile, probably we have check for the 
kernel version while make

-ifeq ($(shell uname -r | grep -c "^2\.6\.*"), 1)
+all:
+       @set -e; $(MAKE) check_for_getcpu_support; \
+       if './check_for_getcpu_support' > /dev/null 2>&1; then \
+                $(MAKE) $(TARGETS); \
+       else echo "System does not support getcpu syscall support"; true; fi
 
-all: $(TARGETS)
+check_for_getcpu_support: check_for_getcpu_support.c
+       $(CC) -o $@ $< ../../../../lib/tst_kvercmp.c -I../../../../include
 
 install:
        @set -e; for i in $(TARGETS); do ln -f $$i ../../../bin/$$i ; done
-else
-
-all install:
-       @echo "Warning: Kernel doesn't support this test case"
-endif

# cat check_for_getcpu_support.c 
#include <stdio.h>
#include <test.h>

int kernel_support_available(void) {
    if (tst_kvercmp(2,6,20) < 0)
        return 1;
    return 0;
}

int main() {
        exit(kernel_support_available());
}


> 
> 2) 2) Linux 2.6.9-22.EL #1 SMP Mon Sep 19 17:52:20 EDT 2005 ppc64 ppc64
> ppc64 GNU/Linux
> 
> <<<test_start>>>
> tag=getcpu01 stime=1219317060
> cmdline="getcpu01"
> contacts=""
> analysis=exit
> initiation_status="ok"
> <<<test_output>>>
> getcpu01    1  FAIL  :  getcpu() Failed, errno=0:Success
> <<<execution_status>>>
> duration=0 termination_type=exited termination_id=1 corefile=no
> cutime=0 cstime=0
> <<<test_end>>>
> <<<test_start>>>
> tag=getcpu02 stime=1219317060
> cmdline="getcpu02"
> contacts=""
> analysis=exit
> initiation_status="ok"
> <<<test_output>>>
> incrementing stop
> getcpu02    1  FAIL  :  call failed to produce expected error - errno =
> 38 - Function not implemented
> <<<execution_status>>>
> duration=0 termination_type=exited termination_id=1 corefile=no
> cutime=0 cstime=0
> <<<test_end>>>
> 
According to the test summary, this test case should not run powerpc

        /* Check For Kernel Version */
-        if(((tst_kvercmp(2,6,20)) < 0) && (sys_support))
+        if(((tst_kvercmp(2,6,20)) < 0) && (!sys_support))

because the sys_support in the case of powerpc is 0 and the test executes.

> 3) 3) Linux 2.6.16-1.2080_FC5 #1 SMP Tue Mar 28 03:38:47 EST 2006 x86_64
> x86_64 x86_64 GNU/Linux
> 
> make[4]: Entering directory
> `/root/subrata/ltp/ltp-intermediate-20080820/testcases/kernel/syscalls/getcpu'
> cc -Wall  -I../../include -g -Wall -I../../../../include -Wall
> getcpu01.c  -L../../../../lib -lltp -o getcpu01
> getcpu01.c: In function ‘main’:
> getcpu01.c:96: warning: unused variable ‘node_set’
> getcpu01.c: In function ‘getcpu’:
> getcpu01.c:166: warning: implicit declaration of function ‘sched_getcpu’
> /tmp/cc8pR3wh.o: In function `getcpu':
> /root/subrata/ltp/ltp-intermediate-20080820/testcases/kernel/syscalls/getcpu/getcpu01.c:166:
>  undefined reference to `sched_getcpu'
> collect2: ld returned 1 exit status
> make[4]: *** [getcpu01] Error 1
> 
> 
> 4) Linux 2.6.16.21-0.8-ppc64 #1 SMP Mon Jul 3 18:25:39 UTC 2006 ppc64
> ppc64 ppc64 GNU/Linux
> 
> <<<test_start>>>
> tag=getcpu01 stime=1219317082
> cmdline="getcpu01"
> contacts=""
> analysis=exit
> initiation_status="ok"
> <<<test_output>>>
> getcpu01    1  FAIL  :  getcpu() Failed, errno=0:Success
> <<<execution_status>>>
> duration=0 termination_type=exited termination_id=1 corefile=no
> cutime=0 cstime=0
> <<<test_end>>>
> <<<test_start>>>
> tag=getcpu02 stime=1219317082
> cmdline="getcpu02"
> contacts=""
> analysis=exit
> initiation_status="ok"
> <<<test_output>>>
> incrementing stop
> getcpu02    1  FAIL  :  call failed to produce expected error - errno =
> 38 - Function not implemented
> <<<execution_status>>>
> duration=0 termination_type=exited termination_id=1 corefile=no
> cutime=0 cstime=0
> <<<test_end>>>
> 
> 
> 5) Linux 2.6.23.13 #1 SMP Wed Jan 9 18:14:28 PST 2008 ia64 GNU/Linux
> 
> <<<test_start>>>
> tag=getcpu01 stime=1219317346
> cmdline="getcpu01"
> contacts=""
> analysis=exit
> initiation_status="ok"
> <<<test_output>>>
> getcpu01    1  FAIL  :  getcpu() Failed, errno=0:Success
> <<<execution_status>>>
> duration=0 termination_type=exited termination_id=1 corefile=no
> cutime=0 cstime=0
> <<<test_end>>>
> <<<test_start>>>
> tag=getcpu02 stime=1219317346
> cmdline="getcpu02"
> contacts=""
> analysis=exit
> initiation_status="ok"
> <<<test_output>>>
> incrementing stop
> getcpu02    1  FAIL  :  call failed to produce expected error - errno =
> 38 - Function not implemented
> <<<execution_status>>>
> duration=0 termination_type=exited termination_id=1 corefile=no
> cutime=0 cstime=0
> <<<test_end>>>
> 
> 6) Linux 2.6.18-92.el5xen #1 SMP Tue Apr 29 13:45:57 EDT 2008 i686 i686
> i386 GNU/Linux
> 
> <<<test_start>>>
> tag=getcpu01 stime=1219321635
> cmdline="getcpu01"
> contacts=""
> analysis=exit
> initiation_status="ok"
> <<<test_output>>>
> getcpu01    1  CONF  :  This test can only run on kernels that are 
> getcpu01    2  CONF  :  2.6.20 and higher and glibc version 2.6 and
> above
> getcpu01    3  CONF  :  Currently the test case has been
> getcpu01    4  CONF  :  developed only for i386 and x86_64
> <<<execution_status>>>
> duration=0 termination_type=exited termination_id=0 corefile=no
> cutime=0 cstime=0
> <<<test_end>>>
> <<<test_start>>>
> tag=getcpu02 stime=1219321635
> cmdline="getcpu02"
> contacts=""
> analysis=exit
> initiation_status="ok"
> <<<test_output>>>
> incrementing stop
> getcpu02    1  CONF  :  This test can only run on kernels that are 
> getcpu02    2  CONF  :  2.6.20 and higher and on i386 architecture
> <<<execution_status>>>
> duration=0 termination_type=exited termination_id=0 corefile=no
> cutime=0 cstime=0
> <<<test_end>>>
> 
> 
> 7) Linux 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:12 EDT 2008 i686 i686
> i386 GNU/Linux
> 
> <<<test_start>>>
> tag=getcpu01 stime=1219321259
> cmdline="getcpu01"
> contacts=""
> analysis=exit
> initiation_status="ok"
> <<<test_output>>>
> getcpu01    1  CONF  :  This test can only run on kernels that are 
> getcpu01    2  CONF  :  2.6.20 and higher and glibc version 2.6 and
> above
> getcpu01    3  CONF  :  Currently the test case has been
> getcpu01    4  CONF  :  developed only for i386 and x86_64
> <<<execution_status>>>
> duration=0 termination_type=exited termination_id=0 corefile=no
> cutime=0 cstime=0
> <<<test_end>>>
> <<<test_start>>>
> tag=getcpu02 stime=1219321259
> cmdline="getcpu02"
> contacts=""
> analysis=exit
> initiation_status="ok"
> <<<test_output>>>
> incrementing stop
> getcpu02    1  CONF  :  This test can only run on kernels that are 
> getcpu02    2  CONF  :  2.6.20 and higher and on i386 architecture
> <<<execution_status>>>
> duration=0 termination_type=exited termination_id=0 corefile=no
> cutime=0 cstime=0
> <<<test_end>>>
> 
> It would be great if you can fix the above Build and run issue(s) (the
> FAIL ones), and send me back an update Patch, so that this can be made
> as part of August LTP release.
> 
> Regards--
> Subrata
> 
>> Subrata Modak wrote:
>>
>>>> 4) Linux 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686 i686
>>>> i386 GNU/Linux
>>>> BUILD=Failure,
>>>>
> 
> 
> 
> -------------------------------------------------------------------------
> 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


-- 
Thanks & Regards,
Kamalesh Babulal,
Linux Technology Center,
IBM, ISTL.

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