On Fri, Aug 22, 2008 at 03:19:05PM +0530, Sharyathi Nagesh wrote:
> Hi
> >
> >Sorry for the late feedback. I don't understand what you're
> >testing in getcpu2 -- getcpu() has no input arguments (except
> >for the cache).  So why do you expect it to fail with 0xff?
> >
> >-Andi
> Andi
> getcpu2 is written only for x86. I was trying this to check the error 
> return value from the sys_getcpu() by sending wrong address (Invalid 
> address) to put_user.

Also to be honest I'm not sure that's something really worth
testing. At some point i386 might get vsyscalls too and then
it will just be a normal segfault. Also we're relatively sure
that for the in kernel fallback the EFAULT return path works and it's 
unlikely to regress because the code is very simple @)

More interesting would be to test on more CPUs for example, 
as in extending getcpu1 to cycle through all CPUs.

Also measuring how long the data stays valid and error out 
if it's too long, but that would be likely not quite trivial
to test.

-Andi

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