tests/config/fail/metadata: add multiple streams, no stream_id
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 26 Mar 2016 06:59:17 +0000 (02:59 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 26 Mar 2016 06:59:17 +0000 (02:59 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
tests/config/fail/metadata/fail.bats
tests/config/fail/metadata/multiple-streams-trace-ph-no-stream-id.yaml [new file with mode: 0644]

index 46d63715c92f5addc0e43fca7467272ae0c606cd..f9a13756902ac0518e39a184448842896c5b3894 100644 (file)
@@ -82,3 +82,8 @@ load ../../common
   barectf_assert_file_exists streams-key-invalid-identifier.yaml
   barectf_config_check_fail
 }
+
+@test 'multiple streams in metadata object with missing "stream_id" packet header type field makes barectf fail' {
+  barectf_assert_file_exists multiple-streams-trace-ph-no-stream-id.yaml
+  barectf_config_check_fail
+}
diff --git a/tests/config/fail/metadata/multiple-streams-trace-ph-no-stream-id.yaml b/tests/config/fail/metadata/multiple-streams-trace-ph-no-stream-id.yaml
new file mode 100644 (file)
index 0000000..6f140d2
--- /dev/null
@@ -0,0 +1,32 @@
+version: '2.1'
+metadata:
+  $include:
+    - stdint.yaml
+    - stdmisc.yaml
+  type-aliases:
+    pct:
+      class: struct
+      fields:
+        packet_size: uint32
+        content_size: uint32
+    pt:
+      class: struct
+      fields:
+        a: uint32
+  trace:
+    byte-order: le
+    packet-header-type:
+      class: struct
+      fields:
+        magic: ctf-magic
+  streams:
+    s1:
+      packet-context-type: pct
+      events:
+        ev1:
+          payload-type: pt
+    s2:
+      packet-context-type: pct
+      events:
+        ev2:
+          payload-type: pt
This page took 0.023548 seconds and 4 git commands to generate.