This is the mail archive of the frysk@sourceware.org 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: [SCM] master: 2008-03-17 Phil Muldoon <pmuldoon@redhat.com>


This commit fixes a test-case failure after the recent elfutils update. It was a small fix that changed the behavior to use getBytes() instead of accessing the ElfData directly. This should not, and never should have been the case. The next step is to limit the scope of that data structure and make sure to gate all access via get() routines.

Regards

Phil

pmuldoon@sourceware.org wrote:
The branch, master has been updated
       via  d8919fbb113772ebc987e74061e838879556d9c4 (commit)
      from  ec2bf1299f4d201f2452558aafd0880c680c729c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit d8919fbb113772ebc987e74061e838879556d9c4
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Mon Mar 17 17:33:00 2008 +0000

    2008-03-17  Phil Muldoon  <pmuldoon@redhat.com>
            * TestCorefileByteBuffer.java (testCorefileByteBufferSlice): Use
            getBytes(). Test for null returns.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/proc/dead/ChangeLog               |    5 ++++-
 .../frysk/proc/dead/TestCorefileByteBuffer.java    |    8 +++++---
 2 files changed, 9 insertions(+), 4 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/proc/dead/ChangeLog b/frysk-core/frysk/proc/dead/ChangeLog
index 9229a67..4f8ff90 100644
--- a/frysk-core/frysk/proc/dead/ChangeLog
+++ b/frysk-core/frysk/proc/dead/ChangeLog
@@ -1,5 +1,8 @@
-2008-03-17 Andrew Cagney <cagney@redhat.com>
+2008-03-17 Phil Muldoon <pmuldoon@redhat.com>
+ * TestCorefileByteBuffer.java (testCorefileByteBufferSlice): Use
+ getBytes(). Test for null returns.
+2008-03-17 Andrew Cagney <cagney@redhat.com>
* DeadHost.java: Update; using TaskAttachedObserverXXX;
* TestLinuxCore.java: Update.
* DeadTask.java: Ditto.
diff --git a/frysk-core/frysk/proc/dead/TestCorefileByteBuffer.java b/frysk-core/frysk/proc/dead/TestCorefileByteBuffer.java
index 1c2d3d2..aafe4bd 100644
--- a/frysk-core/frysk/proc/dead/TestCorefileByteBuffer.java
+++ b/frysk-core/frysk/proc/dead/TestCorefileByteBuffer.java
@@ -57,7 +57,7 @@ public class TestCorefileByteBuffer
public void testCorefileByteBufferSlice() throws ElfException
{
- ElfData rawData;
+ ElfData rawData = null;
final long sliceBottom = 0x411bb000L;
final long sliceTop = 0x411bbfffL;
final long elfOffset = 0x28000;
@@ -74,16 +74,18 @@ public class TestCorefileByteBuffer
// Independently get the elf core data as a raw image
Elf segment = new Elf(Config.getPkgDataFile("test-core-x86"),
ElfCommand.ELF_C_READ);
+ assertNotNull("Get Elf file for segment inspection", segment);
rawData = segment.getRawData(elfOffset,elfLen);
+ assertNotNull("RawData is not null", rawData);
+ byte[] byteSet = rawData.getBytes();
// coreSlice.position(sliceBottom);
for(int i=0; i<elfLen; i++)
assertEquals("Offset at 0x"+Long.toHexString(elfOffset+i)
+" does not match rawData at location " + Long.toHexString(i),
- rawData.internal_buffer[i],
+ byteSet[i],
coreSlice.get());
-
segment.close();
}



hooks/post-receive
--
frysk system monitor/debugger


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