DESCRIPTION

TMF: Add XML-defined CTF-like trace class for unit tests

As a developer, I want to unit test some complex analysis on very specific
scenarios, mostly for CTF traces. Even the simplest tracer-generated trace is
too complex to provide unit test material, we have to manually inspect it and
find a place where the scenarios happen and that is error-prone.

This patch provides a class that uses the customXmlTrace functionnalities, with
a pre-defined format definition and XSD to generate XML traces for it. But the
events this class returns are transformed so that the customXmlEvent parsed by
the trace (with a unique name and fixed fields for all events) are more
CTF-like, with fields different for each event.

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


COMMENTS

author: Annalise Jimenez
date: 2014-01-29 19:00:41.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2014-01-29 19:00:46.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2014-01-29 19:56:31.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Ivy Mitchell
date: 2014-01-30 15:18:30.000000000

Patch Set 2: Code-Review-1

(4 comments)

Line:10, /COMMIT_MSG -> I don't see the link to CTF. 

It seems to be more of an LTTng or os Kernel Xml trace you are making.

Line:55, lttng/org.eclipse.linuxtools.tmf.ui.tests/shared/org/eclipse/linuxtools/tmf/ui/tests/shared/FakeCtfXmlTestTrace.java -> Not that hot on the name "fake" also how is this ctf? Is it not : GenevieveXmlTraceFormat? GXTF?

Line:18, lttng/org.eclipse.linuxtools.tmf.ui.tests/tracesets/xml/customXmlTraceDefinition.xsd -> Do we want tabs in XML? I am asking.

Line:4, lttng/org.eclipse.linuxtools.tmf.ui.tests/tracesets/xml/customXmlTraceDefinition.xml -> Why link this to CTF? I don't see it.

-------------------------------------
author: Annalise Jimenez
date: 2014-01-31 20:19:10.000000000

Patch Set 2:

(1 comment)

Ok you're right, CTF is just the use case we have, but it can be any kind of trace.

And after yesterday's discussion, I'll revise the whole thing. It won't be in unit tests, but in the main TMF, because that's a feature that will be useful for testing XML-defined analysis with hand-made traces.

So here's the plan/requirements:

1- Analysis use event requests and events are the primary object they handle, so we don't give a flute if it came from a real CTF trace with streams and metadata or if it came from a hand made text file, as long as they have the right names and fields, that's all that matters

2- While hand-made traces can test very specific (and small) cases, we may also wish to take a (part of a) real CTF trace, convert it to text, tweak it and use it (no need, in TMF at least, to convert it back to CTF).

3- As the problem of making custom traces is not TMF-specific, other tools from the LTTng toolchain may do part of the CTF to text or text to CTF job. Any file format for the text I choose should play nice with what is already there or planned it those other tools.

4- I'll investigate what already exists, email the lttng-dev mailing list about it and propose something more complete and clean.

5- In the meantime, this patch will be available in the luna-dorsal branch so Francis and Mohamad can unit test their analyses.

Line:18, lttng/org.eclipse.linuxtools.tmf.ui.tests/tracesets/xml/customXmlTraceDefinition.xsd -> Yes, all XML files have tabs

-------------------------------------
author: Ivy Mitchell
date: 2014-01-31 20:26:39.000000000

Patch Set 2:

That sounds great. If you need any help, don't hesitate to ping us.

-------------------------------------
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.

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