Hi,

the getcpu() test-function returns the current scheduled CPU id of the
test-process for archiectures expect i386, which is not the intended return
value of a syscall test.

Attachted patch returns instead 0, for non-i386 ARCH and __GLIBC_PREREQ(2,6).

Tested on x86_64.

Signed-off-by: Daniel Gollub <[EMAIL PROTECTED]>

---
 testcases/kernel/syscalls/getcpu/getcpu01.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: ltp-full-20081017/testcases/kernel/syscalls/getcpu/getcpu01.c
===================================================================
--- ltp-full-20081017.orig/testcases/kernel/syscalls/getcpu/getcpu01.c
+++ ltp-full-20081017/testcases/kernel/syscalls/getcpu/getcpu01.c
@@ -165,7 +165,7 @@ static inline int getcpu(unsigned *cpu_i
        #if defined(__i386__)
                return syscall(318, cpu_id,node_id,cache_struct);
        #elif __GLIBC_PREREQ(2,6)
-               return *cpu_id = sched_getcpu();
+               *cpu_id = sched_getcpu();
        #endif
        return 0;
 }

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