This is the mail archive of the frysk@sources.redhat.com mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Enable testGetLine except X86_64


Hi,

On Tue, 2006-09-19 at 11:47 +0800, Yao Qi wrote:
> In bug #2965, Tim reported that this case failed on X8664, but this
> case works on x86 and ppc64.  I code a patch to run this case
> except on X86_64.

The test case does work for me on x86_64. I don't know why it is failing
for Tim, maybe a different compiler that puts a different line number in
the debug info?

I simplified the testcase a little so all architectures should report
the same line number as follows:

2006-09-19  Mark Wielaard  <mark@klomp.org>

    * tests/cni/TestLib.cxx (getFuncAddr): Extract define out of
    function and put whole definition on one line.
    * tests/TestDwfl.java (testGetLine): Use same line number for all
    architectures.

This way the compiler has no choice but to say the function definition
is on line 58. Committed. Please let me know if it still fails
somewhere.

Cheers,

Mark
Index: frysk-imports/lib/dw/tests/TestDwfl.java
===================================================================
RCS file: /cvs/frysk/frysk-imports/lib/dw/tests/TestDwfl.java,v
retrieving revision 1.15
diff -u -r1.15 TestDwfl.java
--- frysk-imports/lib/dw/tests/TestDwfl.java	19 Sep 2006 03:40:51 -0000	1.15
+++ frysk-imports/lib/dw/tests/TestDwfl.java	19 Sep 2006 12:00:35 -0000
@@ -46,16 +46,11 @@
 import lib.dw.DwflDieBias;
 import lib.dw.DwflLine;
 
-import frysk.imports.Build;
-
 public class TestDwfl
     extends TestCase
 {
   public void testGetLine ()
   {
-    if (brokenX8664XXX(2965))
-      return;
-
     Dwfl dwfl = new Dwfl(TestLib.getPid());
     assertNotNull(dwfl);
     DwflLine line = dwfl.getSourceLine(TestLib.getFuncAddr());
@@ -64,12 +59,7 @@
     assertEquals("TestLib.cxx",
                  filename.substring(filename.lastIndexOf("/") + 1));
 
-    if(Build.BUILD_ARCH.indexOf("x86_64") != -1)
-      assertEquals(55, line.getLineNum());
-    else if (Build.BUILD_ARCH.indexOf("powerpc64") != -1)
-      assertEquals(51, line.getLineNum());
-    else
-      assertEquals(51, line.getLineNum());
+    assertEquals(58, line.getLineNum());
 
     assertEquals(0, line.getColumn());
   }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]