public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
* Alignment info for Elf test
@ 2007-01-09 11:51 Mark Wielaard
  2007-01-09 13:12 ` Mark Wielaard
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Wielaard @ 2007-01-09 11:51 UTC (permalink / raw)
  To: frysk

[-- Attachment #1: Type: text/plain, Size: 475 bytes --]

Hi,

As mentioned in bug #3763 this patch adds alignment info for Elf test so
that it now passes on x86_64. But this breaks on x86 it seems. Does
anybody know what is needed on x86 to get the alignment info there also
correct? I would like to add this patch since it fixes the only test
suite failure on x86_64 I am seeing.

2007-01-09  Mark Wielaard  <mark@klomp.org>

    * tests/TestElf.java (testObjectFile): Add and use
    expectedDataAlignments values.

Cheers,

Mark

[-- Attachment #2: TestElf-expectedDataAlignments.patch --]
[-- Type: text/x-patch, Size: 1676 bytes --]

Index: frysk-imports/lib/elf/tests/TestElf.java
===================================================================
RCS file: /cvs/frysk/frysk-imports/lib/elf/tests/TestElf.java,v
retrieving revision 1.12
diff -u -r1.12 TestElf.java
--- frysk-imports/lib/elf/tests/TestElf.java	14 Dec 2006 18:32:57 -0000	1.12
+++ frysk-imports/lib/elf/tests/TestElf.java	9 Jan 2007 11:42:50 -0000
@@ -1,6 +1,6 @@
 // This file is part of the program FRYSK.
 //
-// Copyright 2005, 2006 Red Hat Inc.
+// Copyright 2005, 2006, 2007 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
@@ -161,6 +161,7 @@
     int[] expectedTypes = { 0, 1, 9, 1, 8, 1, 1, 1, 3, 2, 3 };
 
     int[] expectedDataSizes = { 0, 43, 16, 0, 0, 14, 45, 0, 81, 160, 25 };
+    int[] expectedDataAlignments = { 0, 4, 4, 4, 4, 1, 1, 1, 1, 4, 1 };
     ElfType[] expectedDataTypes = { ElfType.ELF_T_BYTE, ElfType.ELF_T_BYTE,
                                    ElfType.ELF_T_REL, ElfType.ELF_T_BYTE,
                                    ElfType.ELF_T_BYTE, ElfType.ELF_T_BYTE,
@@ -190,7 +191,8 @@
 
         ElfData data = section.getData();
         assertNotNull(data);
-        assertEquals("section-" + i + "-alignment", 0, data.getAlignment());
+        assertEquals("section-" + i + "-alignment", expectedDataAlignments[i],
+                     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());

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Alignment info for Elf test
  2007-01-09 11:51 Alignment info for Elf test Mark Wielaard
@ 2007-01-09 13:12 ` Mark Wielaard
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2007-01-09 13:12 UTC (permalink / raw)
  To: frysk

[-- Attachment #1: Type: text/plain, Size: 816 bytes --]

Hi,

On Tue, 2007-01-09 at 12:51 +0100, Mark Wielaard wrote:
> As mentioned in bug #3763 this patch adds alignment info for Elf test so
> that it now passes on x86_64. But this breaks on x86 it seems. Does
> anybody know what is needed on x86 to get the alignment info there also
> correct? I would like to add this patch since it fixes the only test
> suite failure on x86_64 I am seeing.

Doh. My head still is a little like a sponge. Sorry about that.
On irc Andrew and Jan explained it all to me. With an update to TestElf
for alignment the LARGE_FILE support in common.ac also needs to be
enabled (for x86). Since common.ac is replicated in our tree in various
places by cvs magic I should have patches all instances of that file. If
I do that then all tests pass also on x86.

Cheers,

Mark

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-01-09 13:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-09 11:51 Alignment info for Elf test Mark Wielaard
2007-01-09 13:12 ` Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).