public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: frysk@sourceware.org
Subject: Alignment info for Elf test
Date: Tue, 09 Jan 2007 11:51:00 -0000	[thread overview]
Message-ID: <1168343476.3033.6.camel@dijkstra.wildebeest.org> (raw)

[-- 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());

             reply	other threads:[~2007-01-09 11:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-09 11:51 Mark Wielaard [this message]
2007-01-09 13:12 ` Mark Wielaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1168343476.3033.6.camel@dijkstra.wildebeest.org \
    --to=mark@klomp.org \
    --cc=frysk@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).