Run TestRunner in "frysk-imports" direcotry, [qiyao@plinuxt18 frysk-imports]$ ./TestRunner Running testGet(inua.eio.TestGet) ...PASS Running testMmap(inua.eio.TestMmap) ...PASS Running testPut(inua.eio.TestPut) ...PASS Running testGetWord(inua.eio.TestWordSize) ...PASS Running testRest(inua.eio.TestWordSize) ...PASS Running testParamaterlessPool(inua.util.TestPool) ...PASS Running testParameteredPool(inua.util.TestPool) ...PASS Running testCore(lib.elf.tests.TestElf) ...PASS Running testObjectFile(lib.elf.tests.TestElf) ...FAIL junit.framework.AssertionFailedError: expected:<0> but was:<4> Running testDisassembler(lib.opcodes.tests.TestOpcodes) ...FAIL junit.framework.ComparisonFailure: expected:<DWORD PTR [ecx]> but was:<.long 0xff010203> Time: 0.072 There were 2 failures: 1) testObjectFile(lib.elf.tests.TestElf)*** glibc detected *** ./TestRunner: double free or corruption (out): 0x00000000101d53e0 *** ======= Backtrace: ========= /lib64/libc.so.6[0x807e9a715c] /lib64/libc.so.6(__libc_free-0xecbe8)[0x807e9a73c8] ./TestRunner[0x10056374] ./TestRunner[0x1005504c] /usr/lib64/libgcj.so.7(_Z18_Jv_FinalizeObjectPN4java4lang6ObjectE-0x12b1fcc)[0x80b1ede184] /usr/lib64/libgcj.so.7[0x80b1eedefc] /usr/lib64/libgcj.so.7(GC_invoke_finalizers-0xa71a60)[0x80b27ae030] /usr/lib64/libgcj.so.7(_Z17_Jv_RunFinalizersv-0x12a2bf0)[0x80b1eee440] /usr/lib64/libgcj.so.7(_ZN3gnu3gcj7runtime15FinalizerThread3runEv-0x12bfc28)[0x80b1ecf788] /usr/lib64/libgcj.so.7(_Z13_Jv_ThreadRunPN4java4lang6ThreadE-0x12ab2cc)[0x80b1ee5524] /usr/lib64/libgcj.so.7[0x80b1eefe2c] /usr/lib64/libgcj.so.7(GC_start_routine-0xa632e8)[0x80b27bd758] /lib64/libpthread.so.0[0x807ed4b658] /lib64/libc.so.6(__clone-0x82500)[0x807ea14d00] ======= Memory map: ======== 00100000-00103000 r-xp 00100000 00:00 0 10000000-1014d000 r-xp 00000000 08:13 3892483 /home/qiyao/build-frysk-5-23/frysk-imports/TestRunner 1015c000-101be000 rw-p 0014c000 08:13 3892483 /home/qiyao/build-frysk-5-23/frysk-imports/TestRunner 101be000-101e6000 rw-p 101be000 00:00 0 [heap] 807e8c0000-807e8e8000 r-xp 00000000 08:03 3231365 /sda/sda3/lib64/ld-2.4.so 807e8f8000-807e8f9000 r--p 00028000 08:03 3231365 /sda/sda3/lib64/ld-2.4.so 807e8f9000-807e8fc000 rw-p 00029000 08:03 3231365 /sda/sda3/lib64/ld-2.4.so 807e900000-807ea7c000 r-xp 00000000 08:03 3231372 /sda/sda3/lib64/libc-2.4.so807ea7c000-807ea8c000 ---p 0017c000 08:03 3231372 /sda/sda3/lib64/libc-2.4.so807ea8c000-807ea90000 r--p 0017c000 08:03 3231372 /sda/sda3/lib64/libc-2.4.so807ea90000-807eaa0000 rw-p 00180000 08:03 3231372 /sda/sda3/lib64/libc-2.4.so807eaa0000-807eaa4000 rw-p 807eaa0000 00:00 0 807eab0000-807eab4000 r-xp 00000000 08:03 3231376 /sda/sda3/lib64/libdl-2.4.so 807eab4000-807eac3000 ---p 00004000 08:03 3231376 /sda/sda3/lib64/libdl-2.4.so 807eac3000-807eac4000 r--p 00003000 08:03 3231376 /sda/sda3/lib64/libdl-2.4.so 807eac4000-807eac5000 rw-p 00004000 08:03 3231376 /sda/sda3/lib64/libdl-2.4.so 807ead0000-807eb80000 r-xp 00000000 08:03 3231406 /sda/sda3/lib64/libm-2.4.so807eb80000-807eb8f000 ---p 000b0000 08:03 3231406 /sda/sda3/lib64/libm-2.4.so807eb8f000-807eb90000 r--p 000af000 08:03 3231406 /sda/sda3/lib64/libm-2.4.so807eb90000-807eb9e000 rw-p 000b0000 08:03 3231406 /sda/sda3/lib64/libm-2.4.so807eba0000-807ebb9000 r-xp 00000000 08:03 767972 /sda/sda3/usr/lib64/libz.so.1.2.3 807ebb9000-807ebc8000 ---p 00019000 08:03 767972 /sda/sda3/usr/lib64/libz.so.1.2.3 807ebc8000-807ebca000 rw-p 00018000 08:03 767972 /sda/sda3/usr/lib64/libz.so.1.2.3 807ed40000-807ed58000 r-xp 00000000 08:03 3231414 /sda/sda3/lib64/libpthread-2.4.so 807ed58000-807ed67000 ---p 00018000 08:03 3231414 /sda/sda3/lib64/libpthread-2.4.so 807ed67000-807ed68000 r--p 00017000 08:03 3231414 /sda/sda3/lib64/libpthread-2.4.so 807ed68000-807ed6a000 rw-p 00018000 08:03 3231414 /sda/sda3/lib64/libpthread-2.4.so 807ed6a000-807ed6e000 rw-p 807ed6a000 00:00 0 807ed70000-807ed83000 r-xp 00000000 08:03 3231419 /sda/sda3/lib64/libgcc_s-4.1.0-20060304.so.1 807ed83000-807ed92000 ---p 00013000 08:03 3231419 /sda/sda3/lib64/libgcc_s-4.1.0-20060304.so.1 807ed92000-807ed94000 rw-p 00012000 08:03 3231419 /sda/sda3/lib64/libgcc_s-4.1.0-20060304.so.1 80b0cd0000-80b2b5a000 r-xp 00000000 08:03 779804 /sda/sda3/usr/lib64/libgcj.so.7.0.0 80b2b5a000-80b2b6a000 ---p 01e8a000 08:03 779804 /sda/sda3/usr/lib64/libgcj.so.7.0.0 80b2b6a000-80b324f000 rw-p 01e8a000 08:03 779804 /sda/sda3/usr/lib64/libgcj.so.7.0.0 80b324f000-80b32c5000 rw-p 80b324f000 00:00 0 40000000000-40000001000 rw-p 40000000000 00:00 0 40000001000-40000021000 rwxp 40000001000 00:00 0 40000021000-40000022000 rw-p 00000000 08:13 2548717 /tmp/TestMmap.9miveo.tmp 40000027000-4000002b000 rw-p 40000027000 00:00 0 4000002b000-400033bd000 r--p 00000000 08:13 3400994 /usr/lib/locale/locale-archive 400033bd000-4000340d000 rwxp 400033bd000 00:00 0 4000340d000-40003414000 r--s 00000000 08:03 756197 /sda/sda3/usr/lib64/gconv/gconv-modules.cache 40003433000-40003440000 r-xp 00000000 08:03 3231388 Aborted
These two cases are coded as if they are always running on x86, and frysk-imports/lib/elf/tests/helloworld.o is also an object file on x86. These two cases must be failed on ppc64 or other platforms.
On x86-64 this test also fails: Running testObjectFile(lib.elf.tests.TestElf) ...FAIL junit.framework.AssertionFailedError: expected:<0> but was:<4> This is the alignment of the Data section. For x86-64 the alignment values are: section 0 () data alignment: 0 section 1 (.text) data alignment: 4 section 2 (.rel.text) data alignment: 4 section 3 (.data) data alignment: 4 section 4 (.bss) data alignment: 4 section 5 (.rodata) data alignment: 1 section 6 (.comment) data alignment: 1 section 7 (.note.GNU-stack) data alignment: 1 section 8 (.shstrtab) data alignment: 1 section 9 (.symtab) data alignment: 4 section 10 (.strtab) data alignment: 1
TestOpcodes also fails on x86-64. The testcase itself says so: /* * Note: this test is expected to fail on anything but i386 for the time being. * TODO: come up with a way of doing the correct assertEquals for other archs */ It is probably best to XFAIL this till that time.
This test has been updated to work on x86_64.
lib.elf.tests.TestElf could work on ppc64. [qiyao@plinuxt18 frysk-imports]$ ./TestRunner lib.elf.tests.TestElf Running testCore(lib.elf.tests.TestElf) ...PASS Running testObjectFile(lib.elf.tests.TestElf) ...<<BROKEN http://sourceware.org/bugzilla/show_bug.cgi?id=2712 >>PASS Time: 0.004 OK (2 tests) However, lib.opcodes.tests.TestOpcodes still fail on ppc64, [qiyao@plinuxt18 frysk-imports]$ ./TestRunner lib.opcodes.tests.TestOpcodes Running testDisassembler(lib.opcodes.tests.TestOpcodes) ...lib.opcodes.OpcodesException: Error: Unsupported architechture 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.Exception._ZN4java4lang9ExceptionC1EPNS0_6StringE(libgcj.so.7) at lib.opcodes.OpcodesException(TestRunner) at lib.opcodes.Disassembler(TestRunner) at lib.opcodes.Disassembler(TestRunner) at lib.opcodes.tests.TestOpcodes(TestRunner) at java.lang.reflect.Method._ZN4java4lang7reflect6Method6invokeEPNS0_6ObjectEP6JArrayIS4_E(libgcj.so.7) at junit.framework.TestCase(TestRunner) at junit.framework.TestCase(TestRunner) at junit.framework.TestResult$1(TestRunner) at junit.framework.TestResult(TestRunner) at junit.framework.TestResult(TestRunner) at junit.framework.TestCase(TestRunner) at junit.framework.TestSuite(TestRunner) at junit.framework.TestSuite(TestRunner) at junit.framework.TestSuite(TestRunner) at junit.framework.TestSuite(TestRunner) at junit.textui.TestRunner(TestRunner) at junit.textui.TestRunner(TestRunner) 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) FAIL junit.framework.AssertionFailedError: Exception thrown during disassembly Time: 0.027 There was 1 failure: 1) testDisassembler(lib.opcodes.tests.TestOpcodes)junit.framework.AssertionFailedError: Exception thrown during disassembly 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 lib.opcodes.tests.TestOpcodes(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) FAILURES!!! Tests run: 1, Failures: 1, Errors: 0
I code a patch here, http://sources.redhat.com/ml/frysk/2006-q3/msg00158.html to replace "ppc" with "powerpc" to match Build.BUILD_ARCH. TestOpcodes could be skipped if this patch applied, and I will close this bug when this patch is checked in.
Thanks to Rick for checking this patch in, and close this bug.
Index: frysk-imports/lib/elf/ChangeLog 2006-12-14 Andrew Cagney <cagney@redhat.com> * tests/TestElf.java (testObjectFile): Remove brokenXXX, bug says it is fixed.