tests: src.ctf.fs: add 2packets test trace
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 12 Jul 2019 19:30:25 +0000 (15:30 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 13 Jul 2019 14:44:19 +0000 (10:44 -0400)
This test trace is used to test the regression fixed by following
commit:

commit de38c26a14b60cb3b6d31cc124c187e2c1816bf5
Author: Francis Deslauriers <francis.deslauriers@efficios.com>
Date:   Fri Jul 5 11:19:32 2019 -0400

    Fix: src.ctf.fs: pointer arithmetics on non-adjacent memory

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I0c625905417d39339642a5c7fb31ceaa84ff5832
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1700
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-by: Michael Jeanson <mjeanson@efficios.com>
tests/data/ctf-traces/succeed/2packets/channel0_2 [new file with mode: 0644]
tests/data/ctf-traces/succeed/2packets/index/channel0_2.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/2packets/metadata [new file with mode: 0644]
tests/data/plugins/src.ctf.fs/succeed/trace-2packets.expect [new file with mode: 0644]
tests/plugins/src.ctf.fs/succeed/test_succeed

diff --git a/tests/data/ctf-traces/succeed/2packets/channel0_2 b/tests/data/ctf-traces/succeed/2packets/channel0_2
new file mode 100644 (file)
index 0000000..6f895c9
Binary files /dev/null and b/tests/data/ctf-traces/succeed/2packets/channel0_2 differ
diff --git a/tests/data/ctf-traces/succeed/2packets/index/channel0_2.idx b/tests/data/ctf-traces/succeed/2packets/index/channel0_2.idx
new file mode 100644 (file)
index 0000000..6a4c6da
Binary files /dev/null and b/tests/data/ctf-traces/succeed/2packets/index/channel0_2.idx differ
diff --git a/tests/data/ctf-traces/succeed/2packets/metadata b/tests/data/ctf-traces/succeed/2packets/metadata
new file mode 100644 (file)
index 0000000..0c7f2e3
Binary files /dev/null and b/tests/data/ctf-traces/succeed/2packets/metadata differ
diff --git a/tests/data/plugins/src.ctf.fs/succeed/trace-2packets.expect b/tests/data/plugins/src.ctf.fs/succeed/trace-2packets.expect
new file mode 100644 (file)
index 0000000..9b5bb6a
--- /dev/null
@@ -0,0 +1,79 @@
+Trace class:
+  Stream class (ID 0):
+    Supports packets: Yes
+    Packets have beginning default clock snapshot: Yes
+    Packets have end default clock snapshot: Yes
+    Supports discarded events: Yes
+    Discarded events have default clock snapshots: Yes
+    Supports discarded packets: Yes
+    Discarded packets have default clock snapshots: Yes
+    Default clock class:
+      Name: monotonic
+      Description: Monotonic Clock
+      Frequency (Hz): 1,000,000,000
+      Precision (cycles): 0
+      Offset (s): 1,561,498,843
+      Offset (cycles): 433,067,926
+      Origin is Unix epoch: Yes
+      UUID: db965ea1-f862-45a3-ab65-602642fdad90
+    Packet context field class: Structure (1 member):
+      cpu_id: Unsigned integer (32-bit, Base 10)
+    Event common context field class: Structure (1 member):
+      vpid: Signed integer (32-bit, Base 10)
+    Event class `lttng_ust_statedump:procname` (ID 0):
+      Log level: Debug (line)
+      Payload field class: Structure (1 member):
+        procname: String
+
+[Unknown]
+{Trace 0, Stream class ID 0, Stream ID 2}
+Stream beginning:
+  Trace:
+    UUID: 0f37a32b-1796-408d-b723-bd27b45921c6
+    Environment (5 entries):
+      domain: ust
+      hostname: joraj-alpa
+      tracer_major: 2
+      tracer_minor: 11
+      tracer_name: lttng-ust
+    Stream (ID 2, Class ID 0)
+
+[257,960,472,138,367 cycles, 1,561,756,803,905,206,293 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 2}
+Packet beginning:
+  Context:
+    cpu_id: 2
+
+[257,960,490,358,932 cycles, 1,561,756,803,923,426,858 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 2}
+Event `lttng_ust_statedump:procname` (Class ID 0):
+  Common context:
+    vpid: 15,062
+  Payload:
+    procname: sample-ust
+
+[257,963,419,223,089 cycles, 1,561,756,806,852,291,015 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 2}
+Packet end
+
+[257,971,894,873,186 cycles, 1,561,756,815,327,941,112 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 2}
+Packet beginning:
+  Context:
+    cpu_id: 2
+
+[257,971,894,873,186 cycles, 1,561,756,815,327,941,112 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 2}
+Event `lttng_ust_statedump:procname` (Class ID 0):
+  Common context:
+    vpid: 15,062
+  Payload:
+    procname: sample-ust
+
+[257,974,030,386,677 cycles, 1,561,756,817,463,454,603 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 2}
+Packet end
+
+[Unknown]
+{Trace 0, Stream class ID 0, Stream ID 2}
+Stream end
index 4b4387856c8d87de28168a7e535f1bb8d7cc9c84..a0e06d4446806210e09714b16af24f8ff5c9dd5d 100755 (executable)
@@ -58,7 +58,8 @@ test_ctf_single() {
        ok $? "Trace '$name' gives the expected output"
 }
 
-plan_tests 2
+plan_tests 3
 
 test_ctf_gen_single simple
 test_ctf_single smalltrace
+test_ctf_single 2packets
This page took 0.026573 seconds and 4 git commands to generate.