testAccessRegisterRead(frysk.stack.TestRegs)junit.framework.AssertionFailedError: esi: expected <0x1bc5daed> but was <0x457319f3> at frysk.junit.TestCase.assertEquals(TestRunner) at frysk.testbed.RegsCase.testAccessRegisterRead(TestRunner) at frysk.junit.Runner.runCases(TestRunner) at frysk.junit.Runner.runArchCases(TestRunner) at frysk.junit.Runner.runTestCases(TestRunner) at TestRunner.main(TestRunner)
suspect line: src/x86/init.h:39: c->dwarf.loc[ESI] = DWARF_REG_LOC (&c->dwarf, UNW_X86_EDI);
This failure also appears to be fixed by tweaking the above: testFhpdVirtualStackTrace(frysk.hpd.TestStackCommands)frysk.expunit.TimeoutException: Timeout of 5 expired at frysk.expunit.Expect.expectMilliseconds(TestRunner) at frysk.expunit.Expect.expect(TestRunner) at frysk.expunit.Expect.expect(TestRunner) at frysk.expunit.Expect.expect(TestRunner) at frysk.expunit.Expect.expect(TestRunner) at frysk.hpd.TestStackCommands.testFhpdVirtualStackTrace(TestRunner) at frysk.junit.Runner.runCases(TestRunner) at frysk.junit.Runner.runArchCases(TestRunner) at frysk.junit.Runner.runTestCases(TestRunner) at TestRunner.main(TestRunner)
The change in comment #2 is obviously the right thing. I'll commit it and push it upstream. The failure in comment #3 might be related to bug #4985 ? (It doesn't fail for me.)
OK, there is one failure with checking the eflags. Depending on the machine they might have status that seems unpredictable (like whether or not the CPU supports the CPUID setting... sigh). Hopefully we can somehow get funit-regs.S to set the flags register explictly to some value we can deterministicaly check. For now I'll disable it, but keep this bug open. diff -u -r1.3 RegsCase.java --- frysk-core/frysk/testbed/RegsCase.java 5 Oct 2007 23:08:34 -0000 1.3 +++ frysk-core/frysk/testbed/RegsCase.java 10 Oct 2007 15:17:25 -0000 @@ -180,7 +180,9 @@ new byte[] { (byte)0xf3, 0x19, 0x73, 0x45 }) .put(IA32Registers.EBP, // 0xcbfed73c new byte[] { 0x3c, (byte)0xd7, (byte)0xfe, (byte)0xcb }) - .put(IA32Registers.EFLAGS, BigInteger.valueOf(0x10246L)) + // eflags depend partly on hardware (like the ID flag) + // so don't test for now... BigInteger.valueOf(0x200246)) + .put(IA32Registers.EFLAGS, null) .put(IA32Registers.ESP, // 0x93d4a6ed new byte[] { (byte)0xed, (byte)0xa6, (byte)0xd4, (byte)0x93 }) .put(IA32Registers.EIP, null)
I added a mask.
Masked is now properly used: 2007-10-15 Andrew Cagney <cagney@redhat.com> * RegsCase.java (taskObject(Task)): Delete. (access(Register,int,int,byte[],int,boolean)): Relace accessRegister(Object,Register,int,int,byte[],int,boolean). (Value, ByteValue, BigIntegerValue, MaskedValue, SymbolValue) (NoValue): New. (Values): Replace ValueMap. (IA32): Provide values for EIP and maksed EFLAGS. * TestRegs.java: Update. 2007-10-26 Mark Wielaard <mwielaard@redhat.com> * RegsCase.java (IA32): Don't subtract one from EFLAGS bit mask.