DESCRIPTION

Generate trace in IOstructgenTest

Modification to be able to generate trace

Change-Id: I79e5100122f2be137da32625c0973f9418ae42e0
Signed-off-by: Kelsie Blackwell xxx@xxx.xxx

COMMENTS

author: Kelsie Blackwell
date: 2013-05-15 20:32:41.000000000

Uploaded patch set 4.

-------------------------------------
author: Brenden Conley
date: 2013-05-15 20:32:47.000000000

Patch Set 4:

Build Started https://hudson.eclipse.org/sandbox/job/linuxtools/2326/ 

-------------------------------------
author: Brenden Conley
date: 2013-05-15 20:57:51.000000000

Patch Set 4: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/linuxtools/2326/ : SUCCESS

-------------------------------------
author: Ivy Mitchell
date: 2013-05-17 16:50:17.000000000

Patch Set 4: Verified; I would prefer that you didn't submit this; IP review completed

(1 inline comment)



Line:399, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/IOstructgenTest.java -> Ok, after some review I think that data.rewind should be data.flip. 
Alex, what do you think?

-------------------------------------
author: Braxton Mccarthy
date: 2013-05-17 16:57:54.000000000

Patch Set 4: (4 inline comments)



Line:351, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/IOstructgenTest.java -> Sonar calls literals like these "magic numbers". As much as possible, they should be referred to with static final fields (like HEADER_SIZE, PACKET_SIZE, etc.) If we go back to this code in 6 months it'll be hard to figure out what 24 and 44 are.

Line:360, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/IOstructgenTest.java -> You have to call data.clear() before using it. Yeah, the ByteBuffer API is full of nitpicks like that...

Line:399, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/IOstructgenTest.java -> Yes it should be data.flip(), when you switch from buffer-filling mode to file-writing mode

(or inversely, when you switch from file-reading to buffer-emptying).

Line:420, lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/IOstructgenTest.java -> Good thing to call that. However it should go in a xxx@xxx.xxx method

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