This is the mail archive of the
frysk@sources.redhat.com
mailing list for the frysk project.
frysk-imports broken tests on x86-64
- From: Mark Wielaard <mark at klomp dot org>
- To: frysk at sources dot redhat dot com
- Date: Thu, 27 Jul 2006 16:11:01 +0200
- Subject: frysk-imports broken tests on x86-64
Hi,
To get a clean make check on x86-64 in frysk-import I marked all tests
that are currently broken. When there wasn't a bugzilla report yet I
created one.
2006-07-27 Mark Wielaard <mark@klomp.org>
* tests/TestDwfl.java (testGetLine): Mark as broken bug #2965.
2006-07-27 Mark Wielaard <mark@klomp.org>
* tests/TestElf.java (testObjectFile): Mark as broken bug #2712.
Add assert descriptions.
2006-07-27 Mark Wielaard <mark@klomp.org>
* tests/TestOpcodes.java (testDisassembler): Mark as broken,
bug #2712.
Since we really want a clean make check on all supported platforms it
seemed appropriate, and pretty helpfull for me at least. Please let me
know if someone disagrees.
Committed,
Mark
? x86-64-broken.patch
Index: lib/dw/tests/TestDwfl.java
===================================================================
RCS file: /cvs/frysk/frysk-imports/lib/dw/tests/TestDwfl.java,v
retrieving revision 1.8
diff -u -r1.8 TestDwfl.java
--- lib/dw/tests/TestDwfl.java 25 Jul 2006 16:23:02 -0000 1.8
+++ lib/dw/tests/TestDwfl.java 27 Jul 2006 14:02:21 -0000
@@ -69,6 +69,9 @@
public void testGetLine ()
{
+ if (brokenXXX(2965))
+ return;
+
Dwfl dwfl = new Dwfl(TestLib.getPid());
assertNotNull(dwfl);
DwflLine line = dwfl.getSourceLine(TestLib.getFuncAddr());
Index: lib/elf/tests/TestElf.java
===================================================================
RCS file: /cvs/frysk/frysk-imports/lib/elf/tests/TestElf.java,v
retrieving revision 1.8
diff -u -r1.8 TestElf.java
--- lib/elf/tests/TestElf.java 24 Jul 2006 21:25:49 -0000 1.8
+++ lib/elf/tests/TestElf.java 27 Jul 2006 14:02:21 -0000
@@ -1,6 +1,6 @@
// This file is part of the program FRYSK.
//
-// Copyright 2005, Red Hat Inc.
+// Copyright 2005, 2006 Red Hat Inc.
//
// FRYSK is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
@@ -60,6 +60,24 @@
public class TestElf
extends TestCase
{
+ /**
+ * A variable that has the value true. Used by code trying to
+ * stop the optimizer realise that there's dead code around.
+ */
+ static boolean trueXXX = true;
+ /**
+ * A function that returns true, and prints skip. Used by test
+ * cases that want to be skipped (vis: if(broken()) return) while
+ * trying to avoid the compiler's optimizer realizing that the
+ * rest of the function is dead.
+ */
+ protected static boolean brokenXXX (int bug)
+ {
+ System.out.print ("<<BROKEN http://sourceware.org/bugzilla/show_bug.cgi?id=" + bug + " >>");
+ return trueXXX;
+ }
+
+
public void testCore () throws ElfException, ElfFileException
{
@@ -131,6 +149,9 @@
public void testObjectFile () throws ElfException, ElfFileException
{
+ if (brokenXXX(2712))
+ return;
+
Elf testElf = new Elf(Build.ABS_BUILDDIR + "/lib/elf/tests/helloworld.o",
ElfCommand.ELF_C_READ);
@@ -138,18 +159,18 @@
assertEquals(testElf.getBase(), 0);
ElfEHeader header = testElf.getEHeader();
- assertEquals(3, header.machine);
- assertEquals(52, header.ehsize);
- assertEquals(0, header.entry);
- assertEquals(1, header.version);
- assertEquals(0, header.flags);
- assertEquals(1, header.type);
- assertEquals(11, header.shnum);
- assertEquals(40, header.shentsize);
- assertEquals(236, header.shoff);
- assertEquals(0, header.phnum);
- assertEquals(0, header.phentsize);
- assertEquals(0, header.phoff);
+ assertEquals("machine", 3, header.machine);
+ assertEquals("ehsize", 52, header.ehsize);
+ assertEquals("entry", 0, header.entry);
+ assertEquals("version", 1, header.version);
+ assertEquals("flags", 0, header.flags);
+ assertEquals("type", 1, header.type);
+ assertEquals("shnum", 11, header.shnum);
+ assertEquals("shentsize", 40, header.shentsize);
+ assertEquals("shoff", 236, header.shoff);
+ assertEquals("phnum", 0, header.phnum);
+ assertEquals("phentsize", 0, header.phentsize);
+ assertEquals("phoff", 0, header.phoff);
int[] expectedIndices = { 0, 52, 864, 96, 96, 96, 110, 155, 155, 676, 836 };
int[] expectedInfo = { 0, 0, 1, 0, 0, 0, 0, 0, 0, 8, 0 };
@@ -174,30 +195,30 @@
for (int i = 0; i < header.shnum; i++)
{
ElfSection section = testElf.getSection(i);
- assertNotNull(section);
- assertEquals(section.getIndex(), i);
+ assertNotNull("section-" + i, section);
+ assertEquals("section-" + i + ".getIndex()", section.getIndex(), i);
ElfSectionHeader sheader = section.getSectionHeader();
assertNotNull(sheader);
- assertEquals(0, sheader.addr);
- assertEquals(expectedIndices[i], sheader.offset);
- assertEquals(expectedInfo[i], sheader.info);
- assertEquals(expectedAlign[i], sheader.addralign);
- assertEquals(expectedEntrySize[i], sheader.entsize);
- assertEquals(expectedFlags[i], sheader.flags);
- assertEquals(expectedNames[i], sheader.name);
- assertEquals(expectedSize[i], sheader.size);
- assertEquals(expectedTypes[i], sheader.type);
+ assertEquals("section-" + i + "-addr", 0, sheader.addr);
+ assertEquals("section-" + i + "-offset", expectedIndices[i], sheader.offset);
+ assertEquals("section-" + i + "-info", expectedInfo[i], sheader.info);
+ assertEquals("section-" + i + "-addralign", expectedAlign[i], sheader.addralign);
+ assertEquals("section-" + i + "-entsize", expectedEntrySize[i], sheader.entsize);
+ assertEquals("section-" + i + "-flags", expectedFlags[i], sheader.flags);
+ assertEquals("section-" + i + "-name", expectedNames[i], sheader.name);
+ assertEquals("section-" + i + "-size", expectedSize[i], sheader.size);
+ assertEquals("section-" + i + "-type", expectedTypes[i], sheader.type);
ElfData data = section.getData();
assertNotNull(data);
- assertEquals(0, data.getAlignment());
- assertEquals(0, data.getOffset());
- assertEquals(expectedDataSizes[i], data.getSize());
- assertEquals(expectedDataTypes[i], data.getType());
+ assertEquals("section-" + i + "-alignment", 0, data.getAlignment());
+ assertEquals("section-" + i + "-offset", 0, data.getOffset());
+ assertEquals("section-" + i + "-size", expectedDataSizes[i], data.getSize());
+ assertEquals("section-" + i + "-type", expectedDataTypes[i], data.getType());
if (data.getSize() != 0)
- assertEquals(expectedBytes[i], data.getByte(0));
+ assertEquals("section-" + i + "-byte", expectedBytes[i], data.getByte(0));
}
}
Index: lib/opcodes/tests/TestOpcodes.java
===================================================================
RCS file: /cvs/frysk/frysk-imports/lib/opcodes/tests/TestOpcodes.java,v
retrieving revision 1.3
diff -u -r1.3 TestOpcodes.java
--- lib/opcodes/tests/TestOpcodes.java 24 May 2006 19:07:27 -0000 1.3
+++ lib/opcodes/tests/TestOpcodes.java 27 Jul 2006 14:02:21 -0000
@@ -1,6 +1,6 @@
// This file is part of the program FRYSK.
//
-// Copyright 2005, Red Hat Inc.
+// Copyright 2005, 2006 Red Hat Inc.
//
// FRYSK is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
@@ -49,11 +49,32 @@
public class TestOpcodes extends TestCase {
+ /**
+ * A variable that has the value true. Used by code trying to
+ * stop the optimizer realise that there's dead code around.
+ */
+ static boolean trueXXX = true;
+ /**
+ * A function that returns true, and prints skip. Used by test
+ * cases that want to be skipped (vis: if(broken()) return) while
+ * trying to avoid the compiler's optimizer realizing that the
+ * rest of the function is dead.
+ */
+ protected static boolean brokenXXX (int bug)
+ {
+ System.out.print ("<<BROKEN http://sourceware.org/bugzilla/show_bug.cgi?id=" + bug + " >>");
+ return trueXXX;
+ }
+
/*
* 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
*/
public void testDisassembler(){
+
+ if (brokenXXX(2712))
+ return;
+
ByteBuffer buffer = new DummyByteBuffer();
final int numInstructions = 16;