Bug 3011

Summary: testSyscallOpen fail on ppc64 when syscalls return negative value
Product: frysk Reporter: Wu Zhou <woodzltc>
Component: generalAssignee: Wu Zhou <woodzltc>
Status: RESOLVED FIXED    
Severity: normal CC: qiyaoltc, zhengyzy
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: ppc64-redhat-linux Target: ppc64-redhat-linux
Build: ppc64-redhat-linux Last reconfirmed:
Bug Depends on:    
Bug Blocks: 2188    

Description Wu Zhou 2006-08-08 05:56:04 UTC
testSyscallOpen will try to open a non-existent file "a.file", this will return
-ENOENT (-2).  But on PPC64, the value in GPR3 are unsigned.  so the current
code will get a positive 2 back.  This makes testSyscallOpen fail.

Here is the failure log:

testSyscallOpen(frysk.proc.TestTaskSyscallObserver)junit.framework.AssertionFailedError:
open of a.file failed
   at
java.lang.VMThrowable._ZN4java4lang11VMThrowable16fillInStackTraceEPNS0_9ThrowableE(libgcj.so.7)
   at java.lang.Throwable._ZN4java4lang9Throwable16fillInStackTraceEv(libgcj.so.7)
   at java.lang.Throwable._ZN4java4lang9ThrowableC1EPNS0_6StringE(libgcj.so.7)
   at java.lang.Error._ZN4java4lang5ErrorC1EPNS0_6StringE(libgcj.so.7)
   at junit.framework.AssertionFailedError(TestRunner)
   at junit.framework.Assert(TestRunner)
   at junit.framework.Assert(TestRunner)
   at frysk.proc.TestTaskSyscallObserver(TestRunner)
   at
java.lang.reflect.Method._ZN4java4lang7reflect6Method6invokeEPNS0_6ObjectEP6JArrayIS4_E(libgcj.so.7)
   at frysk.junit.Runner(TestRunner)
   at TestRunner(TestRunner)
   at
gnu.java.lang.MainThread._ZN3gnu4java4lang10MainThread9call_mainEv(libgcj.so.7)
   at gnu.java.lang.MainThread._ZN3gnu4java4lang10MainThread3runEv(libgcj.so.7)
Comment 1 Wu Zhou 2006-08-08 08:06:19 UTC
I just sbumitted a patch, which can fix this.  Here is the link: 
http://sources.redhat.com/ml/frysk/2006-q3/msg00172.html.
Comment 2 Wu Zhou 2006-08-17 16:04:22 UTC
the patch is already in latest cvs tree.