DESCRIPTION

TMF: Add trace stub for TMF unit tests

This new trace type uses a custom XML definition and converts custom XML
events to TmfEvents, where the fields and their values are defined through the
XML fields. To illustrate, here is the content of each type of event:

CustomXmlEvent: fields = "a | b", values = "1 | abd"

would transpose to this

Development trace: a = 1, b = "abd"

This type of trace will be useful to unit test analyses involving LTTng kernel
and UST traces for instance.

Change-Id: I41ac7206c1a54088c998d551a4174f2184b05f5b
Signed-off-by: Aryana Jones xxx@xxx.xxx


COMMENTS

author: Annalise Jimenez
date: 2014-08-14 21:17:35.000000000

Uploaded patch set 17.

-------------------------------------
author: Brenden Conley
date: 2014-08-15 04:56:21.000000000

Patch Set 17:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/8308/

-------------------------------------
author: Brenden Conley
date: 2014-08-15 05:37:29.000000000

Patch Set 17: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/8308/ : SUCCESS

-------------------------------------
author: Braxton Mccarthy
date: 2014-09-19 22:07:43.000000000

Patch Set 17: Code-Review+1

(2 comments)

Check comments, some things to keep in mind. But I'd be ok with merging this as-is. It's been here long enough ;)

Line:44, lttng/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/stub/XmlStubTraceTest.java -> There's a "cleaner" way to do this, see https://git.eclipse.org/r/32965 . This ensures that the tests will work when run from any working directory (and not just ./ or ../*/ )

But both Maven and alltests work with this, so for now I think it's good enough.

Line:181, lttng/org.eclipse.linuxtools.tmf.core.tests/stubs/org/eclipse/linuxtools/tmf/tests/stubs/trace/xml/TmfXmlTraceStub.java -> I know this is how it's done in the current kernel state provider, but it's quite unsafe because:

1- The field may exist but be of a different type, which would throw a ClassCastException.
2- The field may not even exist, and .getValue() would throw a NPE.

Ideally there should be a private static method that does these checks, so that values can be read safely. Up to you if you want to do it now or not.

-------------------------------------
author: Annalise Jimenez
date: 2014-09-22 13:44:49.000000000

Patch Set 17: Code-Review+2

After a quarantine of... oh my god, since january! I'll take that +1 and push it ;-) and address the comments in a later patch.

-------------------------------------
author: Gerrit Code Review
date: 2014-09-22 13:44:51.000000000

The change could not be merged due to a path conflict.

Please rebase the change locally and upload the rebased commit for review.

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