tests: Move data files to a common directory
authorMichael Jeanson <mjeanson@efficios.com>
Thu, 13 Jun 2019 20:18:40 +0000 (16:18 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 21 Jun 2019 16:57:18 +0000 (12:57 -0400)
  * Reduce errors when adding new data files, a single EXTRA_DIST
    directive in tests/Makefile.am will cover all data files
  * Standardise variables used to refer to the data files path and add
    them to 'utils/common.sh'.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Change-Id: I5fd06e5280e5864593aca8e964eeda9121b8a48e
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1428
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
222 files changed:
tests/Makefile.am
tests/bindings/python/bt2/test_python_bt2.in
tests/bindings/python/bt2/test_trace_collection_message_iterator.py
tests/cli/test_intersection.in
tests/cli/test_output_ctf_metadata.in
tests/cli/test_output_ctf_metadata.ref [deleted file]
tests/cli/test_packet_seq_num.in
tests/cli/test_trace_copy.in
tests/cli/test_trace_read.in
tests/cli/test_trimmer.in
tests/ctf-traces/fail/fail1/dummystream [deleted file]
tests/ctf-traces/fail/fail1/metadata [deleted file]
tests/ctf-traces/fail/fail2/metadata [deleted file]
tests/ctf-traces/fail/integer-range/metadata [deleted file]
tests/ctf-traces/fail/lttng-modules-2.0-pre1/metadata [deleted file]
tests/ctf-traces/fail/packet-based-metadata/metadata [deleted file]
tests/ctf-traces/fail/smalltrace/dummystream-fail [deleted file]
tests/ctf-traces/fail/smalltrace/metadata [deleted file]
tests/ctf-traces/intersection/3eventsintersect/metadata [deleted file]
tests/ctf-traces/intersection/3eventsintersect/test_stream_0 [deleted file]
tests/ctf-traces/intersection/3eventsintersect/test_stream_1 [deleted file]
tests/ctf-traces/intersection/3eventsintersectreverse/metadata [deleted file]
tests/ctf-traces/intersection/3eventsintersectreverse/test_stream_0 [deleted file]
tests/ctf-traces/intersection/3eventsintersectreverse/test_stream_1 [deleted file]
tests/ctf-traces/intersection/nointersect/metadata [deleted file]
tests/ctf-traces/intersection/nointersect/test_stream_0 [deleted file]
tests/ctf-traces/intersection/nointersect/test_stream_1 [deleted file]
tests/ctf-traces/intersection/nostream/metadata [deleted file]
tests/ctf-traces/intersection/onestream/metadata [deleted file]
tests/ctf-traces/intersection/onestream/test_stream_0 [deleted file]
tests/ctf-traces/packet_seq_num/2_lost_before_last/metadata [deleted file]
tests/ctf-traces/packet_seq_num/2_lost_before_last/test_stream_0 [deleted file]
tests/ctf-traces/packet_seq_num/2_streams_lost_in_1/metadata [deleted file]
tests/ctf-traces/packet_seq_num/2_streams_lost_in_1/test_stream_0 [deleted file]
tests/ctf-traces/packet_seq_num/2_streams_lost_in_1/test_stream_1 [deleted file]
tests/ctf-traces/packet_seq_num/2_streams_lost_in_2/metadata [deleted file]
tests/ctf-traces/packet_seq_num/2_streams_lost_in_2/test_stream_0 [deleted file]
tests/ctf-traces/packet_seq_num/2_streams_lost_in_2/test_stream_1 [deleted file]
tests/ctf-traces/packet_seq_num/no_lost/metadata [deleted file]
tests/ctf-traces/packet_seq_num/no_lost/test_stream_0 [deleted file]
tests/ctf-traces/packet_seq_num/no_lost_not_starting_at_0/metadata [deleted file]
tests/ctf-traces/packet_seq_num/no_lost_not_starting_at_0/test_stream_0 [deleted file]
tests/ctf-traces/succeed/env-warning/dummystream [deleted file]
tests/ctf-traces/succeed/env-warning/metadata [deleted file]
tests/ctf-traces/succeed/ev-disc-no-ts-begin-end/metadata [deleted file]
tests/ctf-traces/succeed/ev-disc-no-ts-begin-end/stream [deleted file]
tests/ctf-traces/succeed/no-packet-context/metadata [deleted file]
tests/ctf-traces/succeed/no-packet-context/stream [deleted file]
tests/ctf-traces/succeed/sequence/channel0_0 [deleted file]
tests/ctf-traces/succeed/sequence/channel0_1 [deleted file]
tests/ctf-traces/succeed/sequence/channel0_2 [deleted file]
tests/ctf-traces/succeed/sequence/channel0_3 [deleted file]
tests/ctf-traces/succeed/sequence/metadata [deleted file]
tests/ctf-traces/succeed/smalltrace/dummystream [deleted file]
tests/ctf-traces/succeed/smalltrace/metadata [deleted file]
tests/ctf-traces/succeed/succeed1/dummystream [deleted file]
tests/ctf-traces/succeed/succeed1/metadata [deleted file]
tests/ctf-traces/succeed/succeed2/dummystream [deleted file]
tests/ctf-traces/succeed/succeed2/metadata [deleted file]
tests/ctf-traces/succeed/succeed3/dummystream [deleted file]
tests/ctf-traces/succeed/succeed3/metadata [deleted file]
tests/ctf-traces/succeed/succeed4/metadata [deleted file]
tests/ctf-traces/succeed/warnings/dummystream [deleted file]
tests/ctf-traces/succeed/warnings/metadata [deleted file]
tests/ctf-traces/succeed/wk-heartbeat-u/metadata [deleted file]
tests/ctf-traces/succeed/wk-heartbeat-u/u_0 [deleted file]
tests/ctf-traces/succeed/wk-heartbeat-u/u_1 [deleted file]
tests/ctf-traces/succeed/wk-heartbeat-u/u_2 [deleted file]
tests/ctf-traces/succeed/wk-heartbeat-u/u_3 [deleted file]
tests/ctf-traces/succeed/wk-heartbeat-u/u_4 [deleted file]
tests/ctf-traces/succeed/wk-heartbeat-u/u_5 [deleted file]
tests/ctf-traces/succeed/wk-heartbeat-u/u_6 [deleted file]
tests/ctf-traces/succeed/wk-heartbeat-u/u_7 [deleted file]
tests/data/cli/test_output_ctf_metadata.ref [new file with mode: 0644]
tests/data/ctf-traces/fail/fail1/dummystream [new file with mode: 0644]
tests/data/ctf-traces/fail/fail1/metadata [new file with mode: 0644]
tests/data/ctf-traces/fail/fail2/metadata [new file with mode: 0644]
tests/data/ctf-traces/fail/integer-range/metadata [new file with mode: 0644]
tests/data/ctf-traces/fail/lttng-modules-2.0-pre1/metadata [new file with mode: 0644]
tests/data/ctf-traces/fail/packet-based-metadata/metadata [new file with mode: 0644]
tests/data/ctf-traces/fail/smalltrace/dummystream-fail [new file with mode: 0644]
tests/data/ctf-traces/fail/smalltrace/metadata [new file with mode: 0644]
tests/data/ctf-traces/intersection/3eventsintersect/metadata [new file with mode: 0644]
tests/data/ctf-traces/intersection/3eventsintersect/test_stream_0 [new file with mode: 0644]
tests/data/ctf-traces/intersection/3eventsintersect/test_stream_1 [new file with mode: 0644]
tests/data/ctf-traces/intersection/3eventsintersectreverse/metadata [new file with mode: 0644]
tests/data/ctf-traces/intersection/3eventsintersectreverse/test_stream_0 [new file with mode: 0644]
tests/data/ctf-traces/intersection/3eventsintersectreverse/test_stream_1 [new file with mode: 0644]
tests/data/ctf-traces/intersection/nointersect/metadata [new file with mode: 0644]
tests/data/ctf-traces/intersection/nointersect/test_stream_0 [new file with mode: 0644]
tests/data/ctf-traces/intersection/nointersect/test_stream_1 [new file with mode: 0644]
tests/data/ctf-traces/intersection/nostream/metadata [new file with mode: 0644]
tests/data/ctf-traces/intersection/onestream/metadata [new file with mode: 0644]
tests/data/ctf-traces/intersection/onestream/test_stream_0 [new file with mode: 0644]
tests/data/ctf-traces/packet_seq_num/2_lost_before_last/metadata [new file with mode: 0644]
tests/data/ctf-traces/packet_seq_num/2_lost_before_last/test_stream_0 [new file with mode: 0644]
tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_1/metadata [new file with mode: 0644]
tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_1/test_stream_0 [new file with mode: 0644]
tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_1/test_stream_1 [new file with mode: 0644]
tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_2/metadata [new file with mode: 0644]
tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_2/test_stream_0 [new file with mode: 0644]
tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_2/test_stream_1 [new file with mode: 0644]
tests/data/ctf-traces/packet_seq_num/no_lost/metadata [new file with mode: 0644]
tests/data/ctf-traces/packet_seq_num/no_lost/test_stream_0 [new file with mode: 0644]
tests/data/ctf-traces/packet_seq_num/no_lost_not_starting_at_0/metadata [new file with mode: 0644]
tests/data/ctf-traces/packet_seq_num/no_lost_not_starting_at_0/test_stream_0 [new file with mode: 0644]
tests/data/ctf-traces/succeed/env-warning/dummystream [new file with mode: 0644]
tests/data/ctf-traces/succeed/env-warning/metadata [new file with mode: 0644]
tests/data/ctf-traces/succeed/ev-disc-no-ts-begin-end/metadata [new file with mode: 0644]
tests/data/ctf-traces/succeed/ev-disc-no-ts-begin-end/stream [new file with mode: 0644]
tests/data/ctf-traces/succeed/no-packet-context/metadata [new file with mode: 0644]
tests/data/ctf-traces/succeed/no-packet-context/stream [new file with mode: 0644]
tests/data/ctf-traces/succeed/sequence/channel0_0 [new file with mode: 0644]
tests/data/ctf-traces/succeed/sequence/channel0_1 [new file with mode: 0644]
tests/data/ctf-traces/succeed/sequence/channel0_2 [new file with mode: 0644]
tests/data/ctf-traces/succeed/sequence/channel0_3 [new file with mode: 0644]
tests/data/ctf-traces/succeed/sequence/metadata [new file with mode: 0644]
tests/data/ctf-traces/succeed/smalltrace/dummystream [new file with mode: 0644]
tests/data/ctf-traces/succeed/smalltrace/metadata [new file with mode: 0644]
tests/data/ctf-traces/succeed/succeed1/dummystream [new file with mode: 0644]
tests/data/ctf-traces/succeed/succeed1/metadata [new file with mode: 0644]
tests/data/ctf-traces/succeed/succeed2/dummystream [new file with mode: 0644]
tests/data/ctf-traces/succeed/succeed2/metadata [new file with mode: 0644]
tests/data/ctf-traces/succeed/succeed3/dummystream [new file with mode: 0644]
tests/data/ctf-traces/succeed/succeed3/metadata [new file with mode: 0644]
tests/data/ctf-traces/succeed/succeed4/metadata [new file with mode: 0644]
tests/data/ctf-traces/succeed/warnings/dummystream [new file with mode: 0644]
tests/data/ctf-traces/succeed/warnings/metadata [new file with mode: 0644]
tests/data/ctf-traces/succeed/wk-heartbeat-u/metadata [new file with mode: 0644]
tests/data/ctf-traces/succeed/wk-heartbeat-u/u_0 [new file with mode: 0644]
tests/data/ctf-traces/succeed/wk-heartbeat-u/u_1 [new file with mode: 0644]
tests/data/ctf-traces/succeed/wk-heartbeat-u/u_2 [new file with mode: 0644]
tests/data/ctf-traces/succeed/wk-heartbeat-u/u_3 [new file with mode: 0644]
tests/data/ctf-traces/succeed/wk-heartbeat-u/u_4 [new file with mode: 0644]
tests/data/ctf-traces/succeed/wk-heartbeat-u/u_5 [new file with mode: 0644]
tests/data/ctf-traces/succeed/wk-heartbeat-u/u_6 [new file with mode: 0644]
tests/data/ctf-traces/succeed/wk-heartbeat-u/u_7 [new file with mode: 0644]
tests/data/debug-info/Makefile [new file with mode: 0644]
tests/data/debug-info/README.md [new file with mode: 0644]
tests/data/debug-info/i386-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug [new file with mode: 0755]
tests/data/debug-info/i386-linux-gnu/build_id/libhello_so [new file with mode: 0755]
tests/data/debug-info/i386-linux-gnu/debug_link/libhello_so [new file with mode: 0755]
tests/data/debug-info/i386-linux-gnu/debug_link/libhello_so.debug [new file with mode: 0755]
tests/data/debug-info/i386-linux-gnu/dwarf_full/libhello_so [new file with mode: 0755]
tests/data/debug-info/i386-linux-gnu/elf_only/libhello_so [new file with mode: 0755]
tests/data/debug-info/libhello.c [new file with mode: 0644]
tests/data/debug-info/libhello.h [new file with mode: 0644]
tests/data/debug-info/main.c [new file with mode: 0644]
tests/data/debug-info/powerpc-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug [new file with mode: 0755]
tests/data/debug-info/powerpc-linux-gnu/build_id/libhello_so [new file with mode: 0755]
tests/data/debug-info/powerpc-linux-gnu/debug_link/libhello_so [new file with mode: 0755]
tests/data/debug-info/powerpc-linux-gnu/debug_link/libhello_so.debug [new file with mode: 0755]
tests/data/debug-info/powerpc-linux-gnu/dwarf_full/libhello_so [new file with mode: 0755]
tests/data/debug-info/powerpc-linux-gnu/elf_only/libhello_so [new file with mode: 0755]
tests/data/debug-info/powerpc64le-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug [new file with mode: 0755]
tests/data/debug-info/powerpc64le-linux-gnu/build_id/libhello_so [new file with mode: 0755]
tests/data/debug-info/powerpc64le-linux-gnu/debug_link/libhello_so [new file with mode: 0755]
tests/data/debug-info/powerpc64le-linux-gnu/debug_link/libhello_so.debug [new file with mode: 0755]
tests/data/debug-info/powerpc64le-linux-gnu/dwarf_full/libhello_so [new file with mode: 0755]
tests/data/debug-info/powerpc64le-linux-gnu/elf_only/libhello_so [new file with mode: 0755]
tests/data/debug-info/tp.c [new file with mode: 0644]
tests/data/debug-info/tp.h [new file with mode: 0644]
tests/data/debug-info/trace/metadata [new file with mode: 0644]
tests/data/debug-info/trace/stream_0_0 [new file with mode: 0644]
tests/data/debug-info/x86_64-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug [new file with mode: 0755]
tests/data/debug-info/x86_64-linux-gnu/build_id/libhello_so [new file with mode: 0755]
tests/data/debug-info/x86_64-linux-gnu/debug_link/libhello_so [new file with mode: 0755]
tests/data/debug-info/x86_64-linux-gnu/debug_link/libhello_so.debug [new file with mode: 0755]
tests/data/debug-info/x86_64-linux-gnu/dwarf_full/libhello_so [new file with mode: 0755]
tests/data/debug-info/x86_64-linux-gnu/elf_only/libhello_so [new file with mode: 0755]
tests/data/plugins/src.ctf.fs/succeed/trace-simple.expect [new file with mode: 0644]
tests/data/plugins/src.ctf.fs/succeed/trace-smalltrace.expect [new file with mode: 0644]
tests/debug-info-data/Makefile [deleted file]
tests/debug-info-data/README.md [deleted file]
tests/debug-info-data/i386-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug [deleted file]
tests/debug-info-data/i386-linux-gnu/build_id/libhello_so [deleted file]
tests/debug-info-data/i386-linux-gnu/debug_link/libhello_so [deleted file]
tests/debug-info-data/i386-linux-gnu/debug_link/libhello_so.debug [deleted file]
tests/debug-info-data/i386-linux-gnu/dwarf_full/libhello_so [deleted file]
tests/debug-info-data/i386-linux-gnu/elf_only/libhello_so [deleted file]
tests/debug-info-data/libhello.c [deleted file]
tests/debug-info-data/libhello.h [deleted file]
tests/debug-info-data/main.c [deleted file]
tests/debug-info-data/powerpc-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug [deleted file]
tests/debug-info-data/powerpc-linux-gnu/build_id/libhello_so [deleted file]
tests/debug-info-data/powerpc-linux-gnu/debug_link/libhello_so [deleted file]
tests/debug-info-data/powerpc-linux-gnu/debug_link/libhello_so.debug [deleted file]
tests/debug-info-data/powerpc-linux-gnu/dwarf_full/libhello_so [deleted file]
tests/debug-info-data/powerpc-linux-gnu/elf_only/libhello_so [deleted file]
tests/debug-info-data/powerpc64le-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug [deleted file]
tests/debug-info-data/powerpc64le-linux-gnu/build_id/libhello_so [deleted file]
tests/debug-info-data/powerpc64le-linux-gnu/debug_link/libhello_so [deleted file]
tests/debug-info-data/powerpc64le-linux-gnu/debug_link/libhello_so.debug [deleted file]
tests/debug-info-data/powerpc64le-linux-gnu/dwarf_full/libhello_so [deleted file]
tests/debug-info-data/powerpc64le-linux-gnu/elf_only/libhello_so [deleted file]
tests/debug-info-data/tp.c [deleted file]
tests/debug-info-data/tp.h [deleted file]
tests/debug-info-data/trace/metadata [deleted file]
tests/debug-info-data/trace/stream_0_0 [deleted file]
tests/debug-info-data/x86_64-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug [deleted file]
tests/debug-info-data/x86_64-linux-gnu/build_id/libhello_so [deleted file]
tests/debug-info-data/x86_64-linux-gnu/debug_link/libhello_so [deleted file]
tests/debug-info-data/x86_64-linux-gnu/debug_link/libhello_so.debug [deleted file]
tests/debug-info-data/x86_64-linux-gnu/dwarf_full/libhello_so [deleted file]
tests/debug-info-data/x86_64-linux-gnu/elf_only/libhello_so [deleted file]
tests/plugins/flt.lttng-utils.debug-info/test_bin_info_i386-linux-gnu.in
tests/plugins/flt.lttng-utils.debug-info/test_bin_info_powerpc-linux-gnu.in
tests/plugins/flt.lttng-utils.debug-info/test_bin_info_powerpc64le-linux-gnu.in
tests/plugins/flt.lttng-utils.debug-info/test_bin_info_x86_64-linux-gnu.in
tests/plugins/flt.lttng-utils.debug-info/test_dwarf_i386-linux-gnu.in
tests/plugins/flt.lttng-utils.debug-info/test_dwarf_powerpc-linux-gnu.in
tests/plugins/flt.lttng-utils.debug-info/test_dwarf_powerpc64le-linux-gnu.in
tests/plugins/flt.lttng-utils.debug-info/test_dwarf_x86_64-linux-gnu.in
tests/plugins/flt.lttng-utils.debug-info/test_lttng_utils_debug_info.in
tests/plugins/flt.lttng-utils.debug-info/test_lttng_utils_debug_info.py
tests/plugins/src.ctf.fs/query/test_query_trace_info.py
tests/plugins/src.ctf.fs/succeed/Makefile.am
tests/plugins/src.ctf.fs/succeed/test_succeed.in
tests/plugins/src.ctf.fs/succeed/trace-simple.expect [deleted file]
tests/plugins/src.ctf.fs/succeed/trace-smalltrace.expect [deleted file]
tests/utils/common.sh.in
tests/utils/test_python_bt2_env.in

index 60694d9357bba02ba706a75c0e0c84ba09c83609..92472785f69984de864c5b3d0edc7acab3c60eb1 100644 (file)
@@ -1,8 +1,7 @@
 SUBDIRS = utils lib ctf-writer plugins
 
 # Directories added to EXTRA_DIST will be recursively copied to the distribution.
-EXTRA_DIST = $(srcdir)/ctf-traces \
-            $(srcdir)/debug-info-data \
+EXTRA_DIST = $(srcdir)/data \
             bindings/python/bt2/.coveragerc
 
 dist_check_SCRIPTS = \
index e9941018d2fcbff695949940787ec9e9e9e3c8c5..a067f7fbb2bf82f6d2a1a9be83edb9760c6072fc 100644 (file)
@@ -27,7 +27,8 @@ check_coverage() {
 export BABELTRACE_PYTHON_BT2_NO_TRACEBACK=1
 export TEST_PLUGIN_PLUGINS_PATH="${BT_BUILD_PATH}/src/plugins"
 export BABELTRACE_PLUGIN_PATH="${BT_BUILD_PATH}/src/plugins/ctf:${BT_BUILD_PATH}/src/plugins/utils:${BT_BUILD_PATH}/src/plugins/text"
-export TEST_CTF_TRACES_PATH="${BT_SRC_PATH}/tests/ctf-traces"
+export BT_CTF_TRACES_PATH
+
 PYTHON_BUILD_DIR="${BT_BUILD_PATH}/src/bindings/python/bt2/build/build_lib"
 TESTS_UTILS_PYTHON_DIR="${BT_SRC_PATH}/tests/utils/python"
 TESTRUNNER_PY="${BT_SRC_PATH}/tests/utils/python/testrunner.py"
index e30cad4332ca3b4dda88d83985480e95eaf36f0b..64a974dc5e30d26b95bb080a6223a15a3ac16680 100644 (file)
@@ -5,8 +5,8 @@ import os
 import os.path
 
 
-_TEST_CTF_TRACES_PATH = os.environ['TEST_CTF_TRACES_PATH']
-_3EVENTS_INTERSECT_TRACE_PATH = os.path.join(_TEST_CTF_TRACES_PATH,
+_BT_CTF_TRACES_PATH = os.environ['BT_CTF_TRACES_PATH']
+_3EVENTS_INTERSECT_TRACE_PATH = os.path.join(_BT_CTF_TRACES_PATH,
                                              'intersection',
                                              '3eventsintersect')
 
index 7cea9be7eb12b29f31ddfca671ba22aa1b526498..b84ec8abeb5887dee42f091af71959afab632184 100644 (file)
@@ -35,16 +35,16 @@ test_intersect() {
 diag "Test the stream intersection feature"
 
 diag "2 streams offsetted with 3 packets intersecting"
-test_intersect "${BT_CTF_TRACES}/intersection/3eventsintersect" 8 3
+test_intersect "${BT_CTF_TRACES_PATH}/intersection/3eventsintersect" 8 3
 
 diag "2 streams offsetted with 3 packets intersecting (exchanged file names)"
-test_intersect "${BT_CTF_TRACES}/intersection/3eventsintersectreverse" 8 3
+test_intersect "${BT_CTF_TRACES_PATH}/intersection/3eventsintersectreverse" 8 3
 
 diag "No intersection between 2 streams"
-test_intersect "${BT_CTF_TRACES}/intersection/nointersect" 6 0
+test_intersect "${BT_CTF_TRACES_PATH}/intersection/nointersect" 6 0
 
 diag "Only 1 stream"
-test_intersect "${BT_CTF_TRACES}/intersection/onestream" 3 3
+test_intersect "${BT_CTF_TRACES_PATH}/intersection/onestream" 3 3
 
 diag "No stream at all"
-test_intersect "${BT_CTF_TRACES}/intersection/nostream" 0 0
+test_intersect "${BT_CTF_TRACES_PATH}/intersection/nostream" 0 0
index d01be19be3e88af10741b876c4dcb92da25ad596..e39bbc49928dce59f5c13499085f6a0d9746f4f2 100644 (file)
@@ -25,12 +25,12 @@ plan_tests $NUM_TESTS
 tmp_metadata=$(mktemp)
 
 # Test a valid trace directory.
-"${BT_BIN}" -o ctf-metadata "${BT_CTF_TRACES}/succeed/wk-heartbeat-u" > "$tmp_metadata"
+"${BT_BIN}" -o ctf-metadata "${BT_CTF_TRACES_PATH}/succeed/wk-heartbeat-u" > "$tmp_metadata"
 ok $? "Run babeltrace -o ctf-metadata with a valid trace directory, correct exit status"
 
-cmp -s "$tmp_metadata" "${BT_SRC_PATH}/tests/cli/test_output_ctf_metadata.ref"
+cmp -s "$tmp_metadata" "${BT_SRC_PATH}/tests/data/cli/test_output_ctf_metadata.ref"
 ok $? "Run babeltrace -o ctf-metadata with a valid trace directory, correct output"
 
 # Test an invalid trace directory.
-"${BT_BIN}" -o ctf-metadata "${BT_CTF_TRACES}" &> /dev/null
+"${BT_BIN}" -o ctf-metadata "${BT_CTF_TRACES_PATH}" &> /dev/null
 isnt $? 0 "Run babeltrace -o ctf-metadata with an invalid trace directory, expecting failure"
diff --git a/tests/cli/test_output_ctf_metadata.ref b/tests/cli/test_output_ctf_metadata.ref
deleted file mode 100644 (file)
index 01dbf3f..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-/* CTF 1.8 */
-
-typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
-typealias integer { size = 16; align = 8; signed = false; } := uint16_t;
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-typealias integer { size = 64; align = 8; signed = false; } := uint64_t;
-typealias integer { size = 5; align = 1; signed = false; } := uint5_t;
-typealias integer { size = 27; align = 1; signed = false; } := uint27_t;
-
-trace {
-       major = 1;
-       minor = 8;
-       uuid = "624b19d9-19cd-4eae-bab8-8342e1b96a5d";
-       byte_order = le;
-       packet.header := struct {
-               uint32_t magic;
-               uint8_t  uuid[16];
-               uint32_t stream_id;
-       };
-};
-
-env {
-       vpid = 3208;
-       procname = "wk-heartbeat";
-       domain = "ust";
-       tracer_name = "lttng-ust";
-       tracer_major = 2;
-       tracer_minor = 0;
-       tracer_patchlevel = 2;
-};
-
-clock {
-       name = monotonic;
-       uuid = "c19b5ac9-b8e6-4f78-be95-a605d04e34c6";
-       description = "Monotonic Clock";
-       freq = 1000000000; /* Frequency, in Hz */
-       /* clock value offset from Epoch is: offset * (1/freq) */
-       offset = 1351530929945824323;
-};
-
-typealias integer {
-       size = 27; align = 1; signed = false;
-       map = clock.monotonic.value;
-} := uint27_clock_monotonic_t;
-
-typealias integer {
-       size = 32; align = 8; signed = false;
-       map = clock.monotonic.value;
-} := uint32_clock_monotonic_t;
-
-typealias integer {
-       size = 64; align = 8; signed = false;
-       map = clock.monotonic.value;
-} := uint64_clock_monotonic_t;
-
-struct packet_context {
-       uint64_clock_monotonic_t timestamp_begin;
-       uint64_clock_monotonic_t timestamp_end;
-       uint32_t events_discarded;
-       uint32_t content_size;
-       uint32_t packet_size;
-       uint32_t cpu_id;
-};
-
-struct event_header_compact {
-       enum : uint5_t { compact = 0 ... 30, extended = 31 } id;
-       variant <id> {
-               struct {
-                       uint27_clock_monotonic_t timestamp;
-               } compact;
-               struct {
-                       uint32_t id;
-                       uint64_clock_monotonic_t timestamp;
-               } extended;
-       } v;
-} align(8);
-
-struct event_header_large {
-       enum : uint16_t { compact = 0 ... 65534, extended = 65535 } id;
-       variant <id> {
-               struct {
-                       uint32_clock_monotonic_t timestamp;
-               } compact;
-               struct {
-                       uint32_t id;
-                       uint64_clock_monotonic_t timestamp;
-               } extended;
-       } v;
-} align(8);
-
-stream {
-       id = 0;
-       event.header := struct event_header_compact;
-       packet.context := struct packet_context;
-       event.context := struct {
-               integer { size = 32; align = 8; signed = 1; encoding = none; base = 10; } _vtid;
-               integer { size = 32; align = 8; signed = 1; encoding = none; base = 10; } _vpid;
-       };
-};
-
-event {
-       name = "heartbeat:msg";
-       id = 0;
-       stream_id = 0;
-       loglevel = 13;
-       fields := struct {
-               string _msg;
-       };
-};
-
-
index 38a6bf29acbfcd34adcaa2772860621361185c5e..3a42f8f9e0f502da56579753a2e7a1f8500712fc 100644 (file)
@@ -55,16 +55,16 @@ test_lost() {
 diag "Test the packet_seq_num validation"
 
 diag "No packet lost"
-test_no_lost "${BT_CTF_TRACES}/packet_seq_num/no_lost"
+test_no_lost "${BT_CTF_TRACES_PATH}/packet_seq_num/no_lost"
 
 diag "No packet lost, packet_seq_num not starting at 0"
-test_no_lost "${BT_CTF_TRACES}/packet_seq_num/no_lost_not_starting_at_0"
+test_no_lost "${BT_CTF_TRACES_PATH}/packet_seq_num/no_lost_not_starting_at_0"
 
 diag "1 stream, 2 packets lost before the last packet"
-test_lost "${BT_CTF_TRACES}/packet_seq_num/2_lost_before_last" "2"
+test_lost "${BT_CTF_TRACES_PATH}/packet_seq_num/2_lost_before_last" "2"
 
 diag "2 streams, packets lost in one of them"
-test_lost "${BT_CTF_TRACES}/packet_seq_num/2_streams_lost_in_1" "2"
+test_lost "${BT_CTF_TRACES_PATH}/packet_seq_num/2_streams_lost_in_1" "2"
 
 diag "2 streams, packets lost in both"
-test_lost "${BT_CTF_TRACES}/packet_seq_num/2_streams_lost_in_2" "2,3,1"
+test_lost "${BT_CTF_TRACES_PATH}/packet_seq_num/2_streams_lost_in_2" "2,3,1"
index ca37ced43452a4633a07ac50f9803d9fc94a75d9..c9047460b70df55595708fdfea2d5c06cdbe3d63 100644 (file)
@@ -21,7 +21,7 @@ clean_tmp() {
        rm -rf "${out_path}" "${text_output1}" "${text_output2}"
 }
 
-SUCCESS_TRACES=(${BT_CTF_TRACES}/succeed/*)
+SUCCESS_TRACES=(${BT_CTF_TRACES_PATH}/succeed/*)
 
 # -2 because there is an empty trace that we skip
 NUM_TESTS=$((${#SUCCESS_TRACES[@]} * 3 - 2))
index e9857eef0467c4a93a083ee452b95d6d265d619b..5cd6344a0dbeb23fa7d13a886bdf40d14e721387 100644 (file)
@@ -17,8 +17,8 @@
 
 . "@abs_top_builddir@/tests/utils/common.sh"
 
-SUCCESS_TRACES=(${BT_CTF_TRACES}/succeed/*)
-FAIL_TRACES=(${BT_CTF_TRACES}/fail/*)
+SUCCESS_TRACES=(${BT_CTF_TRACES_PATH}/succeed/*)
+FAIL_TRACES=(${BT_CTF_TRACES_PATH}/fail/*)
 
 NUM_TESTS=$((${#SUCCESS_TRACES[@]} + ${#FAIL_TRACES[@]}))
 
index 8c853aeaa0a7a12f5f089aec45d355a54eabb227..f40ab44476c975aa13278b408cc56403308ed3c1 100644 (file)
@@ -17,7 +17,7 @@
 
 . "@abs_top_builddir@/tests/utils/common.sh"
 
-TRACE_PATH="${BT_CTF_TRACES}/succeed/wk-heartbeat-u/"
+TRACE_PATH="${BT_CTF_TRACES_PATH}/succeed/wk-heartbeat-u/"
 
 NUM_TESTS=40
 
diff --git a/tests/ctf-traces/fail/fail1/dummystream b/tests/ctf-traces/fail/fail1/dummystream
deleted file mode 100644 (file)
index 2601067..0000000
Binary files a/tests/ctf-traces/fail/fail1/dummystream and /dev/null differ
diff --git a/tests/ctf-traces/fail/fail1/metadata b/tests/ctf-traces/fail/fail1/metadata
deleted file mode 100644 (file)
index 28185f5..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/* CTF 1.8
- *
- * Architecture with 32-bit pointers, 32-bit integers, 32-bit longs.
- */
-
-typealias integer { size = 1; align = 1; signed = false; } := uint1_t;
-typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
-typealias integer { size = 63; align = 1; signed = false; } := timestamp_t;
-
-typealias integer { size = 32; align = 32; signed = false; base = 10; } := uint32_t;
-typealias integer { size = 32; align = 32; signed = false; } := void *;
-
-
-trace {
-       major = 0;
-       minor = 1;
-       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
-       byte_order = le;
-       packet.header := struct {
-               uint32_t magic;
-               uint8_t  uuid[16];
-               uint32_t stream_id;
-       };
-};
-
-stream {
-       event.header := struct {
-               uint1_t id;
-               timestamp_t timestamp;
-       };
-       event.context := struct {
-               uint32_t thread_id;
-               uint32_t event_count;
-       };                      
-};
-
-event {
-       name = func_enter;
-       id = 0;
-       fields := struct {
-               void *func_called;
-               void *called_from;
-       };
-};
-
-event {
-       name = func_exit;
-       id = 1;
-};
diff --git a/tests/ctf-traces/fail/fail2/metadata b/tests/ctf-traces/fail/fail2/metadata
deleted file mode 100644 (file)
index 456661e..0000000
Binary files a/tests/ctf-traces/fail/fail2/metadata and /dev/null differ
diff --git a/tests/ctf-traces/fail/integer-range/metadata b/tests/ctf-traces/fail/integer-range/metadata
deleted file mode 100644 (file)
index 3574940..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
-typealias integer { size = 32; align = 32; signed = false; } := uint32_t;
-
-trace {
-       /* Integer out of range */
-       major = 23452397856348975623897562893746589237465289374658923764598237645897234658723648579236;
-       minor = 1;
-       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
-       byte_order = le;
-       packet.header := struct {
-               uint32_t magic;
-               uint8_t  uuid[16];
-       };
-};
-
-stream {
-       packet.context := struct {
-               uint32_t content_size;
-               uint32_t packet_size;
-       };
-};
-
-event {
-       name = string;
-       fields := struct { string str; };
-};
diff --git a/tests/ctf-traces/fail/lttng-modules-2.0-pre1/metadata b/tests/ctf-traces/fail/lttng-modules-2.0-pre1/metadata
deleted file mode 100644 (file)
index 6f92a29..0000000
Binary files a/tests/ctf-traces/fail/lttng-modules-2.0-pre1/metadata and /dev/null differ
diff --git a/tests/ctf-traces/fail/packet-based-metadata/metadata b/tests/ctf-traces/fail/packet-based-metadata/metadata
deleted file mode 100644 (file)
index e209780..0000000
Binary files a/tests/ctf-traces/fail/packet-based-metadata/metadata and /dev/null differ
diff --git a/tests/ctf-traces/fail/smalltrace/dummystream-fail b/tests/ctf-traces/fail/smalltrace/dummystream-fail
deleted file mode 100644 (file)
index fc7e07c..0000000
+++ /dev/null
@@ -1 +0,0 @@
\1füÁ*d
\ No newline at end of file
diff --git a/tests/ctf-traces/fail/smalltrace/metadata b/tests/ctf-traces/fail/smalltrace/metadata
deleted file mode 100644 (file)
index 86f8e0a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
-typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
-
-trace {
-       major = 0;
-       minor = 1;
-       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
-       byte_order = le;
-       packet.header := struct {
-               uint32_t magic;
-               uint8_t  uuid[16];
-       };
-};
-
-event {
-       name = string;
-       fields := struct { string str; };
-};
diff --git a/tests/ctf-traces/intersection/3eventsintersect/metadata b/tests/ctf-traces/intersection/3eventsintersect/metadata
deleted file mode 100644 (file)
index 7cc1b4d..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* CTF 1.8 */
-
-trace {
-       major = 1;
-       minor = 8;
-       uuid = "7afe8fbe-79b8-4f6a-bbc7-d0c782e7ddaf";
-       byte_order = be;
-       packet.header := struct {
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } magic;
-               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } uuid[16];
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } stream_id;
-       } align(8);
-};
-
-env {
-       host = "sinkpad";
-};
-
-clock {
-       name = test_clock;
-       uuid = "7b9e2f2a-530e-4ab1-816f-0831b5c09140";
-       description = "This is a test clock";
-       freq = 1000000000;
-       precision = 10;
-       offset_s = 13515309;
-       offset = 0;
-       absolute = TRUE;
-};
-
-stream {
-       id = 0;
-       event.header := struct {
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } id;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; map = clock.test_clock.value; } timestamp;
-       } align(8);
-
-       packet.context := struct {
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_begin;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_end;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } content_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } packet_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } events_discarded;
-               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_seq_num;
-       } align(8);
-};
-
-event {
-       id = 0;
-       name = "dummy_event";
-       stream_id = 0;
-       fields := struct {
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } dummy_value;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } tracefile_id;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_begin;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_end;
-       } align(1);
-};
-
diff --git a/tests/ctf-traces/intersection/3eventsintersect/test_stream_0 b/tests/ctf-traces/intersection/3eventsintersect/test_stream_0
deleted file mode 100644 (file)
index 6a69e44..0000000
Binary files a/tests/ctf-traces/intersection/3eventsintersect/test_stream_0 and /dev/null differ
diff --git a/tests/ctf-traces/intersection/3eventsintersect/test_stream_1 b/tests/ctf-traces/intersection/3eventsintersect/test_stream_1
deleted file mode 100644 (file)
index 0cf1404..0000000
Binary files a/tests/ctf-traces/intersection/3eventsintersect/test_stream_1 and /dev/null differ
diff --git a/tests/ctf-traces/intersection/3eventsintersectreverse/metadata b/tests/ctf-traces/intersection/3eventsintersectreverse/metadata
deleted file mode 100644 (file)
index 7cc1b4d..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* CTF 1.8 */
-
-trace {
-       major = 1;
-       minor = 8;
-       uuid = "7afe8fbe-79b8-4f6a-bbc7-d0c782e7ddaf";
-       byte_order = be;
-       packet.header := struct {
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } magic;
-               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } uuid[16];
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } stream_id;
-       } align(8);
-};
-
-env {
-       host = "sinkpad";
-};
-
-clock {
-       name = test_clock;
-       uuid = "7b9e2f2a-530e-4ab1-816f-0831b5c09140";
-       description = "This is a test clock";
-       freq = 1000000000;
-       precision = 10;
-       offset_s = 13515309;
-       offset = 0;
-       absolute = TRUE;
-};
-
-stream {
-       id = 0;
-       event.header := struct {
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } id;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; map = clock.test_clock.value; } timestamp;
-       } align(8);
-
-       packet.context := struct {
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_begin;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_end;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } content_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } packet_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } events_discarded;
-               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_seq_num;
-       } align(8);
-};
-
-event {
-       id = 0;
-       name = "dummy_event";
-       stream_id = 0;
-       fields := struct {
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } dummy_value;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } tracefile_id;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_begin;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_end;
-       } align(1);
-};
-
diff --git a/tests/ctf-traces/intersection/3eventsintersectreverse/test_stream_0 b/tests/ctf-traces/intersection/3eventsintersectreverse/test_stream_0
deleted file mode 100644 (file)
index 0cf1404..0000000
Binary files a/tests/ctf-traces/intersection/3eventsintersectreverse/test_stream_0 and /dev/null differ
diff --git a/tests/ctf-traces/intersection/3eventsintersectreverse/test_stream_1 b/tests/ctf-traces/intersection/3eventsintersectreverse/test_stream_1
deleted file mode 100644 (file)
index 6a69e44..0000000
Binary files a/tests/ctf-traces/intersection/3eventsintersectreverse/test_stream_1 and /dev/null differ
diff --git a/tests/ctf-traces/intersection/nointersect/metadata b/tests/ctf-traces/intersection/nointersect/metadata
deleted file mode 100644 (file)
index 5e14a71..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* CTF 1.8 */
-
-trace {
-       major = 1;
-       minor = 8;
-       uuid = "a967fbc0-c89b-4b92-b5df-30688d576ddf";
-       byte_order = be;
-       packet.header := struct {
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } magic;
-               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } uuid[16];
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } stream_id;
-       } align(8);
-};
-
-env {
-       host = "sinkpad";
-};
-
-clock {
-       name = test_clock;
-       uuid = "fb759646-b2b9-42d7-9013-f790694dd902";
-       description = "This is a test clock";
-       freq = 1000000000;
-       precision = 10;
-       offset_s = 13515309;
-       offset = 0;
-       absolute = TRUE;
-};
-
-stream {
-       id = 0;
-       event.header := struct {
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } id;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; map = clock.test_clock.value; } timestamp;
-       } align(8);
-
-       packet.context := struct {
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_begin;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_end;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } content_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } packet_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } events_discarded;
-               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_seq_num;
-       } align(8);
-};
-
-event {
-       id = 0;
-       name = "dummy_event";
-       stream_id = 0;
-       fields := struct {
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } dummy_value;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } tracefile_id;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_begin;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_end;
-       } align(1);
-};
-
diff --git a/tests/ctf-traces/intersection/nointersect/test_stream_0 b/tests/ctf-traces/intersection/nointersect/test_stream_0
deleted file mode 100644 (file)
index 7c32bae..0000000
Binary files a/tests/ctf-traces/intersection/nointersect/test_stream_0 and /dev/null differ
diff --git a/tests/ctf-traces/intersection/nointersect/test_stream_1 b/tests/ctf-traces/intersection/nointersect/test_stream_1
deleted file mode 100644 (file)
index e656ba6..0000000
Binary files a/tests/ctf-traces/intersection/nointersect/test_stream_1 and /dev/null differ
diff --git a/tests/ctf-traces/intersection/nostream/metadata b/tests/ctf-traces/intersection/nostream/metadata
deleted file mode 100644 (file)
index 5e14a71..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* CTF 1.8 */
-
-trace {
-       major = 1;
-       minor = 8;
-       uuid = "a967fbc0-c89b-4b92-b5df-30688d576ddf";
-       byte_order = be;
-       packet.header := struct {
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } magic;
-               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } uuid[16];
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } stream_id;
-       } align(8);
-};
-
-env {
-       host = "sinkpad";
-};
-
-clock {
-       name = test_clock;
-       uuid = "fb759646-b2b9-42d7-9013-f790694dd902";
-       description = "This is a test clock";
-       freq = 1000000000;
-       precision = 10;
-       offset_s = 13515309;
-       offset = 0;
-       absolute = TRUE;
-};
-
-stream {
-       id = 0;
-       event.header := struct {
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } id;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; map = clock.test_clock.value; } timestamp;
-       } align(8);
-
-       packet.context := struct {
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_begin;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_end;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } content_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } packet_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } events_discarded;
-               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_seq_num;
-       } align(8);
-};
-
-event {
-       id = 0;
-       name = "dummy_event";
-       stream_id = 0;
-       fields := struct {
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } dummy_value;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } tracefile_id;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_begin;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_end;
-       } align(1);
-};
-
diff --git a/tests/ctf-traces/intersection/onestream/metadata b/tests/ctf-traces/intersection/onestream/metadata
deleted file mode 100644 (file)
index 5e14a71..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* CTF 1.8 */
-
-trace {
-       major = 1;
-       minor = 8;
-       uuid = "a967fbc0-c89b-4b92-b5df-30688d576ddf";
-       byte_order = be;
-       packet.header := struct {
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } magic;
-               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } uuid[16];
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } stream_id;
-       } align(8);
-};
-
-env {
-       host = "sinkpad";
-};
-
-clock {
-       name = test_clock;
-       uuid = "fb759646-b2b9-42d7-9013-f790694dd902";
-       description = "This is a test clock";
-       freq = 1000000000;
-       precision = 10;
-       offset_s = 13515309;
-       offset = 0;
-       absolute = TRUE;
-};
-
-stream {
-       id = 0;
-       event.header := struct {
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } id;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; map = clock.test_clock.value; } timestamp;
-       } align(8);
-
-       packet.context := struct {
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_begin;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_end;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } content_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } packet_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } events_discarded;
-               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_seq_num;
-       } align(8);
-};
-
-event {
-       id = 0;
-       name = "dummy_event";
-       stream_id = 0;
-       fields := struct {
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } dummy_value;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } tracefile_id;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_begin;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_end;
-       } align(1);
-};
-
diff --git a/tests/ctf-traces/intersection/onestream/test_stream_0 b/tests/ctf-traces/intersection/onestream/test_stream_0
deleted file mode 100644 (file)
index 7c32bae..0000000
Binary files a/tests/ctf-traces/intersection/onestream/test_stream_0 and /dev/null differ
diff --git a/tests/ctf-traces/packet_seq_num/2_lost_before_last/metadata b/tests/ctf-traces/packet_seq_num/2_lost_before_last/metadata
deleted file mode 100644 (file)
index 36e26cd..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* CTF 1.8 */
-
-trace {
-       major = 1;
-       minor = 8;
-       uuid = "ad21eeaa-fab9-4692-aab8-ebd68c7feb17";
-       byte_order = be;
-       packet.header := struct {
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } magic;
-               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } uuid[16];
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } stream_id;
-       } align(8);
-};
-
-env {
-       host = "sinkpad";
-};
-
-clock {
-       name = test_clock;
-       uuid = "d336520f-985d-481e-8e35-d99328655354";
-       description = "This is a test clock";
-       freq = 1000000000;
-       precision = 10;
-       offset_s = 13515309;
-       offset = 0;
-       absolute = TRUE;
-};
-
-stream {
-       id = 0;
-       event.header := struct {
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } id;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; map = clock.test_clock.value; } timestamp;
-       } align(8);
-
-       packet.context := struct {
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_begin;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_end;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } content_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } packet_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } events_discarded;
-               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_seq_num;
-       } align(8);
-};
-
-event {
-       id = 0;
-       name = "dummy_event";
-       stream_id = 0;
-       fields := struct {
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } dummy_value;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } tracefile_id;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_begin;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_end;
-       } align(1);
-};
-
diff --git a/tests/ctf-traces/packet_seq_num/2_lost_before_last/test_stream_0 b/tests/ctf-traces/packet_seq_num/2_lost_before_last/test_stream_0
deleted file mode 100644 (file)
index 50d36a4..0000000
Binary files a/tests/ctf-traces/packet_seq_num/2_lost_before_last/test_stream_0 and /dev/null differ
diff --git a/tests/ctf-traces/packet_seq_num/2_streams_lost_in_1/metadata b/tests/ctf-traces/packet_seq_num/2_streams_lost_in_1/metadata
deleted file mode 100644 (file)
index 525405e..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* CTF 1.8 */
-
-trace {
-       major = 1;
-       minor = 8;
-       uuid = "61db8e6b-2069-40e4-84ed-bc15f42181f0";
-       byte_order = be;
-       packet.header := struct {
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } magic;
-               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } uuid[16];
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } stream_id;
-       } align(8);
-};
-
-env {
-       host = "sinkpad";
-};
-
-clock {
-       name = test_clock;
-       uuid = "a0a8c252-db03-4f36-a148-80a0a3c4edff";
-       description = "This is a test clock";
-       freq = 1000000000;
-       precision = 10;
-       offset_s = 13515309;
-       offset = 0;
-       absolute = TRUE;
-};
-
-stream {
-       id = 0;
-       event.header := struct {
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } id;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; map = clock.test_clock.value; } timestamp;
-       } align(8);
-
-       packet.context := struct {
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_begin;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_end;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } content_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } packet_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } events_discarded;
-               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_seq_num;
-       } align(8);
-};
-
-event {
-       id = 0;
-       name = "dummy_event";
-       stream_id = 0;
-       fields := struct {
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } dummy_value;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } tracefile_id;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_begin;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_end;
-       } align(1);
-};
-
diff --git a/tests/ctf-traces/packet_seq_num/2_streams_lost_in_1/test_stream_0 b/tests/ctf-traces/packet_seq_num/2_streams_lost_in_1/test_stream_0
deleted file mode 100644 (file)
index 1b362cd..0000000
Binary files a/tests/ctf-traces/packet_seq_num/2_streams_lost_in_1/test_stream_0 and /dev/null differ
diff --git a/tests/ctf-traces/packet_seq_num/2_streams_lost_in_1/test_stream_1 b/tests/ctf-traces/packet_seq_num/2_streams_lost_in_1/test_stream_1
deleted file mode 100644 (file)
index d5114d9..0000000
Binary files a/tests/ctf-traces/packet_seq_num/2_streams_lost_in_1/test_stream_1 and /dev/null differ
diff --git a/tests/ctf-traces/packet_seq_num/2_streams_lost_in_2/metadata b/tests/ctf-traces/packet_seq_num/2_streams_lost_in_2/metadata
deleted file mode 100644 (file)
index 680d910..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* CTF 1.8 */
-
-trace {
-       major = 1;
-       minor = 8;
-       uuid = "eb5045f7-b471-488e-b963-0221ddf423a7";
-       byte_order = be;
-       packet.header := struct {
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } magic;
-               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } uuid[16];
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } stream_id;
-       } align(8);
-};
-
-env {
-       host = "sinkpad";
-};
-
-clock {
-       name = test_clock;
-       uuid = "2447a359-1e57-448f-96ef-3c324327047c";
-       description = "This is a test clock";
-       freq = 1000000000;
-       precision = 10;
-       offset_s = 13515309;
-       offset = 0;
-       absolute = TRUE;
-};
-
-stream {
-       id = 0;
-       event.header := struct {
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } id;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; map = clock.test_clock.value; } timestamp;
-       } align(8);
-
-       packet.context := struct {
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_begin;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_end;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } content_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } packet_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } events_discarded;
-               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_seq_num;
-       } align(8);
-};
-
-event {
-       id = 0;
-       name = "dummy_event";
-       stream_id = 0;
-       fields := struct {
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } dummy_value;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } tracefile_id;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_begin;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_end;
-       } align(1);
-};
-
diff --git a/tests/ctf-traces/packet_seq_num/2_streams_lost_in_2/test_stream_0 b/tests/ctf-traces/packet_seq_num/2_streams_lost_in_2/test_stream_0
deleted file mode 100644 (file)
index b0beb6b..0000000
Binary files a/tests/ctf-traces/packet_seq_num/2_streams_lost_in_2/test_stream_0 and /dev/null differ
diff --git a/tests/ctf-traces/packet_seq_num/2_streams_lost_in_2/test_stream_1 b/tests/ctf-traces/packet_seq_num/2_streams_lost_in_2/test_stream_1
deleted file mode 100644 (file)
index 1ad8320..0000000
Binary files a/tests/ctf-traces/packet_seq_num/2_streams_lost_in_2/test_stream_1 and /dev/null differ
diff --git a/tests/ctf-traces/packet_seq_num/no_lost/metadata b/tests/ctf-traces/packet_seq_num/no_lost/metadata
deleted file mode 100644 (file)
index d562061..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* CTF 1.8 */
-
-trace {
-       major = 1;
-       minor = 8;
-       uuid = "b7d90429-287f-45ff-897c-3db7c5ab8b5a";
-       byte_order = be;
-       packet.header := struct {
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } magic;
-               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } uuid[16];
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } stream_id;
-       } align(8);
-};
-
-env {
-       host = "sinkpad";
-};
-
-clock {
-       name = test_clock;
-       uuid = "004fa3e8-48aa-453a-8be8-9d30ead9ac66";
-       description = "This is a test clock";
-       freq = 1000000000;
-       precision = 10;
-       offset_s = 13515309;
-       offset = 0;
-       absolute = TRUE;
-};
-
-stream {
-       id = 0;
-       event.header := struct {
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } id;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; map = clock.test_clock.value; } timestamp;
-       } align(8);
-
-       packet.context := struct {
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_begin;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_end;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } content_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } packet_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } events_discarded;
-               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_seq_num;
-       } align(8);
-};
-
-event {
-       id = 0;
-       name = "dummy_event";
-       stream_id = 0;
-       fields := struct {
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } dummy_value;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } tracefile_id;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_begin;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_end;
-       } align(1);
-};
-
diff --git a/tests/ctf-traces/packet_seq_num/no_lost/test_stream_0 b/tests/ctf-traces/packet_seq_num/no_lost/test_stream_0
deleted file mode 100644 (file)
index 15821fb..0000000
Binary files a/tests/ctf-traces/packet_seq_num/no_lost/test_stream_0 and /dev/null differ
diff --git a/tests/ctf-traces/packet_seq_num/no_lost_not_starting_at_0/metadata b/tests/ctf-traces/packet_seq_num/no_lost_not_starting_at_0/metadata
deleted file mode 100644 (file)
index c8f5783..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* CTF 1.8 */
-
-trace {
-       major = 1;
-       minor = 8;
-       uuid = "0bef2d78-5020-4b09-b520-64480ef5c0e6";
-       byte_order = be;
-       packet.header := struct {
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } magic;
-               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } uuid[16];
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } stream_id;
-       } align(8);
-};
-
-env {
-       host = "sinkpad";
-};
-
-clock {
-       name = test_clock;
-       uuid = "ae130a0d-e10b-49cb-8b2d-64beaa23814c";
-       description = "This is a test clock";
-       freq = 1000000000;
-       precision = 10;
-       offset_s = 13932323;
-       offset = 0;
-       absolute = TRUE;
-};
-
-stream {
-       id = 0;
-       event.header := struct {
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } id;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; map = clock.test_clock.value; } timestamp;
-       } align(8);
-
-       packet.context := struct {
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_begin;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_end;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } content_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } packet_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } events_discarded;
-               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_seq_num;
-       } align(8);
-};
-
-event {
-       id = 0;
-       name = "dummy_event";
-       stream_id = 0;
-       fields := struct {
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } dummy_value;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } tracefile_id;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_begin;
-               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_end;
-       } align(1);
-};
-
diff --git a/tests/ctf-traces/packet_seq_num/no_lost_not_starting_at_0/test_stream_0 b/tests/ctf-traces/packet_seq_num/no_lost_not_starting_at_0/test_stream_0
deleted file mode 100644 (file)
index f9639a3..0000000
Binary files a/tests/ctf-traces/packet_seq_num/no_lost_not_starting_at_0/test_stream_0 and /dev/null differ
diff --git a/tests/ctf-traces/succeed/env-warning/dummystream b/tests/ctf-traces/succeed/env-warning/dummystream
deleted file mode 100644 (file)
index 53d735e..0000000
Binary files a/tests/ctf-traces/succeed/env-warning/dummystream and /dev/null differ
diff --git a/tests/ctf-traces/succeed/env-warning/metadata b/tests/ctf-traces/succeed/env-warning/metadata
deleted file mode 100644 (file)
index 0fb823c..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
-typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
-
-trace {
-       major = 1;
-       minor = 8;
-       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
-       byte_order = le;
-       packet.header := struct {
-               uint32_t magic;
-               uint8_t  uuid[16];
-       };
-};
-
-env {
-       dummy = "blah";
-};
-
-stream {
-       packet.context := struct {
-               uint32_t content_size;
-               uint32_t packet_size;
-       };
-};
-
-event {
-       name = string;
-       fields := struct { string str; };
-};
diff --git a/tests/ctf-traces/succeed/ev-disc-no-ts-begin-end/metadata b/tests/ctf-traces/succeed/ev-disc-no-ts-begin-end/metadata
deleted file mode 100644 (file)
index 1b4803b..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/* CTF 1.8 */
-
-trace {
-       major = 1;
-       minor = 8;
-       byte_order = be;
-};
-
-stream {
-       packet.context := struct {
-               integer { size = 8; } packet_size;
-               integer { size = 8; } events_discarded;
-       };
-};
-
-event {
-       name = "ev";
-       fields := struct {
-               string s;
-       };
-};
diff --git a/tests/ctf-traces/succeed/ev-disc-no-ts-begin-end/stream b/tests/ctf-traces/succeed/ev-disc-no-ts-begin-end/stream
deleted file mode 100644 (file)
index b42129a..0000000
Binary files a/tests/ctf-traces/succeed/ev-disc-no-ts-begin-end/stream and /dev/null differ
diff --git a/tests/ctf-traces/succeed/no-packet-context/metadata b/tests/ctf-traces/succeed/no-packet-context/metadata
deleted file mode 100644 (file)
index c811432..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/* CTF 1.8 */
-
-trace {
-       major = 1;
-       minor = 8;
-       byte_order = be;
-};
-
-event {
-       name = "ev";
-       fields := struct {
-               string s;
-       };
-};
diff --git a/tests/ctf-traces/succeed/no-packet-context/stream b/tests/ctf-traces/succeed/no-packet-context/stream
deleted file mode 100644 (file)
index 0db2632..0000000
Binary files a/tests/ctf-traces/succeed/no-packet-context/stream and /dev/null differ
diff --git a/tests/ctf-traces/succeed/sequence/channel0_0 b/tests/ctf-traces/succeed/sequence/channel0_0
deleted file mode 100644 (file)
index 5038a22..0000000
Binary files a/tests/ctf-traces/succeed/sequence/channel0_0 and /dev/null differ
diff --git a/tests/ctf-traces/succeed/sequence/channel0_1 b/tests/ctf-traces/succeed/sequence/channel0_1
deleted file mode 100644 (file)
index fd94738..0000000
Binary files a/tests/ctf-traces/succeed/sequence/channel0_1 and /dev/null differ
diff --git a/tests/ctf-traces/succeed/sequence/channel0_2 b/tests/ctf-traces/succeed/sequence/channel0_2
deleted file mode 100644 (file)
index 9d848fc..0000000
Binary files a/tests/ctf-traces/succeed/sequence/channel0_2 and /dev/null differ
diff --git a/tests/ctf-traces/succeed/sequence/channel0_3 b/tests/ctf-traces/succeed/sequence/channel0_3
deleted file mode 100644 (file)
index ef385c3..0000000
Binary files a/tests/ctf-traces/succeed/sequence/channel0_3 and /dev/null differ
diff --git a/tests/ctf-traces/succeed/sequence/metadata b/tests/ctf-traces/succeed/sequence/metadata
deleted file mode 100644 (file)
index 2163abf..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
-typealias integer { size = 16; align = 8; signed = false; } := uint16_t;
-typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
-typealias integer { size = 64; align = 8; signed = false; } := uint64_t;
-typealias integer { size = 64; align = 8; signed = false; } := unsigned long;
-typealias integer { size = 5; align = 1; signed = false; } := uint5_t;
-typealias integer { size = 27; align = 1; signed = false; } := uint27_t;
-
-trace {
-       major = 1;
-       minor = 8;
-       uuid = "59052333-e490-4ed9-af7a-b652437fba9a";
-       byte_order = le;
-       packet.header := struct {
-               uint32_t magic;
-               uint8_t  uuid[16];
-               uint32_t stream_id;
-       };
-};
-
-env {
-       hostname = "host";
-       domain = "ust";
-       tracer_name = "lttng-ust";
-       tracer_major = 2;
-       tracer_minor = 3;
-};
-
-clock {
-       name = monotonic;
-       uuid = "5f3ed925-9d73-4637-b8e4-02077abc8c8f";
-       description = "Monotonic Clock";
-       freq = 1000000000; /* Frequency, in Hz */
-       /* clock value offset from Epoch is: offset * (1/freq) */
-       offset = 1375437179542680815;
-};
-
-typealias integer {
-       size = 27; align = 1; signed = false;
-       map = clock.monotonic.value;
-} := uint27_clock_monotonic_t;
-
-typealias integer {
-       size = 32; align = 8; signed = false;
-       map = clock.monotonic.value;
-} := uint32_clock_monotonic_t;
-
-typealias integer {
-       size = 64; align = 8; signed = false;
-       map = clock.monotonic.value;
-} := uint64_clock_monotonic_t;
-
-struct packet_context {
-       uint64_clock_monotonic_t timestamp_begin;
-       uint64_clock_monotonic_t timestamp_end;
-       uint64_t content_size;
-       uint64_t packet_size;
-       unsigned long events_discarded;
-       uint32_t cpu_id;
-};
-
-struct event_header_compact {
-       enum : uint5_t { compact = 0 ... 30, extended = 31 } id;
-       variant <id> {
-               struct {
-                       uint27_clock_monotonic_t timestamp;
-               } compact;
-               struct {
-                       uint32_t id;
-                       uint64_clock_monotonic_t timestamp;
-               } extended;
-       } v;
-} align(8);
-
-struct event_header_large {
-       enum : uint16_t { compact = 0 ... 65534, extended = 65535 } id;
-       variant <id> {
-               struct {
-                       uint32_clock_monotonic_t timestamp;
-               } compact;
-               struct {
-                       uint32_t id;
-                       uint64_clock_monotonic_t timestamp;
-               } extended;
-       } v;
-} align(8);
-
-stream {
-       id = 0;
-       event.header := struct event_header_compact;
-       packet.context := struct packet_context;
-};
-
-event {
-       name = "sequence event";
-       id = 0;
-       stream_id = 0;
-       loglevel = 1;
-       fields := struct {
-               integer { size = 64; align = 8; signed = 0; encoding = none; base = 10; } __seq_int_field_length;
-               integer { size = 32; align = 8; signed = 1; encoding = none; base = 10; } _seq_int_field[ __seq_int_field_length ];
-               integer { size = 64; align = 8; signed = 0; encoding = none; base = 10; } __seq_long_field_length;
-               integer { size = 64; align = 8; signed = 1; encoding = none; base = 10; } _seq_long_field[ __seq_long_field_length ];
-       };
-};
diff --git a/tests/ctf-traces/succeed/smalltrace/dummystream b/tests/ctf-traces/succeed/smalltrace/dummystream
deleted file mode 100644 (file)
index 469cb9a..0000000
Binary files a/tests/ctf-traces/succeed/smalltrace/dummystream and /dev/null differ
diff --git a/tests/ctf-traces/succeed/smalltrace/metadata b/tests/ctf-traces/succeed/smalltrace/metadata
deleted file mode 100644 (file)
index bf356a8..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
-typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
-
-trace {
-       major = 1;
-       minor = 8;
-       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
-       byte_order = le;
-       packet.header := struct {
-               uint32_t magic;
-               uint8_t  uuid[16];
-       };
-};
-
-event {
-       name = string;
-       fields := struct { string str; };
-};
diff --git a/tests/ctf-traces/succeed/succeed1/dummystream b/tests/ctf-traces/succeed/succeed1/dummystream
deleted file mode 100644 (file)
index 53d735e..0000000
Binary files a/tests/ctf-traces/succeed/succeed1/dummystream and /dev/null differ
diff --git a/tests/ctf-traces/succeed/succeed1/metadata b/tests/ctf-traces/succeed/succeed1/metadata
deleted file mode 100644 (file)
index 2c18b9d..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
-typealias integer { size = 32; align = 32; signed = false; } := uint32_t;
-
-trace {
-       major = 1;
-       minor = 8;
-       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
-       byte_order = le;
-       packet.header := struct {
-               uint32_t magic;
-               uint8_t  uuid[16];
-       };
-};
-
-stream {
-       packet.context := struct {
-               uint32_t content_size;
-               uint32_t packet_size;
-       };
-};
-
-event {
-       name = string;
-       fields := struct { string str; };
-};
diff --git a/tests/ctf-traces/succeed/succeed2/dummystream b/tests/ctf-traces/succeed/succeed2/dummystream
deleted file mode 100644 (file)
index 53d735e..0000000
Binary files a/tests/ctf-traces/succeed/succeed2/dummystream and /dev/null differ
diff --git a/tests/ctf-traces/succeed/succeed2/metadata b/tests/ctf-traces/succeed/succeed2/metadata
deleted file mode 100644 (file)
index c52443f..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
-typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
-
-trace {
-       major = 1;
-       minor = 8;
-       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
-       byte_order = le;
-       packet.header := struct {
-               uint32_t magic;
-               uint8_t  uuid[16];
-       };
-};
-
-stream {
-       packet.context := struct {
-               uint32_t content_size;
-               uint32_t packet_size;
-       };
-};
-
-event {
-       name = string;
-       fields := struct { string str; };
-};
diff --git a/tests/ctf-traces/succeed/succeed3/dummystream b/tests/ctf-traces/succeed/succeed3/dummystream
deleted file mode 100644 (file)
index 53d735e..0000000
Binary files a/tests/ctf-traces/succeed/succeed3/dummystream and /dev/null differ
diff --git a/tests/ctf-traces/succeed/succeed3/metadata b/tests/ctf-traces/succeed/succeed3/metadata
deleted file mode 100644 (file)
index 5bcd1c8..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
-typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
-
-trace {
-       major = 1;
-       minor = 8;
-       test = "\"";
-       test2 = "?\x20\040?";
-       test3 = '\n';
-       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
-       byte_order = le;
-       packet.header := struct {
-               uint32_t magic;
-               uint8_t  uuid[16];
-       };
-};
-
-stream {
-       packet.context := struct {
-               uint32_t content_size;
-               uint32_t packet_size;
-       };
-};
-
-event {
-       name = string;
-       fields := struct { string str; };
-};
diff --git a/tests/ctf-traces/succeed/succeed4/metadata b/tests/ctf-traces/succeed/succeed4/metadata
deleted file mode 100644 (file)
index 63979e9..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
-typealias integer { size = 32; align = 32; signed = false; } := uint32_t;
-
-trace {
-       major = 1;
-       minor = 8;
-       test = 0xABC234;        /* hexadecimal */
-       test1 = 06534;          /* octal */
-       test2 = 1234;           /* decimal */
-       test3 = +1234;          /* decimal with + unary op */
-       test4 = -1234;          /* decimal (negated) */
-       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
-       byte_order = le;
-       packet.header := struct {
-               uint32_t magic;
-               uint8_t  uuid[16];
-       };
-};
-
-stream {
-       packet.context := struct {
-               uint32_t content_size;
-               uint32_t packet_size;
-       };
-};
-
-event {
-       name = string;
-       fields := struct { string str; };
-};
diff --git a/tests/ctf-traces/succeed/warnings/dummystream b/tests/ctf-traces/succeed/warnings/dummystream
deleted file mode 100644 (file)
index 53d735e..0000000
Binary files a/tests/ctf-traces/succeed/warnings/dummystream and /dev/null differ
diff --git a/tests/ctf-traces/succeed/warnings/metadata b/tests/ctf-traces/succeed/warnings/metadata
deleted file mode 100644 (file)
index 125a5d5..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; aa = bb; } := uint8_t;
-typealias integer { size = 32; align = 32; signed = false; zz = aa; } := uint32_t;
-
-trace {
-       major = 1;
-       minor = 8;
-       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
-       byte_order = le;
-       packet.header := struct {
-               uint32_t magic;
-               uint8_t  uuid[16];
-       };
-       blah = "aaa";
-};
-
-stream {
-       packet.context := struct {
-               uint32_t content_size;
-               uint32_t packet_size;
-       };
-       askdjfhaskdjfh = 1;
-};
-
-event {
-       name = string;
-       fields := struct { string str; };
-       asdjfhah := struct { uint8_t ffff; };
-};
diff --git a/tests/ctf-traces/succeed/wk-heartbeat-u/metadata b/tests/ctf-traces/succeed/wk-heartbeat-u/metadata
deleted file mode 100644 (file)
index e35f463..0000000
Binary files a/tests/ctf-traces/succeed/wk-heartbeat-u/metadata and /dev/null differ
diff --git a/tests/ctf-traces/succeed/wk-heartbeat-u/u_0 b/tests/ctf-traces/succeed/wk-heartbeat-u/u_0
deleted file mode 100644 (file)
index 3af2cdc..0000000
Binary files a/tests/ctf-traces/succeed/wk-heartbeat-u/u_0 and /dev/null differ
diff --git a/tests/ctf-traces/succeed/wk-heartbeat-u/u_1 b/tests/ctf-traces/succeed/wk-heartbeat-u/u_1
deleted file mode 100644 (file)
index 7b74c03..0000000
Binary files a/tests/ctf-traces/succeed/wk-heartbeat-u/u_1 and /dev/null differ
diff --git a/tests/ctf-traces/succeed/wk-heartbeat-u/u_2 b/tests/ctf-traces/succeed/wk-heartbeat-u/u_2
deleted file mode 100644 (file)
index 13a69fc..0000000
Binary files a/tests/ctf-traces/succeed/wk-heartbeat-u/u_2 and /dev/null differ
diff --git a/tests/ctf-traces/succeed/wk-heartbeat-u/u_3 b/tests/ctf-traces/succeed/wk-heartbeat-u/u_3
deleted file mode 100644 (file)
index 1cdde72..0000000
Binary files a/tests/ctf-traces/succeed/wk-heartbeat-u/u_3 and /dev/null differ
diff --git a/tests/ctf-traces/succeed/wk-heartbeat-u/u_4 b/tests/ctf-traces/succeed/wk-heartbeat-u/u_4
deleted file mode 100644 (file)
index c136034..0000000
Binary files a/tests/ctf-traces/succeed/wk-heartbeat-u/u_4 and /dev/null differ
diff --git a/tests/ctf-traces/succeed/wk-heartbeat-u/u_5 b/tests/ctf-traces/succeed/wk-heartbeat-u/u_5
deleted file mode 100644 (file)
index a0a5881..0000000
Binary files a/tests/ctf-traces/succeed/wk-heartbeat-u/u_5 and /dev/null differ
diff --git a/tests/ctf-traces/succeed/wk-heartbeat-u/u_6 b/tests/ctf-traces/succeed/wk-heartbeat-u/u_6
deleted file mode 100644 (file)
index b1c8520..0000000
Binary files a/tests/ctf-traces/succeed/wk-heartbeat-u/u_6 and /dev/null differ
diff --git a/tests/ctf-traces/succeed/wk-heartbeat-u/u_7 b/tests/ctf-traces/succeed/wk-heartbeat-u/u_7
deleted file mode 100644 (file)
index 05f7393..0000000
Binary files a/tests/ctf-traces/succeed/wk-heartbeat-u/u_7 and /dev/null differ
diff --git a/tests/data/cli/test_output_ctf_metadata.ref b/tests/data/cli/test_output_ctf_metadata.ref
new file mode 100644 (file)
index 0000000..01dbf3f
--- /dev/null
@@ -0,0 +1,111 @@
+/* CTF 1.8 */
+
+typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; } := uint16_t;
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+typealias integer { size = 64; align = 8; signed = false; } := uint64_t;
+typealias integer { size = 5; align = 1; signed = false; } := uint5_t;
+typealias integer { size = 27; align = 1; signed = false; } := uint27_t;
+
+trace {
+       major = 1;
+       minor = 8;
+       uuid = "624b19d9-19cd-4eae-bab8-8342e1b96a5d";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[16];
+               uint32_t stream_id;
+       };
+};
+
+env {
+       vpid = 3208;
+       procname = "wk-heartbeat";
+       domain = "ust";
+       tracer_name = "lttng-ust";
+       tracer_major = 2;
+       tracer_minor = 0;
+       tracer_patchlevel = 2;
+};
+
+clock {
+       name = monotonic;
+       uuid = "c19b5ac9-b8e6-4f78-be95-a605d04e34c6";
+       description = "Monotonic Clock";
+       freq = 1000000000; /* Frequency, in Hz */
+       /* clock value offset from Epoch is: offset * (1/freq) */
+       offset = 1351530929945824323;
+};
+
+typealias integer {
+       size = 27; align = 1; signed = false;
+       map = clock.monotonic.value;
+} := uint27_clock_monotonic_t;
+
+typealias integer {
+       size = 32; align = 8; signed = false;
+       map = clock.monotonic.value;
+} := uint32_clock_monotonic_t;
+
+typealias integer {
+       size = 64; align = 8; signed = false;
+       map = clock.monotonic.value;
+} := uint64_clock_monotonic_t;
+
+struct packet_context {
+       uint64_clock_monotonic_t timestamp_begin;
+       uint64_clock_monotonic_t timestamp_end;
+       uint32_t events_discarded;
+       uint32_t content_size;
+       uint32_t packet_size;
+       uint32_t cpu_id;
+};
+
+struct event_header_compact {
+       enum : uint5_t { compact = 0 ... 30, extended = 31 } id;
+       variant <id> {
+               struct {
+                       uint27_clock_monotonic_t timestamp;
+               } compact;
+               struct {
+                       uint32_t id;
+                       uint64_clock_monotonic_t timestamp;
+               } extended;
+       } v;
+} align(8);
+
+struct event_header_large {
+       enum : uint16_t { compact = 0 ... 65534, extended = 65535 } id;
+       variant <id> {
+               struct {
+                       uint32_clock_monotonic_t timestamp;
+               } compact;
+               struct {
+                       uint32_t id;
+                       uint64_clock_monotonic_t timestamp;
+               } extended;
+       } v;
+} align(8);
+
+stream {
+       id = 0;
+       event.header := struct event_header_compact;
+       packet.context := struct packet_context;
+       event.context := struct {
+               integer { size = 32; align = 8; signed = 1; encoding = none; base = 10; } _vtid;
+               integer { size = 32; align = 8; signed = 1; encoding = none; base = 10; } _vpid;
+       };
+};
+
+event {
+       name = "heartbeat:msg";
+       id = 0;
+       stream_id = 0;
+       loglevel = 13;
+       fields := struct {
+               string _msg;
+       };
+};
+
+
diff --git a/tests/data/ctf-traces/fail/fail1/dummystream b/tests/data/ctf-traces/fail/fail1/dummystream
new file mode 100644 (file)
index 0000000..2601067
Binary files /dev/null and b/tests/data/ctf-traces/fail/fail1/dummystream differ
diff --git a/tests/data/ctf-traces/fail/fail1/metadata b/tests/data/ctf-traces/fail/fail1/metadata
new file mode 100644 (file)
index 0000000..28185f5
--- /dev/null
@@ -0,0 +1,49 @@
+/* CTF 1.8
+ *
+ * Architecture with 32-bit pointers, 32-bit integers, 32-bit longs.
+ */
+
+typealias integer { size = 1; align = 1; signed = false; } := uint1_t;
+typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
+typealias integer { size = 63; align = 1; signed = false; } := timestamp_t;
+
+typealias integer { size = 32; align = 32; signed = false; base = 10; } := uint32_t;
+typealias integer { size = 32; align = 32; signed = false; } := void *;
+
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[16];
+               uint32_t stream_id;
+       };
+};
+
+stream {
+       event.header := struct {
+               uint1_t id;
+               timestamp_t timestamp;
+       };
+       event.context := struct {
+               uint32_t thread_id;
+               uint32_t event_count;
+       };                      
+};
+
+event {
+       name = func_enter;
+       id = 0;
+       fields := struct {
+               void *func_called;
+               void *called_from;
+       };
+};
+
+event {
+       name = func_exit;
+       id = 1;
+};
diff --git a/tests/data/ctf-traces/fail/fail2/metadata b/tests/data/ctf-traces/fail/fail2/metadata
new file mode 100644 (file)
index 0000000..456661e
Binary files /dev/null and b/tests/data/ctf-traces/fail/fail2/metadata differ
diff --git a/tests/data/ctf-traces/fail/integer-range/metadata b/tests/data/ctf-traces/fail/integer-range/metadata
new file mode 100644 (file)
index 0000000..3574940
--- /dev/null
@@ -0,0 +1,27 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; } := uint32_t;
+
+trace {
+       /* Integer out of range */
+       major = 23452397856348975623897562893746589237465289374658923764598237645897234658723648579236;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[16];
+       };
+};
+
+stream {
+       packet.context := struct {
+               uint32_t content_size;
+               uint32_t packet_size;
+       };
+};
+
+event {
+       name = string;
+       fields := struct { string str; };
+};
diff --git a/tests/data/ctf-traces/fail/lttng-modules-2.0-pre1/metadata b/tests/data/ctf-traces/fail/lttng-modules-2.0-pre1/metadata
new file mode 100644 (file)
index 0000000..6f92a29
Binary files /dev/null and b/tests/data/ctf-traces/fail/lttng-modules-2.0-pre1/metadata differ
diff --git a/tests/data/ctf-traces/fail/packet-based-metadata/metadata b/tests/data/ctf-traces/fail/packet-based-metadata/metadata
new file mode 100644 (file)
index 0000000..e209780
Binary files /dev/null and b/tests/data/ctf-traces/fail/packet-based-metadata/metadata differ
diff --git a/tests/data/ctf-traces/fail/smalltrace/dummystream-fail b/tests/data/ctf-traces/fail/smalltrace/dummystream-fail
new file mode 100644 (file)
index 0000000..fc7e07c
--- /dev/null
@@ -0,0 +1 @@
\1füÁ*d
\ No newline at end of file
diff --git a/tests/data/ctf-traces/fail/smalltrace/metadata b/tests/data/ctf-traces/fail/smalltrace/metadata
new file mode 100644 (file)
index 0000000..86f8e0a
--- /dev/null
@@ -0,0 +1,19 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 0;
+       minor = 1;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[16];
+       };
+};
+
+event {
+       name = string;
+       fields := struct { string str; };
+};
diff --git a/tests/data/ctf-traces/intersection/3eventsintersect/metadata b/tests/data/ctf-traces/intersection/3eventsintersect/metadata
new file mode 100644 (file)
index 0000000..7cc1b4d
--- /dev/null
@@ -0,0 +1,58 @@
+/* CTF 1.8 */
+
+trace {
+       major = 1;
+       minor = 8;
+       uuid = "7afe8fbe-79b8-4f6a-bbc7-d0c782e7ddaf";
+       byte_order = be;
+       packet.header := struct {
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } magic;
+               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } uuid[16];
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } stream_id;
+       } align(8);
+};
+
+env {
+       host = "sinkpad";
+};
+
+clock {
+       name = test_clock;
+       uuid = "7b9e2f2a-530e-4ab1-816f-0831b5c09140";
+       description = "This is a test clock";
+       freq = 1000000000;
+       precision = 10;
+       offset_s = 13515309;
+       offset = 0;
+       absolute = TRUE;
+};
+
+stream {
+       id = 0;
+       event.header := struct {
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } id;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; map = clock.test_clock.value; } timestamp;
+       } align(8);
+
+       packet.context := struct {
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_begin;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_end;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } content_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } packet_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } events_discarded;
+               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_seq_num;
+       } align(8);
+};
+
+event {
+       id = 0;
+       name = "dummy_event";
+       stream_id = 0;
+       fields := struct {
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } dummy_value;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } tracefile_id;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_begin;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_end;
+       } align(1);
+};
+
diff --git a/tests/data/ctf-traces/intersection/3eventsintersect/test_stream_0 b/tests/data/ctf-traces/intersection/3eventsintersect/test_stream_0
new file mode 100644 (file)
index 0000000..6a69e44
Binary files /dev/null and b/tests/data/ctf-traces/intersection/3eventsintersect/test_stream_0 differ
diff --git a/tests/data/ctf-traces/intersection/3eventsintersect/test_stream_1 b/tests/data/ctf-traces/intersection/3eventsintersect/test_stream_1
new file mode 100644 (file)
index 0000000..0cf1404
Binary files /dev/null and b/tests/data/ctf-traces/intersection/3eventsintersect/test_stream_1 differ
diff --git a/tests/data/ctf-traces/intersection/3eventsintersectreverse/metadata b/tests/data/ctf-traces/intersection/3eventsintersectreverse/metadata
new file mode 100644 (file)
index 0000000..7cc1b4d
--- /dev/null
@@ -0,0 +1,58 @@
+/* CTF 1.8 */
+
+trace {
+       major = 1;
+       minor = 8;
+       uuid = "7afe8fbe-79b8-4f6a-bbc7-d0c782e7ddaf";
+       byte_order = be;
+       packet.header := struct {
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } magic;
+               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } uuid[16];
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } stream_id;
+       } align(8);
+};
+
+env {
+       host = "sinkpad";
+};
+
+clock {
+       name = test_clock;
+       uuid = "7b9e2f2a-530e-4ab1-816f-0831b5c09140";
+       description = "This is a test clock";
+       freq = 1000000000;
+       precision = 10;
+       offset_s = 13515309;
+       offset = 0;
+       absolute = TRUE;
+};
+
+stream {
+       id = 0;
+       event.header := struct {
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } id;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; map = clock.test_clock.value; } timestamp;
+       } align(8);
+
+       packet.context := struct {
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_begin;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_end;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } content_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } packet_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } events_discarded;
+               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_seq_num;
+       } align(8);
+};
+
+event {
+       id = 0;
+       name = "dummy_event";
+       stream_id = 0;
+       fields := struct {
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } dummy_value;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } tracefile_id;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_begin;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_end;
+       } align(1);
+};
+
diff --git a/tests/data/ctf-traces/intersection/3eventsintersectreverse/test_stream_0 b/tests/data/ctf-traces/intersection/3eventsintersectreverse/test_stream_0
new file mode 100644 (file)
index 0000000..0cf1404
Binary files /dev/null and b/tests/data/ctf-traces/intersection/3eventsintersectreverse/test_stream_0 differ
diff --git a/tests/data/ctf-traces/intersection/3eventsintersectreverse/test_stream_1 b/tests/data/ctf-traces/intersection/3eventsintersectreverse/test_stream_1
new file mode 100644 (file)
index 0000000..6a69e44
Binary files /dev/null and b/tests/data/ctf-traces/intersection/3eventsintersectreverse/test_stream_1 differ
diff --git a/tests/data/ctf-traces/intersection/nointersect/metadata b/tests/data/ctf-traces/intersection/nointersect/metadata
new file mode 100644 (file)
index 0000000..5e14a71
--- /dev/null
@@ -0,0 +1,58 @@
+/* CTF 1.8 */
+
+trace {
+       major = 1;
+       minor = 8;
+       uuid = "a967fbc0-c89b-4b92-b5df-30688d576ddf";
+       byte_order = be;
+       packet.header := struct {
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } magic;
+               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } uuid[16];
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } stream_id;
+       } align(8);
+};
+
+env {
+       host = "sinkpad";
+};
+
+clock {
+       name = test_clock;
+       uuid = "fb759646-b2b9-42d7-9013-f790694dd902";
+       description = "This is a test clock";
+       freq = 1000000000;
+       precision = 10;
+       offset_s = 13515309;
+       offset = 0;
+       absolute = TRUE;
+};
+
+stream {
+       id = 0;
+       event.header := struct {
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } id;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; map = clock.test_clock.value; } timestamp;
+       } align(8);
+
+       packet.context := struct {
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_begin;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_end;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } content_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } packet_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } events_discarded;
+               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_seq_num;
+       } align(8);
+};
+
+event {
+       id = 0;
+       name = "dummy_event";
+       stream_id = 0;
+       fields := struct {
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } dummy_value;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } tracefile_id;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_begin;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_end;
+       } align(1);
+};
+
diff --git a/tests/data/ctf-traces/intersection/nointersect/test_stream_0 b/tests/data/ctf-traces/intersection/nointersect/test_stream_0
new file mode 100644 (file)
index 0000000..7c32bae
Binary files /dev/null and b/tests/data/ctf-traces/intersection/nointersect/test_stream_0 differ
diff --git a/tests/data/ctf-traces/intersection/nointersect/test_stream_1 b/tests/data/ctf-traces/intersection/nointersect/test_stream_1
new file mode 100644 (file)
index 0000000..e656ba6
Binary files /dev/null and b/tests/data/ctf-traces/intersection/nointersect/test_stream_1 differ
diff --git a/tests/data/ctf-traces/intersection/nostream/metadata b/tests/data/ctf-traces/intersection/nostream/metadata
new file mode 100644 (file)
index 0000000..5e14a71
--- /dev/null
@@ -0,0 +1,58 @@
+/* CTF 1.8 */
+
+trace {
+       major = 1;
+       minor = 8;
+       uuid = "a967fbc0-c89b-4b92-b5df-30688d576ddf";
+       byte_order = be;
+       packet.header := struct {
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } magic;
+               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } uuid[16];
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } stream_id;
+       } align(8);
+};
+
+env {
+       host = "sinkpad";
+};
+
+clock {
+       name = test_clock;
+       uuid = "fb759646-b2b9-42d7-9013-f790694dd902";
+       description = "This is a test clock";
+       freq = 1000000000;
+       precision = 10;
+       offset_s = 13515309;
+       offset = 0;
+       absolute = TRUE;
+};
+
+stream {
+       id = 0;
+       event.header := struct {
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } id;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; map = clock.test_clock.value; } timestamp;
+       } align(8);
+
+       packet.context := struct {
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_begin;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_end;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } content_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } packet_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } events_discarded;
+               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_seq_num;
+       } align(8);
+};
+
+event {
+       id = 0;
+       name = "dummy_event";
+       stream_id = 0;
+       fields := struct {
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } dummy_value;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } tracefile_id;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_begin;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_end;
+       } align(1);
+};
+
diff --git a/tests/data/ctf-traces/intersection/onestream/metadata b/tests/data/ctf-traces/intersection/onestream/metadata
new file mode 100644 (file)
index 0000000..5e14a71
--- /dev/null
@@ -0,0 +1,58 @@
+/* CTF 1.8 */
+
+trace {
+       major = 1;
+       minor = 8;
+       uuid = "a967fbc0-c89b-4b92-b5df-30688d576ddf";
+       byte_order = be;
+       packet.header := struct {
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } magic;
+               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } uuid[16];
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } stream_id;
+       } align(8);
+};
+
+env {
+       host = "sinkpad";
+};
+
+clock {
+       name = test_clock;
+       uuid = "fb759646-b2b9-42d7-9013-f790694dd902";
+       description = "This is a test clock";
+       freq = 1000000000;
+       precision = 10;
+       offset_s = 13515309;
+       offset = 0;
+       absolute = TRUE;
+};
+
+stream {
+       id = 0;
+       event.header := struct {
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } id;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; map = clock.test_clock.value; } timestamp;
+       } align(8);
+
+       packet.context := struct {
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_begin;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_end;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } content_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } packet_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } events_discarded;
+               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_seq_num;
+       } align(8);
+};
+
+event {
+       id = 0;
+       name = "dummy_event";
+       stream_id = 0;
+       fields := struct {
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } dummy_value;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } tracefile_id;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_begin;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_end;
+       } align(1);
+};
+
diff --git a/tests/data/ctf-traces/intersection/onestream/test_stream_0 b/tests/data/ctf-traces/intersection/onestream/test_stream_0
new file mode 100644 (file)
index 0000000..7c32bae
Binary files /dev/null and b/tests/data/ctf-traces/intersection/onestream/test_stream_0 differ
diff --git a/tests/data/ctf-traces/packet_seq_num/2_lost_before_last/metadata b/tests/data/ctf-traces/packet_seq_num/2_lost_before_last/metadata
new file mode 100644 (file)
index 0000000..36e26cd
--- /dev/null
@@ -0,0 +1,58 @@
+/* CTF 1.8 */
+
+trace {
+       major = 1;
+       minor = 8;
+       uuid = "ad21eeaa-fab9-4692-aab8-ebd68c7feb17";
+       byte_order = be;
+       packet.header := struct {
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } magic;
+               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } uuid[16];
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } stream_id;
+       } align(8);
+};
+
+env {
+       host = "sinkpad";
+};
+
+clock {
+       name = test_clock;
+       uuid = "d336520f-985d-481e-8e35-d99328655354";
+       description = "This is a test clock";
+       freq = 1000000000;
+       precision = 10;
+       offset_s = 13515309;
+       offset = 0;
+       absolute = TRUE;
+};
+
+stream {
+       id = 0;
+       event.header := struct {
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } id;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; map = clock.test_clock.value; } timestamp;
+       } align(8);
+
+       packet.context := struct {
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_begin;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_end;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } content_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } packet_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } events_discarded;
+               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_seq_num;
+       } align(8);
+};
+
+event {
+       id = 0;
+       name = "dummy_event";
+       stream_id = 0;
+       fields := struct {
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } dummy_value;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } tracefile_id;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_begin;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_end;
+       } align(1);
+};
+
diff --git a/tests/data/ctf-traces/packet_seq_num/2_lost_before_last/test_stream_0 b/tests/data/ctf-traces/packet_seq_num/2_lost_before_last/test_stream_0
new file mode 100644 (file)
index 0000000..50d36a4
Binary files /dev/null and b/tests/data/ctf-traces/packet_seq_num/2_lost_before_last/test_stream_0 differ
diff --git a/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_1/metadata b/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_1/metadata
new file mode 100644 (file)
index 0000000..525405e
--- /dev/null
@@ -0,0 +1,58 @@
+/* CTF 1.8 */
+
+trace {
+       major = 1;
+       minor = 8;
+       uuid = "61db8e6b-2069-40e4-84ed-bc15f42181f0";
+       byte_order = be;
+       packet.header := struct {
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } magic;
+               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } uuid[16];
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } stream_id;
+       } align(8);
+};
+
+env {
+       host = "sinkpad";
+};
+
+clock {
+       name = test_clock;
+       uuid = "a0a8c252-db03-4f36-a148-80a0a3c4edff";
+       description = "This is a test clock";
+       freq = 1000000000;
+       precision = 10;
+       offset_s = 13515309;
+       offset = 0;
+       absolute = TRUE;
+};
+
+stream {
+       id = 0;
+       event.header := struct {
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } id;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; map = clock.test_clock.value; } timestamp;
+       } align(8);
+
+       packet.context := struct {
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_begin;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_end;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } content_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } packet_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } events_discarded;
+               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_seq_num;
+       } align(8);
+};
+
+event {
+       id = 0;
+       name = "dummy_event";
+       stream_id = 0;
+       fields := struct {
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } dummy_value;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } tracefile_id;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_begin;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_end;
+       } align(1);
+};
+
diff --git a/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_1/test_stream_0 b/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_1/test_stream_0
new file mode 100644 (file)
index 0000000..1b362cd
Binary files /dev/null and b/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_1/test_stream_0 differ
diff --git a/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_1/test_stream_1 b/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_1/test_stream_1
new file mode 100644 (file)
index 0000000..d5114d9
Binary files /dev/null and b/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_1/test_stream_1 differ
diff --git a/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_2/metadata b/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_2/metadata
new file mode 100644 (file)
index 0000000..680d910
--- /dev/null
@@ -0,0 +1,58 @@
+/* CTF 1.8 */
+
+trace {
+       major = 1;
+       minor = 8;
+       uuid = "eb5045f7-b471-488e-b963-0221ddf423a7";
+       byte_order = be;
+       packet.header := struct {
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } magic;
+               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } uuid[16];
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } stream_id;
+       } align(8);
+};
+
+env {
+       host = "sinkpad";
+};
+
+clock {
+       name = test_clock;
+       uuid = "2447a359-1e57-448f-96ef-3c324327047c";
+       description = "This is a test clock";
+       freq = 1000000000;
+       precision = 10;
+       offset_s = 13515309;
+       offset = 0;
+       absolute = TRUE;
+};
+
+stream {
+       id = 0;
+       event.header := struct {
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } id;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; map = clock.test_clock.value; } timestamp;
+       } align(8);
+
+       packet.context := struct {
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_begin;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_end;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } content_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } packet_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } events_discarded;
+               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_seq_num;
+       } align(8);
+};
+
+event {
+       id = 0;
+       name = "dummy_event";
+       stream_id = 0;
+       fields := struct {
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } dummy_value;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } tracefile_id;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_begin;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_end;
+       } align(1);
+};
+
diff --git a/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_2/test_stream_0 b/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_2/test_stream_0
new file mode 100644 (file)
index 0000000..b0beb6b
Binary files /dev/null and b/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_2/test_stream_0 differ
diff --git a/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_2/test_stream_1 b/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_2/test_stream_1
new file mode 100644 (file)
index 0000000..1ad8320
Binary files /dev/null and b/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_2/test_stream_1 differ
diff --git a/tests/data/ctf-traces/packet_seq_num/no_lost/metadata b/tests/data/ctf-traces/packet_seq_num/no_lost/metadata
new file mode 100644 (file)
index 0000000..d562061
--- /dev/null
@@ -0,0 +1,58 @@
+/* CTF 1.8 */
+
+trace {
+       major = 1;
+       minor = 8;
+       uuid = "b7d90429-287f-45ff-897c-3db7c5ab8b5a";
+       byte_order = be;
+       packet.header := struct {
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } magic;
+               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } uuid[16];
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } stream_id;
+       } align(8);
+};
+
+env {
+       host = "sinkpad";
+};
+
+clock {
+       name = test_clock;
+       uuid = "004fa3e8-48aa-453a-8be8-9d30ead9ac66";
+       description = "This is a test clock";
+       freq = 1000000000;
+       precision = 10;
+       offset_s = 13515309;
+       offset = 0;
+       absolute = TRUE;
+};
+
+stream {
+       id = 0;
+       event.header := struct {
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } id;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; map = clock.test_clock.value; } timestamp;
+       } align(8);
+
+       packet.context := struct {
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_begin;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_end;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } content_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } packet_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } events_discarded;
+               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_seq_num;
+       } align(8);
+};
+
+event {
+       id = 0;
+       name = "dummy_event";
+       stream_id = 0;
+       fields := struct {
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } dummy_value;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } tracefile_id;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_begin;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_end;
+       } align(1);
+};
+
diff --git a/tests/data/ctf-traces/packet_seq_num/no_lost/test_stream_0 b/tests/data/ctf-traces/packet_seq_num/no_lost/test_stream_0
new file mode 100644 (file)
index 0000000..15821fb
Binary files /dev/null and b/tests/data/ctf-traces/packet_seq_num/no_lost/test_stream_0 differ
diff --git a/tests/data/ctf-traces/packet_seq_num/no_lost_not_starting_at_0/metadata b/tests/data/ctf-traces/packet_seq_num/no_lost_not_starting_at_0/metadata
new file mode 100644 (file)
index 0000000..c8f5783
--- /dev/null
@@ -0,0 +1,58 @@
+/* CTF 1.8 */
+
+trace {
+       major = 1;
+       minor = 8;
+       uuid = "0bef2d78-5020-4b09-b520-64480ef5c0e6";
+       byte_order = be;
+       packet.header := struct {
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } magic;
+               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } uuid[16];
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } stream_id;
+       } align(8);
+};
+
+env {
+       host = "sinkpad";
+};
+
+clock {
+       name = test_clock;
+       uuid = "ae130a0d-e10b-49cb-8b2d-64beaa23814c";
+       description = "This is a test clock";
+       freq = 1000000000;
+       precision = 10;
+       offset_s = 13932323;
+       offset = 0;
+       absolute = TRUE;
+};
+
+stream {
+       id = 0;
+       event.header := struct {
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } id;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; map = clock.test_clock.value; } timestamp;
+       } align(8);
+
+       packet.context := struct {
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_begin;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } timestamp_end;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } content_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } packet_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = be; } events_discarded;
+               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_seq_num;
+       } align(8);
+};
+
+event {
+       id = 0;
+       name = "dummy_event";
+       stream_id = 0;
+       fields := struct {
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } dummy_value;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } tracefile_id;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_begin;
+               integer { size = 32; align = 1; signed = false; encoding = none; base = decimal; byte_order = be; } packet_end;
+       } align(1);
+};
+
diff --git a/tests/data/ctf-traces/packet_seq_num/no_lost_not_starting_at_0/test_stream_0 b/tests/data/ctf-traces/packet_seq_num/no_lost_not_starting_at_0/test_stream_0
new file mode 100644 (file)
index 0000000..f9639a3
Binary files /dev/null and b/tests/data/ctf-traces/packet_seq_num/no_lost_not_starting_at_0/test_stream_0 differ
diff --git a/tests/data/ctf-traces/succeed/env-warning/dummystream b/tests/data/ctf-traces/succeed/env-warning/dummystream
new file mode 100644 (file)
index 0000000..53d735e
Binary files /dev/null and b/tests/data/ctf-traces/succeed/env-warning/dummystream differ
diff --git a/tests/data/ctf-traces/succeed/env-warning/metadata b/tests/data/ctf-traces/succeed/env-warning/metadata
new file mode 100644 (file)
index 0000000..0fb823c
--- /dev/null
@@ -0,0 +1,30 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 1;
+       minor = 8;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[16];
+       };
+};
+
+env {
+       dummy = "blah";
+};
+
+stream {
+       packet.context := struct {
+               uint32_t content_size;
+               uint32_t packet_size;
+       };
+};
+
+event {
+       name = string;
+       fields := struct { string str; };
+};
diff --git a/tests/data/ctf-traces/succeed/ev-disc-no-ts-begin-end/metadata b/tests/data/ctf-traces/succeed/ev-disc-no-ts-begin-end/metadata
new file mode 100644 (file)
index 0000000..1b4803b
--- /dev/null
@@ -0,0 +1,21 @@
+/* CTF 1.8 */
+
+trace {
+       major = 1;
+       minor = 8;
+       byte_order = be;
+};
+
+stream {
+       packet.context := struct {
+               integer { size = 8; } packet_size;
+               integer { size = 8; } events_discarded;
+       };
+};
+
+event {
+       name = "ev";
+       fields := struct {
+               string s;
+       };
+};
diff --git a/tests/data/ctf-traces/succeed/ev-disc-no-ts-begin-end/stream b/tests/data/ctf-traces/succeed/ev-disc-no-ts-begin-end/stream
new file mode 100644 (file)
index 0000000..b42129a
Binary files /dev/null and b/tests/data/ctf-traces/succeed/ev-disc-no-ts-begin-end/stream differ
diff --git a/tests/data/ctf-traces/succeed/no-packet-context/metadata b/tests/data/ctf-traces/succeed/no-packet-context/metadata
new file mode 100644 (file)
index 0000000..c811432
--- /dev/null
@@ -0,0 +1,14 @@
+/* CTF 1.8 */
+
+trace {
+       major = 1;
+       minor = 8;
+       byte_order = be;
+};
+
+event {
+       name = "ev";
+       fields := struct {
+               string s;
+       };
+};
diff --git a/tests/data/ctf-traces/succeed/no-packet-context/stream b/tests/data/ctf-traces/succeed/no-packet-context/stream
new file mode 100644 (file)
index 0000000..0db2632
Binary files /dev/null and b/tests/data/ctf-traces/succeed/no-packet-context/stream differ
diff --git a/tests/data/ctf-traces/succeed/sequence/channel0_0 b/tests/data/ctf-traces/succeed/sequence/channel0_0
new file mode 100644 (file)
index 0000000..5038a22
Binary files /dev/null and b/tests/data/ctf-traces/succeed/sequence/channel0_0 differ
diff --git a/tests/data/ctf-traces/succeed/sequence/channel0_1 b/tests/data/ctf-traces/succeed/sequence/channel0_1
new file mode 100644 (file)
index 0000000..fd94738
Binary files /dev/null and b/tests/data/ctf-traces/succeed/sequence/channel0_1 differ
diff --git a/tests/data/ctf-traces/succeed/sequence/channel0_2 b/tests/data/ctf-traces/succeed/sequence/channel0_2
new file mode 100644 (file)
index 0000000..9d848fc
Binary files /dev/null and b/tests/data/ctf-traces/succeed/sequence/channel0_2 differ
diff --git a/tests/data/ctf-traces/succeed/sequence/channel0_3 b/tests/data/ctf-traces/succeed/sequence/channel0_3
new file mode 100644 (file)
index 0000000..ef385c3
Binary files /dev/null and b/tests/data/ctf-traces/succeed/sequence/channel0_3 differ
diff --git a/tests/data/ctf-traces/succeed/sequence/metadata b/tests/data/ctf-traces/succeed/sequence/metadata
new file mode 100644 (file)
index 0000000..2163abf
--- /dev/null
@@ -0,0 +1,106 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
+typealias integer { size = 16; align = 8; signed = false; } := uint16_t;
+typealias integer { size = 32; align = 8; signed = false; } := uint32_t;
+typealias integer { size = 64; align = 8; signed = false; } := uint64_t;
+typealias integer { size = 64; align = 8; signed = false; } := unsigned long;
+typealias integer { size = 5; align = 1; signed = false; } := uint5_t;
+typealias integer { size = 27; align = 1; signed = false; } := uint27_t;
+
+trace {
+       major = 1;
+       minor = 8;
+       uuid = "59052333-e490-4ed9-af7a-b652437fba9a";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[16];
+               uint32_t stream_id;
+       };
+};
+
+env {
+       hostname = "host";
+       domain = "ust";
+       tracer_name = "lttng-ust";
+       tracer_major = 2;
+       tracer_minor = 3;
+};
+
+clock {
+       name = monotonic;
+       uuid = "5f3ed925-9d73-4637-b8e4-02077abc8c8f";
+       description = "Monotonic Clock";
+       freq = 1000000000; /* Frequency, in Hz */
+       /* clock value offset from Epoch is: offset * (1/freq) */
+       offset = 1375437179542680815;
+};
+
+typealias integer {
+       size = 27; align = 1; signed = false;
+       map = clock.monotonic.value;
+} := uint27_clock_monotonic_t;
+
+typealias integer {
+       size = 32; align = 8; signed = false;
+       map = clock.monotonic.value;
+} := uint32_clock_monotonic_t;
+
+typealias integer {
+       size = 64; align = 8; signed = false;
+       map = clock.monotonic.value;
+} := uint64_clock_monotonic_t;
+
+struct packet_context {
+       uint64_clock_monotonic_t timestamp_begin;
+       uint64_clock_monotonic_t timestamp_end;
+       uint64_t content_size;
+       uint64_t packet_size;
+       unsigned long events_discarded;
+       uint32_t cpu_id;
+};
+
+struct event_header_compact {
+       enum : uint5_t { compact = 0 ... 30, extended = 31 } id;
+       variant <id> {
+               struct {
+                       uint27_clock_monotonic_t timestamp;
+               } compact;
+               struct {
+                       uint32_t id;
+                       uint64_clock_monotonic_t timestamp;
+               } extended;
+       } v;
+} align(8);
+
+struct event_header_large {
+       enum : uint16_t { compact = 0 ... 65534, extended = 65535 } id;
+       variant <id> {
+               struct {
+                       uint32_clock_monotonic_t timestamp;
+               } compact;
+               struct {
+                       uint32_t id;
+                       uint64_clock_monotonic_t timestamp;
+               } extended;
+       } v;
+} align(8);
+
+stream {
+       id = 0;
+       event.header := struct event_header_compact;
+       packet.context := struct packet_context;
+};
+
+event {
+       name = "sequence event";
+       id = 0;
+       stream_id = 0;
+       loglevel = 1;
+       fields := struct {
+               integer { size = 64; align = 8; signed = 0; encoding = none; base = 10; } __seq_int_field_length;
+               integer { size = 32; align = 8; signed = 1; encoding = none; base = 10; } _seq_int_field[ __seq_int_field_length ];
+               integer { size = 64; align = 8; signed = 0; encoding = none; base = 10; } __seq_long_field_length;
+               integer { size = 64; align = 8; signed = 1; encoding = none; base = 10; } _seq_long_field[ __seq_long_field_length ];
+       };
+};
diff --git a/tests/data/ctf-traces/succeed/smalltrace/dummystream b/tests/data/ctf-traces/succeed/smalltrace/dummystream
new file mode 100644 (file)
index 0000000..469cb9a
Binary files /dev/null and b/tests/data/ctf-traces/succeed/smalltrace/dummystream differ
diff --git a/tests/data/ctf-traces/succeed/smalltrace/metadata b/tests/data/ctf-traces/succeed/smalltrace/metadata
new file mode 100644 (file)
index 0000000..bf356a8
--- /dev/null
@@ -0,0 +1,19 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 1;
+       minor = 8;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[16];
+       };
+};
+
+event {
+       name = string;
+       fields := struct { string str; };
+};
diff --git a/tests/data/ctf-traces/succeed/succeed1/dummystream b/tests/data/ctf-traces/succeed/succeed1/dummystream
new file mode 100644 (file)
index 0000000..53d735e
Binary files /dev/null and b/tests/data/ctf-traces/succeed/succeed1/dummystream differ
diff --git a/tests/data/ctf-traces/succeed/succeed1/metadata b/tests/data/ctf-traces/succeed/succeed1/metadata
new file mode 100644 (file)
index 0000000..2c18b9d
--- /dev/null
@@ -0,0 +1,26 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; } := uint32_t;
+
+trace {
+       major = 1;
+       minor = 8;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[16];
+       };
+};
+
+stream {
+       packet.context := struct {
+               uint32_t content_size;
+               uint32_t packet_size;
+       };
+};
+
+event {
+       name = string;
+       fields := struct { string str; };
+};
diff --git a/tests/data/ctf-traces/succeed/succeed2/dummystream b/tests/data/ctf-traces/succeed/succeed2/dummystream
new file mode 100644 (file)
index 0000000..53d735e
Binary files /dev/null and b/tests/data/ctf-traces/succeed/succeed2/dummystream differ
diff --git a/tests/data/ctf-traces/succeed/succeed2/metadata b/tests/data/ctf-traces/succeed/succeed2/metadata
new file mode 100644 (file)
index 0000000..c52443f
--- /dev/null
@@ -0,0 +1,26 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 1;
+       minor = 8;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[16];
+       };
+};
+
+stream {
+       packet.context := struct {
+               uint32_t content_size;
+               uint32_t packet_size;
+       };
+};
+
+event {
+       name = string;
+       fields := struct { string str; };
+};
diff --git a/tests/data/ctf-traces/succeed/succeed3/dummystream b/tests/data/ctf-traces/succeed/succeed3/dummystream
new file mode 100644 (file)
index 0000000..53d735e
Binary files /dev/null and b/tests/data/ctf-traces/succeed/succeed3/dummystream differ
diff --git a/tests/data/ctf-traces/succeed/succeed3/metadata b/tests/data/ctf-traces/succeed/succeed3/metadata
new file mode 100644 (file)
index 0000000..5bcd1c8
--- /dev/null
@@ -0,0 +1,29 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 1;
+       minor = 8;
+       test = "\"";
+       test2 = "?\x20\040?";
+       test3 = '\n';
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[16];
+       };
+};
+
+stream {
+       packet.context := struct {
+               uint32_t content_size;
+               uint32_t packet_size;
+       };
+};
+
+event {
+       name = string;
+       fields := struct { string str; };
+};
diff --git a/tests/data/ctf-traces/succeed/succeed4/metadata b/tests/data/ctf-traces/succeed/succeed4/metadata
new file mode 100644 (file)
index 0000000..63979e9
--- /dev/null
@@ -0,0 +1,31 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; } := uint32_t;
+
+trace {
+       major = 1;
+       minor = 8;
+       test = 0xABC234;        /* hexadecimal */
+       test1 = 06534;          /* octal */
+       test2 = 1234;           /* decimal */
+       test3 = +1234;          /* decimal with + unary op */
+       test4 = -1234;          /* decimal (negated) */
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[16];
+       };
+};
+
+stream {
+       packet.context := struct {
+               uint32_t content_size;
+               uint32_t packet_size;
+       };
+};
+
+event {
+       name = string;
+       fields := struct { string str; };
+};
diff --git a/tests/data/ctf-traces/succeed/warnings/dummystream b/tests/data/ctf-traces/succeed/warnings/dummystream
new file mode 100644 (file)
index 0000000..53d735e
Binary files /dev/null and b/tests/data/ctf-traces/succeed/warnings/dummystream differ
diff --git a/tests/data/ctf-traces/succeed/warnings/metadata b/tests/data/ctf-traces/succeed/warnings/metadata
new file mode 100644 (file)
index 0000000..125a5d5
--- /dev/null
@@ -0,0 +1,29 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; aa = bb; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; zz = aa; } := uint32_t;
+
+trace {
+       major = 1;
+       minor = 8;
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[16];
+       };
+       blah = "aaa";
+};
+
+stream {
+       packet.context := struct {
+               uint32_t content_size;
+               uint32_t packet_size;
+       };
+       askdjfhaskdjfh = 1;
+};
+
+event {
+       name = string;
+       fields := struct { string str; };
+       asdjfhah := struct { uint8_t ffff; };
+};
diff --git a/tests/data/ctf-traces/succeed/wk-heartbeat-u/metadata b/tests/data/ctf-traces/succeed/wk-heartbeat-u/metadata
new file mode 100644 (file)
index 0000000..e35f463
Binary files /dev/null and b/tests/data/ctf-traces/succeed/wk-heartbeat-u/metadata differ
diff --git a/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_0 b/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_0
new file mode 100644 (file)
index 0000000..3af2cdc
Binary files /dev/null and b/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_0 differ
diff --git a/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_1 b/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_1
new file mode 100644 (file)
index 0000000..7b74c03
Binary files /dev/null and b/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_1 differ
diff --git a/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_2 b/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_2
new file mode 100644 (file)
index 0000000..13a69fc
Binary files /dev/null and b/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_2 differ
diff --git a/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_3 b/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_3
new file mode 100644 (file)
index 0000000..1cdde72
Binary files /dev/null and b/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_3 differ
diff --git a/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_4 b/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_4
new file mode 100644 (file)
index 0000000..c136034
Binary files /dev/null and b/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_4 differ
diff --git a/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_5 b/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_5
new file mode 100644 (file)
index 0000000..a0a5881
Binary files /dev/null and b/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_5 differ
diff --git a/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_6 b/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_6
new file mode 100644 (file)
index 0000000..b1c8520
Binary files /dev/null and b/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_6 differ
diff --git a/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_7 b/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_7
new file mode 100644 (file)
index 0000000..05f7393
Binary files /dev/null and b/tests/data/ctf-traces/succeed/wk-heartbeat-u/u_7 differ
diff --git a/tests/data/debug-info/Makefile b/tests/data/debug-info/Makefile
new file mode 100644 (file)
index 0000000..2820805
--- /dev/null
@@ -0,0 +1,50 @@
+BUILD_ID_PREFIX=cd
+BUILD_ID_SUFFIX=d98cdd87f7fe64c13b6daad553987eafd40cbb
+BUILD_ID=$(BUILD_ID_PREFIX)$(BUILD_ID_SUFFIX)
+
+BUILD_DIR ?= build
+
+OBJS=$(BUILD_DIR)/dwarf_full/libhello_so \
+     $(BUILD_DIR)/elf_only/libhello_so \
+     $(BUILD_DIR)/build_id/libhello_so \
+     $(BUILD_DIR)/debug_link/libhello_so
+
+all: $(OBJS)
+
+%.o: %.c
+       $(CC) -gdwarf -fdebug-prefix-map=$(CURDIR)=. -fPIC -c -I. -o $@ $<
+
+# Master copy: ELF with DWARF and build-id
+$(BUILD_DIR)/dwarf_full/libhello_so: tp.o libhello.o
+       mkdir -p $(@D)
+       $(CC) -shared -gdwarf -llttng-ust -ldl -Wl,-soname,libhello.so -Wl,--build-id=0x$(BUILD_ID) -o $@ $^
+
+# ELF only, no debug symbols, no build-d
+$(BUILD_DIR)/elf_only/libhello_so: $(BUILD_DIR)/dwarf_full/libhello_so
+       mkdir -p $(@D)
+       objcopy -g $< $@.tmp
+       objcopy --remove-section=.note.gnu.build-id $@.tmp
+       mv $@.tmp $@
+
+# ELF with external build-id DWARF
+$(BUILD_DIR)/build_id/libhello_so: $(BUILD_DIR)/dwarf_full/libhello_so
+       mkdir -p $(@D)/.build-id/$(BUILD_ID_PREFIX)
+       objcopy --only-keep-debug $< $(@D)/.build-id/$(BUILD_ID_PREFIX)/$(BUILD_ID_SUFFIX).debug
+       objcopy -g $< $@
+
+# ELF with external debug link DWARF
+$(BUILD_DIR)/debug_link/libhello_so: $(BUILD_DIR)/dwarf_full/libhello_so
+       mkdir -p $(@D)
+       objcopy --remove-section=.note.gnu.build-id $< $@.tmp
+       objcopy --only-keep-debug $@.tmp $(@D)/libhello_so.debug
+       objcopy -g $@.tmp
+       cd $(@D) && objcopy --add-gnu-debuglink=libhello_so.debug $(@F).tmp
+       mv $@.tmp $@
+
+clean:
+       rm -f *.o
+
+dist-clean: clean
+       rm -rf $(BUILD_DIR)
+
+.PHONY: all clean dist-clean
diff --git a/tests/data/debug-info/README.md b/tests/data/debug-info/README.md
new file mode 100644 (file)
index 0000000..1912194
--- /dev/null
@@ -0,0 +1,81 @@
+debug-info-data
+==============
+
+This directory contains pre-generated ELF and DWARF files used to test
+the debug info analysis feature, including lookup of DWARF debugging
+information via build ID and debug link methods, as well as the source
+files used to generate them.
+
+The generated files are:
+
+* `ARCH/dwarf_full/libhello_so` (ELF and DWARF)
+* `ARCH/elf_only/libhello_so` (ELF only)
+* `ARCH/build_id/libhello_so` (ELF with separate DWARF via build ID)
+* `ARCH/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug` (DWARF for build ID)
+* `ARCH/debug_link/libhello_so` (ELF with separate DWARF via debug link)
+* `ARCH/debug_link/libhello_so.debug` (DWARF for debug link)
+
+We use a suffix of "_so" instead of ".so" since some distributions
+build systems will consider ".so" files as artifacts from a previous
+build that were "left-over" and will remove them prior to the build.
+
+All files are generated from the four (4) following source files:
+
+* libhello.c
+* libhello.h
+* tp.c
+* tp.h
+
+The generated executables were built using a native GNU toolchain on either
+Ubuntu 16.04 or 18.04 depending on the architecture.
+
+To regenerate them, you can use the included Makefile or follow these steps:
+
+## Generate the object files
+
+    $ gcc -gdwarf -fdebug-prefix-map=$(pwd)=. -fPIC -c -I. tp.c libhello.c
+
+## Combined ELF and DWARF
+
+    $ build_id_prefix=cd
+    $ build_id_suffix=d98cdd87f7fe64c13b6daad553987eafd40cbb
+    $ build_id="$build_id_prefix$build_id_suffix"
+    $ mkdir dwarf_full
+    $ gcc -shared -g -llttng-ust -ldl -Wl,-soname,libhello.so -Wl,--build-id=0x$build_id -o dwarf_full/libhello_so tp.o libhello.o
+
+## ELF only
+
+    $ mkdir elf_only
+    $ objcopy -g dwarf_full/libhello_so elf_only/libhello_so
+    $ objcopy --remove-section=.note.gnu.build-id elf_only/libhello_so
+
+## ELF and DWARF with Build ID
+
+    $ mkdir -p build_id/.build-id/$build_id_prefix
+    $ objcopy --only-keep-debug dwarf_full/libhello_so build_id/.build-id/$build_id_prefix/$build_id_suffix.debug
+    $ objcopy -g dwarf_full/libhello_so build_id/libhello_so
+
+##  ELF and DWARF with Debug Link
+
+    $ mkdir debug_link
+    $ objcopy --remove-section=.note.gnu.build-id dwarf_full/libhello_so debug_link/libhello_so
+    $ objcopy --only-keep-debug debug_link/libhello_so debug_link/libhello_so.debug
+    $ objcopy -g debug_link/libhello_so
+    $ cd debug_link && objcopy --add-gnu-debuglink=libhello_so.debug libhello_so && cd ..
+
+
+Test program
+------------
+An executable linked to this library can be compiled from the `main.c` source file.
+To compile it, you can do:
+
+    $ ln -s libhello_so libhello.so
+    $ gcc -I. -o test main.c -L. -lhello_build_id -llttng-ust -ldl -Wl,--rpath=.
+
+The trace provided in this directory was generated with lttng-ust running this
+program and stripped to contain only the bare minimum. When running babeltrace
+with the `--debug-info-target-prefix` option pointing to the source tree of
+Babeltrace, the `my_provider:my_first_tracepoint` events should contain this
+information:
+
+    debug_info = { bin = "libhello_so+0x166b", func = "baz+0x9c", src = "libhello.c:20" } }
diff --git a/tests/data/debug-info/i386-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug b/tests/data/debug-info/i386-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug
new file mode 100755 (executable)
index 0000000..ba371f5
Binary files /dev/null and b/tests/data/debug-info/i386-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug differ
diff --git a/tests/data/debug-info/i386-linux-gnu/build_id/libhello_so b/tests/data/debug-info/i386-linux-gnu/build_id/libhello_so
new file mode 100755 (executable)
index 0000000..218e668
Binary files /dev/null and b/tests/data/debug-info/i386-linux-gnu/build_id/libhello_so differ
diff --git a/tests/data/debug-info/i386-linux-gnu/debug_link/libhello_so b/tests/data/debug-info/i386-linux-gnu/debug_link/libhello_so
new file mode 100755 (executable)
index 0000000..4dcfdc5
Binary files /dev/null and b/tests/data/debug-info/i386-linux-gnu/debug_link/libhello_so differ
diff --git a/tests/data/debug-info/i386-linux-gnu/debug_link/libhello_so.debug b/tests/data/debug-info/i386-linux-gnu/debug_link/libhello_so.debug
new file mode 100755 (executable)
index 0000000..1ede770
Binary files /dev/null and b/tests/data/debug-info/i386-linux-gnu/debug_link/libhello_so.debug differ
diff --git a/tests/data/debug-info/i386-linux-gnu/dwarf_full/libhello_so b/tests/data/debug-info/i386-linux-gnu/dwarf_full/libhello_so
new file mode 100755 (executable)
index 0000000..08390c8
Binary files /dev/null and b/tests/data/debug-info/i386-linux-gnu/dwarf_full/libhello_so differ
diff --git a/tests/data/debug-info/i386-linux-gnu/elf_only/libhello_so b/tests/data/debug-info/i386-linux-gnu/elf_only/libhello_so
new file mode 100755 (executable)
index 0000000..84c31e2
Binary files /dev/null and b/tests/data/debug-info/i386-linux-gnu/elf_only/libhello_so differ
diff --git a/tests/data/debug-info/libhello.c b/tests/data/debug-info/libhello.c
new file mode 100644 (file)
index 0000000..95382b5
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * libhello.c
+ *
+ * Debug Info - Tests
+ *
+ * Copyright 2016 Antoine Busque <antoine.busque@efficios.com>
+ *
+ * Author: Antoine Busque <antoine.busque@efficios.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include <stdio.h>
+#define TRACEPOINT_DEFINE
+#include "tp.h"
+
+void foo()
+{
+        tracepoint(my_provider, my_first_tracepoint, 42, "hello, tracer");
+        printf("foo\n");
+}
+
+void bar()
+{
+        tracepoint(my_provider, my_first_tracepoint, 57,
+                   "recoltes et semailles");
+        printf("bar\n");
+}
+
+void baz()
+{
+        tracepoint(my_provider, my_other_tracepoint, 1729);
+        printf("baz\n");
+}
diff --git a/tests/data/debug-info/libhello.h b/tests/data/debug-info/libhello.h
new file mode 100644 (file)
index 0000000..b3f8893
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * libhello.h
+ *
+ * Debug Info - Tests
+ *
+ * Copyright 2016 Antoine Busque <antoine.busque@efficios.com>
+ *
+ * Author: Antoine Busque <antoine.busque@efficios.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifndef _LIBHELLO_H
+#define _LIBHELLO_H
+
+void foo();
+void bar();
+void baz();
+
+#endif  /* _LIBHELLO_H */
diff --git a/tests/data/debug-info/main.c b/tests/data/debug-info/main.c
new file mode 100644 (file)
index 0000000..e272bc1
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * main.c
+ *
+ * Debug Info - Main
+ *
+ * Copyright 2017 Julien Desfossez <jdesfossez@efficios.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include <stdio.h>
+#include "libhello.h"
+#include "tp.h"
+
+int main()
+{
+       foo();
+       bar();
+       baz();
+       return 0;
+}
diff --git a/tests/data/debug-info/powerpc-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug b/tests/data/debug-info/powerpc-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug
new file mode 100755 (executable)
index 0000000..6fa1499
Binary files /dev/null and b/tests/data/debug-info/powerpc-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug differ
diff --git a/tests/data/debug-info/powerpc-linux-gnu/build_id/libhello_so b/tests/data/debug-info/powerpc-linux-gnu/build_id/libhello_so
new file mode 100755 (executable)
index 0000000..49c6249
Binary files /dev/null and b/tests/data/debug-info/powerpc-linux-gnu/build_id/libhello_so differ
diff --git a/tests/data/debug-info/powerpc-linux-gnu/debug_link/libhello_so b/tests/data/debug-info/powerpc-linux-gnu/debug_link/libhello_so
new file mode 100755 (executable)
index 0000000..23efdc8
Binary files /dev/null and b/tests/data/debug-info/powerpc-linux-gnu/debug_link/libhello_so differ
diff --git a/tests/data/debug-info/powerpc-linux-gnu/debug_link/libhello_so.debug b/tests/data/debug-info/powerpc-linux-gnu/debug_link/libhello_so.debug
new file mode 100755 (executable)
index 0000000..a95eed2
Binary files /dev/null and b/tests/data/debug-info/powerpc-linux-gnu/debug_link/libhello_so.debug differ
diff --git a/tests/data/debug-info/powerpc-linux-gnu/dwarf_full/libhello_so b/tests/data/debug-info/powerpc-linux-gnu/dwarf_full/libhello_so
new file mode 100755 (executable)
index 0000000..ef39d51
Binary files /dev/null and b/tests/data/debug-info/powerpc-linux-gnu/dwarf_full/libhello_so differ
diff --git a/tests/data/debug-info/powerpc-linux-gnu/elf_only/libhello_so b/tests/data/debug-info/powerpc-linux-gnu/elf_only/libhello_so
new file mode 100755 (executable)
index 0000000..d1e7322
Binary files /dev/null and b/tests/data/debug-info/powerpc-linux-gnu/elf_only/libhello_so differ
diff --git a/tests/data/debug-info/powerpc64le-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug b/tests/data/debug-info/powerpc64le-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug
new file mode 100755 (executable)
index 0000000..b419832
Binary files /dev/null and b/tests/data/debug-info/powerpc64le-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug differ
diff --git a/tests/data/debug-info/powerpc64le-linux-gnu/build_id/libhello_so b/tests/data/debug-info/powerpc64le-linux-gnu/build_id/libhello_so
new file mode 100755 (executable)
index 0000000..f740eb0
Binary files /dev/null and b/tests/data/debug-info/powerpc64le-linux-gnu/build_id/libhello_so differ
diff --git a/tests/data/debug-info/powerpc64le-linux-gnu/debug_link/libhello_so b/tests/data/debug-info/powerpc64le-linux-gnu/debug_link/libhello_so
new file mode 100755 (executable)
index 0000000..01e0c6b
Binary files /dev/null and b/tests/data/debug-info/powerpc64le-linux-gnu/debug_link/libhello_so differ
diff --git a/tests/data/debug-info/powerpc64le-linux-gnu/debug_link/libhello_so.debug b/tests/data/debug-info/powerpc64le-linux-gnu/debug_link/libhello_so.debug
new file mode 100755 (executable)
index 0000000..86364a3
Binary files /dev/null and b/tests/data/debug-info/powerpc64le-linux-gnu/debug_link/libhello_so.debug differ
diff --git a/tests/data/debug-info/powerpc64le-linux-gnu/dwarf_full/libhello_so b/tests/data/debug-info/powerpc64le-linux-gnu/dwarf_full/libhello_so
new file mode 100755 (executable)
index 0000000..3874f11
Binary files /dev/null and b/tests/data/debug-info/powerpc64le-linux-gnu/dwarf_full/libhello_so differ
diff --git a/tests/data/debug-info/powerpc64le-linux-gnu/elf_only/libhello_so b/tests/data/debug-info/powerpc64le-linux-gnu/elf_only/libhello_so
new file mode 100755 (executable)
index 0000000..067b472
Binary files /dev/null and b/tests/data/debug-info/powerpc64le-linux-gnu/elf_only/libhello_so differ
diff --git a/tests/data/debug-info/tp.c b/tests/data/debug-info/tp.c
new file mode 100644 (file)
index 0000000..e893355
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * tp.c
+ *
+ * Debug Info - Tests
+ *
+ * Copyright 2016 Antoine Busque <antoine.busque@efficios.com>
+ *
+ * Author: Antoine Busque <antoine.busque@efficios.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+#define TRACEPOINT_CREATE_PROBES
+
+#include "tp.h"
diff --git a/tests/data/debug-info/tp.h b/tests/data/debug-info/tp.h
new file mode 100644 (file)
index 0000000..1a3660e
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * tp.h
+ *
+ * Debug Info - Tests
+ *
+ * Copyright 2016 Antoine Busque <antoine.busque@efficios.com>
+ *
+ * Author: Antoine Busque <antoine.busque@efficios.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#undef TRACEPOINT_PROVIDER
+#define TRACEPOINT_PROVIDER my_provider
+
+#undef TRACEPOINT_INCLUDE
+#define TRACEPOINT_INCLUDE "./tp.h"
+
+#if !defined(_TP_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
+#define _TP_H
+
+#include <lttng/tracepoint.h>
+
+TRACEPOINT_EVENT(
+    my_provider,
+    my_first_tracepoint,
+    TP_ARGS(
+        int, my_integer_arg,
+        char*, my_string_arg
+    ),
+    TP_FIELDS(
+        ctf_string(my_string_field, my_string_arg)
+        ctf_integer(int, my_integer_field, my_integer_arg)
+    )
+)
+
+TRACEPOINT_EVENT(
+    my_provider,
+    my_other_tracepoint,
+    TP_ARGS(
+        int, my_int
+    ),
+    TP_FIELDS(
+        ctf_integer(int, some_field, my_int)
+    )
+)
+
+#endif /* _TP_H */
+
+#include <lttng/tracepoint-event.h>
diff --git a/tests/data/debug-info/trace/metadata b/tests/data/debug-info/trace/metadata
new file mode 100644 (file)
index 0000000..1388b29
--- /dev/null
@@ -0,0 +1,91 @@
+/* CTF 1.8 */
+
+trace {
+       major = 1;
+       minor = 8;
+       uuid = "c4f5ad74-2d9a-4a17-9633-3e9e49d5f773";
+       byte_order = le;
+       packet.header := struct {
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } magic;
+               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } uuid[16];
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } stream_id;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } stream_instance_id;
+       } align(8);
+};
+
+env {
+       hostname = "sinkpad";
+       domain = "ust";
+       tracer_name = "lttng-ust";
+       tracer_major = 2;
+       tracer_minor = 10;
+};
+
+clock {
+       name = monotonic;
+       uuid = "00000000-0000-0000-0000-000000000000";
+       description = "Monotonic Clock";
+       freq = 1000000000;
+       precision = 1;
+       offset_s = 0;
+       offset = 1497619475540462738;
+       absolute = TRUE;
+};
+
+stream {
+       id = 0;
+       event.header := struct {
+               enum : integer { size = 5; align = 1; signed = false; encoding = none; base = decimal; byte_order = le; } { "compact" = 0 ... 30, "extended" = 31 } id;
+               variant <id> {
+                       struct {
+                               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = le; map = clock.monotonic.value; } timestamp;
+                       } align(1) compact;
+                       struct {
+                               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } id;
+                               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; map = clock.monotonic.value; } timestamp;
+                       } align(8) extended;
+               } v;
+       } align(8);
+
+       packet.context := struct {
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; map = clock.monotonic.value; } timestamp_begin;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; map = clock.monotonic.value; } timestamp_end;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } content_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } packet_size;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } packet_seq_num;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } events_discarded;
+               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } cpu_id;
+       } align(8);
+
+       event.context := struct {
+               integer { size = 32; align = 8; signed = true; encoding = none; base = decimal; byte_order = le; } _vpid;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = hexadecimal; byte_order = le; } _ip;
+       } align(8);
+};
+
+event {
+       name = "lttng_ust_statedump:bin_info";
+       id = 0;
+       stream_id = 0;
+       loglevel = 13;
+       fields := struct {
+               integer { size = 64; align = 8; signed = false; encoding = none; base = hexadecimal; byte_order = le; } _baddr;
+               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _memsz;
+               string { encoding = UTF8; } _path;
+               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _is_pic;
+               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _has_build_id;
+               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _has_debug_link;
+       } align(8);
+};
+
+event {
+       name = "my_provider:my_first_tracepoint";
+       id = 1;
+       stream_id = 0;
+       loglevel = 13;
+       fields := struct {
+               string { encoding = UTF8; } _my_string_field;
+               integer { size = 32; align = 8; signed = true; encoding = none; base = decimal; byte_order = le; } _my_integer_field;
+       } align(8);
+};
+
diff --git a/tests/data/debug-info/trace/stream_0_0 b/tests/data/debug-info/trace/stream_0_0
new file mode 100644 (file)
index 0000000..582f445
Binary files /dev/null and b/tests/data/debug-info/trace/stream_0_0 differ
diff --git a/tests/data/debug-info/x86_64-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug b/tests/data/debug-info/x86_64-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug
new file mode 100755 (executable)
index 0000000..41e2cfb
Binary files /dev/null and b/tests/data/debug-info/x86_64-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug differ
diff --git a/tests/data/debug-info/x86_64-linux-gnu/build_id/libhello_so b/tests/data/debug-info/x86_64-linux-gnu/build_id/libhello_so
new file mode 100755 (executable)
index 0000000..0edfd79
Binary files /dev/null and b/tests/data/debug-info/x86_64-linux-gnu/build_id/libhello_so differ
diff --git a/tests/data/debug-info/x86_64-linux-gnu/debug_link/libhello_so b/tests/data/debug-info/x86_64-linux-gnu/debug_link/libhello_so
new file mode 100755 (executable)
index 0000000..0c12601
Binary files /dev/null and b/tests/data/debug-info/x86_64-linux-gnu/debug_link/libhello_so differ
diff --git a/tests/data/debug-info/x86_64-linux-gnu/debug_link/libhello_so.debug b/tests/data/debug-info/x86_64-linux-gnu/debug_link/libhello_so.debug
new file mode 100755 (executable)
index 0000000..082f513
Binary files /dev/null and b/tests/data/debug-info/x86_64-linux-gnu/debug_link/libhello_so.debug differ
diff --git a/tests/data/debug-info/x86_64-linux-gnu/dwarf_full/libhello_so b/tests/data/debug-info/x86_64-linux-gnu/dwarf_full/libhello_so
new file mode 100755 (executable)
index 0000000..f8d3e41
Binary files /dev/null and b/tests/data/debug-info/x86_64-linux-gnu/dwarf_full/libhello_so differ
diff --git a/tests/data/debug-info/x86_64-linux-gnu/elf_only/libhello_so b/tests/data/debug-info/x86_64-linux-gnu/elf_only/libhello_so
new file mode 100755 (executable)
index 0000000..bffdaab
Binary files /dev/null and b/tests/data/debug-info/x86_64-linux-gnu/elf_only/libhello_so differ
diff --git a/tests/data/plugins/src.ctf.fs/succeed/trace-simple.expect b/tests/data/plugins/src.ctf.fs/succeed/trace-simple.expect
new file mode 100644 (file)
index 0000000..90218c2
--- /dev/null
@@ -0,0 +1,218 @@
+Trace class:
+  Stream class (ID 0):
+    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: No
+    Discarded packets have default clock snapshots: No
+    Default clock class:
+      Name: default
+      Frequency (Hz): 1,000,000,000
+      Precision (cycles): 1
+      Offset (s): 0
+      Offset (cycles): 0
+      Origin is Unix epoch: No
+    Event class `ev` (ID 0):
+      Payload field class: Structure (2 members):
+        first: Signed integer (8-bit, Base 10)
+        second: String
+
+{Trace 0, Stream class ID 0, Stream ID 0}
+Stream beginning:
+  Trace:
+    Stream (ID 0, Class ID 0)
+
+[Unknown]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Stream activity beginning
+
+[0 cycles, 0 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Packet beginning:
+
+[3600 cycles, 3600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -23
+    second: saluuuut
+
+[8600 cycles, 8600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -22
+    second: saluuuut
+
+[13,600 cycles, 13,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -21
+    second: saluuuut
+
+[18,600 cycles, 18,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -20
+    second: saluuuut
+
+[23,600 cycles, 23,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -19
+    second: saluuuut
+
+[28,600 cycles, 28,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -18
+    second: saluuuut
+
+[33,600 cycles, 33,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -17
+    second: saluuuut
+
+[38,600 cycles, 38,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -16
+    second: saluuuut
+
+[43,600 cycles, 43,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -15
+    second: saluuuut
+
+[48,600 cycles, 48,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -14
+    second: saluuuut
+
+[53,600 cycles, 53,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -13
+    second: saluuuut
+
+[58,600 cycles, 58,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -12
+    second: saluuuut
+
+[63,600 cycles, 63,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -11
+    second: saluuuut
+
+[68,600 cycles, 68,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -10
+    second: saluuuut
+
+[73,600 cycles, 73,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -9
+    second: saluuuut
+
+[78,600 cycles, 78,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -8
+    second: saluuuut
+
+[83,600 cycles, 83,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -7
+    second: saluuuut
+
+[88,600 cycles, 88,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -6
+    second: saluuuut
+
+[93,600 cycles, 93,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -5
+    second: saluuuut
+
+[98,600 cycles, 98,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -4
+    second: saluuuut
+
+[103,600 cycles, 103,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -3
+    second: saluuuut
+
+[108,600 cycles, 108,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -2
+    second: saluuuut
+
+[113,600 cycles, 113,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: -1
+    second: saluuuut
+
+[118,600 cycles, 118,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: 0
+    second: saluuuut
+
+[123,600 cycles, 123,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `ev` (Class ID 0):
+  Payload:
+    first: 1
+    second: saluuuut
+
+[123,600 cycles, 123,600 ns from origin]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Packet end
+
+[Unknown]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Stream activity end
+
+{Trace 0, Stream class ID 0, Stream ID 0}
+Stream end
diff --git a/tests/data/plugins/src.ctf.fs/succeed/trace-smalltrace.expect b/tests/data/plugins/src.ctf.fs/succeed/trace-smalltrace.expect
new file mode 100644 (file)
index 0000000..5140490
--- /dev/null
@@ -0,0 +1,45 @@
+Trace class:
+  UUID: 2a6422d0-6cee-11e0-8c08-cb07d7b3a564
+  Stream class (ID 0):
+    Packets have beginning default clock snapshot: No
+    Packets have end default clock snapshot: No
+    Supports discarded events: No
+    Discarded events have default clock snapshots: No
+    Supports discarded packets: No
+    Discarded packets have default clock snapshots: No
+    Event class `string` (ID 0):
+      Payload field class: Structure (1 member):
+        str: String
+
+{Trace 0, Stream class ID 0, Stream ID 0}
+Stream beginning:
+  Trace:
+    Class UUID: 2a6422d0-6cee-11e0-8c08-cb07d7b3a564
+    Stream (ID 0, Class ID 0)
+
+[Unknown]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Stream activity beginning
+
+{Trace 0, Stream class ID 0, Stream ID 0}
+Packet beginning:
+
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `string` (Class ID 0):
+  Payload:
+    str: This is a test trace
+
+{Trace 0, Stream class ID 0, Stream ID 0}
+Event `string` (Class ID 0):
+  Payload:
+    str: with only two small events.
+
+{Trace 0, Stream class ID 0, Stream ID 0}
+Packet end
+
+[Unknown]
+{Trace 0, Stream class ID 0, Stream ID 0}
+Stream activity end
+
+{Trace 0, Stream class ID 0, Stream ID 0}
+Stream end
diff --git a/tests/debug-info-data/Makefile b/tests/debug-info-data/Makefile
deleted file mode 100644 (file)
index 2820805..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-BUILD_ID_PREFIX=cd
-BUILD_ID_SUFFIX=d98cdd87f7fe64c13b6daad553987eafd40cbb
-BUILD_ID=$(BUILD_ID_PREFIX)$(BUILD_ID_SUFFIX)
-
-BUILD_DIR ?= build
-
-OBJS=$(BUILD_DIR)/dwarf_full/libhello_so \
-     $(BUILD_DIR)/elf_only/libhello_so \
-     $(BUILD_DIR)/build_id/libhello_so \
-     $(BUILD_DIR)/debug_link/libhello_so
-
-all: $(OBJS)
-
-%.o: %.c
-       $(CC) -gdwarf -fdebug-prefix-map=$(CURDIR)=. -fPIC -c -I. -o $@ $<
-
-# Master copy: ELF with DWARF and build-id
-$(BUILD_DIR)/dwarf_full/libhello_so: tp.o libhello.o
-       mkdir -p $(@D)
-       $(CC) -shared -gdwarf -llttng-ust -ldl -Wl,-soname,libhello.so -Wl,--build-id=0x$(BUILD_ID) -o $@ $^
-
-# ELF only, no debug symbols, no build-d
-$(BUILD_DIR)/elf_only/libhello_so: $(BUILD_DIR)/dwarf_full/libhello_so
-       mkdir -p $(@D)
-       objcopy -g $< $@.tmp
-       objcopy --remove-section=.note.gnu.build-id $@.tmp
-       mv $@.tmp $@
-
-# ELF with external build-id DWARF
-$(BUILD_DIR)/build_id/libhello_so: $(BUILD_DIR)/dwarf_full/libhello_so
-       mkdir -p $(@D)/.build-id/$(BUILD_ID_PREFIX)
-       objcopy --only-keep-debug $< $(@D)/.build-id/$(BUILD_ID_PREFIX)/$(BUILD_ID_SUFFIX).debug
-       objcopy -g $< $@
-
-# ELF with external debug link DWARF
-$(BUILD_DIR)/debug_link/libhello_so: $(BUILD_DIR)/dwarf_full/libhello_so
-       mkdir -p $(@D)
-       objcopy --remove-section=.note.gnu.build-id $< $@.tmp
-       objcopy --only-keep-debug $@.tmp $(@D)/libhello_so.debug
-       objcopy -g $@.tmp
-       cd $(@D) && objcopy --add-gnu-debuglink=libhello_so.debug $(@F).tmp
-       mv $@.tmp $@
-
-clean:
-       rm -f *.o
-
-dist-clean: clean
-       rm -rf $(BUILD_DIR)
-
-.PHONY: all clean dist-clean
diff --git a/tests/debug-info-data/README.md b/tests/debug-info-data/README.md
deleted file mode 100644 (file)
index 1912194..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-debug-info-data
-==============
-
-This directory contains pre-generated ELF and DWARF files used to test
-the debug info analysis feature, including lookup of DWARF debugging
-information via build ID and debug link methods, as well as the source
-files used to generate them.
-
-The generated files are:
-
-* `ARCH/dwarf_full/libhello_so` (ELF and DWARF)
-* `ARCH/elf_only/libhello_so` (ELF only)
-* `ARCH/build_id/libhello_so` (ELF with separate DWARF via build ID)
-* `ARCH/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug` (DWARF for build ID)
-* `ARCH/debug_link/libhello_so` (ELF with separate DWARF via debug link)
-* `ARCH/debug_link/libhello_so.debug` (DWARF for debug link)
-
-We use a suffix of "_so" instead of ".so" since some distributions
-build systems will consider ".so" files as artifacts from a previous
-build that were "left-over" and will remove them prior to the build.
-
-All files are generated from the four (4) following source files:
-
-* libhello.c
-* libhello.h
-* tp.c
-* tp.h
-
-The generated executables were built using a native GNU toolchain on either
-Ubuntu 16.04 or 18.04 depending on the architecture.
-
-To regenerate them, you can use the included Makefile or follow these steps:
-
-## Generate the object files
-
-    $ gcc -gdwarf -fdebug-prefix-map=$(pwd)=. -fPIC -c -I. tp.c libhello.c
-
-## Combined ELF and DWARF
-
-    $ build_id_prefix=cd
-    $ build_id_suffix=d98cdd87f7fe64c13b6daad553987eafd40cbb
-    $ build_id="$build_id_prefix$build_id_suffix"
-    $ mkdir dwarf_full
-    $ gcc -shared -g -llttng-ust -ldl -Wl,-soname,libhello.so -Wl,--build-id=0x$build_id -o dwarf_full/libhello_so tp.o libhello.o
-
-## ELF only
-
-    $ mkdir elf_only
-    $ objcopy -g dwarf_full/libhello_so elf_only/libhello_so
-    $ objcopy --remove-section=.note.gnu.build-id elf_only/libhello_so
-
-## ELF and DWARF with Build ID
-
-    $ mkdir -p build_id/.build-id/$build_id_prefix
-    $ objcopy --only-keep-debug dwarf_full/libhello_so build_id/.build-id/$build_id_prefix/$build_id_suffix.debug
-    $ objcopy -g dwarf_full/libhello_so build_id/libhello_so
-
-##  ELF and DWARF with Debug Link
-
-    $ mkdir debug_link
-    $ objcopy --remove-section=.note.gnu.build-id dwarf_full/libhello_so debug_link/libhello_so
-    $ objcopy --only-keep-debug debug_link/libhello_so debug_link/libhello_so.debug
-    $ objcopy -g debug_link/libhello_so
-    $ cd debug_link && objcopy --add-gnu-debuglink=libhello_so.debug libhello_so && cd ..
-
-
-Test program
-------------
-An executable linked to this library can be compiled from the `main.c` source file.
-To compile it, you can do:
-
-    $ ln -s libhello_so libhello.so
-    $ gcc -I. -o test main.c -L. -lhello_build_id -llttng-ust -ldl -Wl,--rpath=.
-
-The trace provided in this directory was generated with lttng-ust running this
-program and stripped to contain only the bare minimum. When running babeltrace
-with the `--debug-info-target-prefix` option pointing to the source tree of
-Babeltrace, the `my_provider:my_first_tracepoint` events should contain this
-information:
-
-    debug_info = { bin = "libhello_so+0x166b", func = "baz+0x9c", src = "libhello.c:20" } }
diff --git a/tests/debug-info-data/i386-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug b/tests/debug-info-data/i386-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug
deleted file mode 100755 (executable)
index ba371f5..0000000
Binary files a/tests/debug-info-data/i386-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug and /dev/null differ
diff --git a/tests/debug-info-data/i386-linux-gnu/build_id/libhello_so b/tests/debug-info-data/i386-linux-gnu/build_id/libhello_so
deleted file mode 100755 (executable)
index 218e668..0000000
Binary files a/tests/debug-info-data/i386-linux-gnu/build_id/libhello_so and /dev/null differ
diff --git a/tests/debug-info-data/i386-linux-gnu/debug_link/libhello_so b/tests/debug-info-data/i386-linux-gnu/debug_link/libhello_so
deleted file mode 100755 (executable)
index 4dcfdc5..0000000
Binary files a/tests/debug-info-data/i386-linux-gnu/debug_link/libhello_so and /dev/null differ
diff --git a/tests/debug-info-data/i386-linux-gnu/debug_link/libhello_so.debug b/tests/debug-info-data/i386-linux-gnu/debug_link/libhello_so.debug
deleted file mode 100755 (executable)
index 1ede770..0000000
Binary files a/tests/debug-info-data/i386-linux-gnu/debug_link/libhello_so.debug and /dev/null differ
diff --git a/tests/debug-info-data/i386-linux-gnu/dwarf_full/libhello_so b/tests/debug-info-data/i386-linux-gnu/dwarf_full/libhello_so
deleted file mode 100755 (executable)
index 08390c8..0000000
Binary files a/tests/debug-info-data/i386-linux-gnu/dwarf_full/libhello_so and /dev/null differ
diff --git a/tests/debug-info-data/i386-linux-gnu/elf_only/libhello_so b/tests/debug-info-data/i386-linux-gnu/elf_only/libhello_so
deleted file mode 100755 (executable)
index 84c31e2..0000000
Binary files a/tests/debug-info-data/i386-linux-gnu/elf_only/libhello_so and /dev/null differ
diff --git a/tests/debug-info-data/libhello.c b/tests/debug-info-data/libhello.c
deleted file mode 100644 (file)
index 95382b5..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * libhello.c
- *
- * Debug Info - Tests
- *
- * Copyright 2016 Antoine Busque <antoine.busque@efficios.com>
- *
- * Author: Antoine Busque <antoine.busque@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include <stdio.h>
-#define TRACEPOINT_DEFINE
-#include "tp.h"
-
-void foo()
-{
-        tracepoint(my_provider, my_first_tracepoint, 42, "hello, tracer");
-        printf("foo\n");
-}
-
-void bar()
-{
-        tracepoint(my_provider, my_first_tracepoint, 57,
-                   "recoltes et semailles");
-        printf("bar\n");
-}
-
-void baz()
-{
-        tracepoint(my_provider, my_other_tracepoint, 1729);
-        printf("baz\n");
-}
diff --git a/tests/debug-info-data/libhello.h b/tests/debug-info-data/libhello.h
deleted file mode 100644 (file)
index b3f8893..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * libhello.h
- *
- * Debug Info - Tests
- *
- * Copyright 2016 Antoine Busque <antoine.busque@efficios.com>
- *
- * Author: Antoine Busque <antoine.busque@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef _LIBHELLO_H
-#define _LIBHELLO_H
-
-void foo();
-void bar();
-void baz();
-
-#endif  /* _LIBHELLO_H */
diff --git a/tests/debug-info-data/main.c b/tests/debug-info-data/main.c
deleted file mode 100644 (file)
index e272bc1..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * main.c
- *
- * Debug Info - Main
- *
- * Copyright 2017 Julien Desfossez <jdesfossez@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include <stdio.h>
-#include "libhello.h"
-#include "tp.h"
-
-int main()
-{
-       foo();
-       bar();
-       baz();
-       return 0;
-}
diff --git a/tests/debug-info-data/powerpc-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug b/tests/debug-info-data/powerpc-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug
deleted file mode 100755 (executable)
index 6fa1499..0000000
Binary files a/tests/debug-info-data/powerpc-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug and /dev/null differ
diff --git a/tests/debug-info-data/powerpc-linux-gnu/build_id/libhello_so b/tests/debug-info-data/powerpc-linux-gnu/build_id/libhello_so
deleted file mode 100755 (executable)
index 49c6249..0000000
Binary files a/tests/debug-info-data/powerpc-linux-gnu/build_id/libhello_so and /dev/null differ
diff --git a/tests/debug-info-data/powerpc-linux-gnu/debug_link/libhello_so b/tests/debug-info-data/powerpc-linux-gnu/debug_link/libhello_so
deleted file mode 100755 (executable)
index 23efdc8..0000000
Binary files a/tests/debug-info-data/powerpc-linux-gnu/debug_link/libhello_so and /dev/null differ
diff --git a/tests/debug-info-data/powerpc-linux-gnu/debug_link/libhello_so.debug b/tests/debug-info-data/powerpc-linux-gnu/debug_link/libhello_so.debug
deleted file mode 100755 (executable)
index a95eed2..0000000
Binary files a/tests/debug-info-data/powerpc-linux-gnu/debug_link/libhello_so.debug and /dev/null differ
diff --git a/tests/debug-info-data/powerpc-linux-gnu/dwarf_full/libhello_so b/tests/debug-info-data/powerpc-linux-gnu/dwarf_full/libhello_so
deleted file mode 100755 (executable)
index ef39d51..0000000
Binary files a/tests/debug-info-data/powerpc-linux-gnu/dwarf_full/libhello_so and /dev/null differ
diff --git a/tests/debug-info-data/powerpc-linux-gnu/elf_only/libhello_so b/tests/debug-info-data/powerpc-linux-gnu/elf_only/libhello_so
deleted file mode 100755 (executable)
index d1e7322..0000000
Binary files a/tests/debug-info-data/powerpc-linux-gnu/elf_only/libhello_so and /dev/null differ
diff --git a/tests/debug-info-data/powerpc64le-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug b/tests/debug-info-data/powerpc64le-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug
deleted file mode 100755 (executable)
index b419832..0000000
Binary files a/tests/debug-info-data/powerpc64le-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug and /dev/null differ
diff --git a/tests/debug-info-data/powerpc64le-linux-gnu/build_id/libhello_so b/tests/debug-info-data/powerpc64le-linux-gnu/build_id/libhello_so
deleted file mode 100755 (executable)
index f740eb0..0000000
Binary files a/tests/debug-info-data/powerpc64le-linux-gnu/build_id/libhello_so and /dev/null differ
diff --git a/tests/debug-info-data/powerpc64le-linux-gnu/debug_link/libhello_so b/tests/debug-info-data/powerpc64le-linux-gnu/debug_link/libhello_so
deleted file mode 100755 (executable)
index 01e0c6b..0000000
Binary files a/tests/debug-info-data/powerpc64le-linux-gnu/debug_link/libhello_so and /dev/null differ
diff --git a/tests/debug-info-data/powerpc64le-linux-gnu/debug_link/libhello_so.debug b/tests/debug-info-data/powerpc64le-linux-gnu/debug_link/libhello_so.debug
deleted file mode 100755 (executable)
index 86364a3..0000000
Binary files a/tests/debug-info-data/powerpc64le-linux-gnu/debug_link/libhello_so.debug and /dev/null differ
diff --git a/tests/debug-info-data/powerpc64le-linux-gnu/dwarf_full/libhello_so b/tests/debug-info-data/powerpc64le-linux-gnu/dwarf_full/libhello_so
deleted file mode 100755 (executable)
index 3874f11..0000000
Binary files a/tests/debug-info-data/powerpc64le-linux-gnu/dwarf_full/libhello_so and /dev/null differ
diff --git a/tests/debug-info-data/powerpc64le-linux-gnu/elf_only/libhello_so b/tests/debug-info-data/powerpc64le-linux-gnu/elf_only/libhello_so
deleted file mode 100755 (executable)
index 067b472..0000000
Binary files a/tests/debug-info-data/powerpc64le-linux-gnu/elf_only/libhello_so and /dev/null differ
diff --git a/tests/debug-info-data/tp.c b/tests/debug-info-data/tp.c
deleted file mode 100644 (file)
index e893355..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * tp.c
- *
- * Debug Info - Tests
- *
- * Copyright 2016 Antoine Busque <antoine.busque@efficios.com>
- *
- * Author: Antoine Busque <antoine.busque@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#define TRACEPOINT_CREATE_PROBES
-
-#include "tp.h"
diff --git a/tests/debug-info-data/tp.h b/tests/debug-info-data/tp.h
deleted file mode 100644 (file)
index 1a3660e..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * tp.h
- *
- * Debug Info - Tests
- *
- * Copyright 2016 Antoine Busque <antoine.busque@efficios.com>
- *
- * Author: Antoine Busque <antoine.busque@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#undef TRACEPOINT_PROVIDER
-#define TRACEPOINT_PROVIDER my_provider
-
-#undef TRACEPOINT_INCLUDE
-#define TRACEPOINT_INCLUDE "./tp.h"
-
-#if !defined(_TP_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
-#define _TP_H
-
-#include <lttng/tracepoint.h>
-
-TRACEPOINT_EVENT(
-    my_provider,
-    my_first_tracepoint,
-    TP_ARGS(
-        int, my_integer_arg,
-        char*, my_string_arg
-    ),
-    TP_FIELDS(
-        ctf_string(my_string_field, my_string_arg)
-        ctf_integer(int, my_integer_field, my_integer_arg)
-    )
-)
-
-TRACEPOINT_EVENT(
-    my_provider,
-    my_other_tracepoint,
-    TP_ARGS(
-        int, my_int
-    ),
-    TP_FIELDS(
-        ctf_integer(int, some_field, my_int)
-    )
-)
-
-#endif /* _TP_H */
-
-#include <lttng/tracepoint-event.h>
diff --git a/tests/debug-info-data/trace/metadata b/tests/debug-info-data/trace/metadata
deleted file mode 100644 (file)
index 1388b29..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/* CTF 1.8 */
-
-trace {
-       major = 1;
-       minor = 8;
-       uuid = "c4f5ad74-2d9a-4a17-9633-3e9e49d5f773";
-       byte_order = le;
-       packet.header := struct {
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } magic;
-               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } uuid[16];
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } stream_id;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } stream_instance_id;
-       } align(8);
-};
-
-env {
-       hostname = "sinkpad";
-       domain = "ust";
-       tracer_name = "lttng-ust";
-       tracer_major = 2;
-       tracer_minor = 10;
-};
-
-clock {
-       name = monotonic;
-       uuid = "00000000-0000-0000-0000-000000000000";
-       description = "Monotonic Clock";
-       freq = 1000000000;
-       precision = 1;
-       offset_s = 0;
-       offset = 1497619475540462738;
-       absolute = TRUE;
-};
-
-stream {
-       id = 0;
-       event.header := struct {
-               enum : integer { size = 5; align = 1; signed = false; encoding = none; base = decimal; byte_order = le; } { "compact" = 0 ... 30, "extended" = 31 } id;
-               variant <id> {
-                       struct {
-                               integer { size = 64; align = 1; signed = false; encoding = none; base = decimal; byte_order = le; map = clock.monotonic.value; } timestamp;
-                       } align(1) compact;
-                       struct {
-                               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } id;
-                               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; map = clock.monotonic.value; } timestamp;
-                       } align(8) extended;
-               } v;
-       } align(8);
-
-       packet.context := struct {
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; map = clock.monotonic.value; } timestamp_begin;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; map = clock.monotonic.value; } timestamp_end;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } content_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } packet_size;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } packet_seq_num;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } events_discarded;
-               integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } cpu_id;
-       } align(8);
-
-       event.context := struct {
-               integer { size = 32; align = 8; signed = true; encoding = none; base = decimal; byte_order = le; } _vpid;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = hexadecimal; byte_order = le; } _ip;
-       } align(8);
-};
-
-event {
-       name = "lttng_ust_statedump:bin_info";
-       id = 0;
-       stream_id = 0;
-       loglevel = 13;
-       fields := struct {
-               integer { size = 64; align = 8; signed = false; encoding = none; base = hexadecimal; byte_order = le; } _baddr;
-               integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _memsz;
-               string { encoding = UTF8; } _path;
-               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _is_pic;
-               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _has_build_id;
-               integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _has_debug_link;
-       } align(8);
-};
-
-event {
-       name = "my_provider:my_first_tracepoint";
-       id = 1;
-       stream_id = 0;
-       loglevel = 13;
-       fields := struct {
-               string { encoding = UTF8; } _my_string_field;
-               integer { size = 32; align = 8; signed = true; encoding = none; base = decimal; byte_order = le; } _my_integer_field;
-       } align(8);
-};
-
diff --git a/tests/debug-info-data/trace/stream_0_0 b/tests/debug-info-data/trace/stream_0_0
deleted file mode 100644 (file)
index 582f445..0000000
Binary files a/tests/debug-info-data/trace/stream_0_0 and /dev/null differ
diff --git a/tests/debug-info-data/x86_64-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug b/tests/debug-info-data/x86_64-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug
deleted file mode 100755 (executable)
index 41e2cfb..0000000
Binary files a/tests/debug-info-data/x86_64-linux-gnu/build_id/.build-id/cd/d98cdd87f7fe64c13b6daad553987eafd40cbb.debug and /dev/null differ
diff --git a/tests/debug-info-data/x86_64-linux-gnu/build_id/libhello_so b/tests/debug-info-data/x86_64-linux-gnu/build_id/libhello_so
deleted file mode 100755 (executable)
index 0edfd79..0000000
Binary files a/tests/debug-info-data/x86_64-linux-gnu/build_id/libhello_so and /dev/null differ
diff --git a/tests/debug-info-data/x86_64-linux-gnu/debug_link/libhello_so b/tests/debug-info-data/x86_64-linux-gnu/debug_link/libhello_so
deleted file mode 100755 (executable)
index 0c12601..0000000
Binary files a/tests/debug-info-data/x86_64-linux-gnu/debug_link/libhello_so and /dev/null differ
diff --git a/tests/debug-info-data/x86_64-linux-gnu/debug_link/libhello_so.debug b/tests/debug-info-data/x86_64-linux-gnu/debug_link/libhello_so.debug
deleted file mode 100755 (executable)
index 082f513..0000000
Binary files a/tests/debug-info-data/x86_64-linux-gnu/debug_link/libhello_so.debug and /dev/null differ
diff --git a/tests/debug-info-data/x86_64-linux-gnu/dwarf_full/libhello_so b/tests/debug-info-data/x86_64-linux-gnu/dwarf_full/libhello_so
deleted file mode 100755 (executable)
index f8d3e41..0000000
Binary files a/tests/debug-info-data/x86_64-linux-gnu/dwarf_full/libhello_so and /dev/null differ
diff --git a/tests/debug-info-data/x86_64-linux-gnu/elf_only/libhello_so b/tests/debug-info-data/x86_64-linux-gnu/elf_only/libhello_so
deleted file mode 100755 (executable)
index bffdaab..0000000
Binary files a/tests/debug-info-data/x86_64-linux-gnu/elf_only/libhello_so and /dev/null differ
index 9b58d63cad455f023273e6976d25b88cca96a142..e36379c2eeb7ef042c33190c4d2a5c5a55842abd 100644 (file)
@@ -23,7 +23,7 @@ NO_SH_TAP=1
 
 curdir="$(cd -P "$(dirname "$0")" >/dev/null && pwd)"
 
-debug_info_data="${BT_SRC_PATH}/tests/debug-info-data/i386-linux-gnu"
+debug_info_data="${BT_DEBUG_INFO_PATH}/i386-linux-gnu"
 
 "${curdir}/test_bin_info" \
        --foo-addr=0x1c8d \
index d0948aa67c17eac998dc43d06a6d3b38f3103030..c37568c0c2f444119c55afb5a6be4ead84ac498c 100644 (file)
@@ -23,7 +23,7 @@ NO_SH_TAP=1
 
 curdir="$(cd -P "$(dirname "$0")" >/dev/null && pwd)"
 
-debug_info_data="${BT_SRC_PATH}/tests/debug-info-data/powerpc-linux-gnu"
+debug_info_data="${BT_DEBUG_INFO_PATH}/powerpc-linux-gnu"
 
 "${curdir}/test_bin_info" \
        --foo-addr=0x23bc \
index 5e81415787b85ca9152b16bea81919d63251696f..70e5b2cff15b2c80ebd091ef23234cf7677eca75 100644 (file)
@@ -23,7 +23,7 @@ NO_SH_TAP=1
 
 curdir="$(cd -P "$(dirname "$0")" >/dev/null && pwd)"
 
-debug_info_data="${BT_SRC_PATH}/tests/debug-info-data/powerpc64le-linux-gnu"
+debug_info_data="${BT_DEBUG_INFO_PATH}/powerpc64le-linux-gnu"
 
 "${curdir}/test_bin_info" \
        --foo-addr=0x2e7c \
index 6ed40daf9af62abd5881bd6e0f24138d24bc5069..8a29f287e7f967168e86ffb8b1ed18a0ebb4691c 100644 (file)
@@ -23,7 +23,7 @@ NO_SH_TAP=1
 
 curdir="$(cd -P "$(dirname "$0")" >/dev/null && pwd)"
 
-debug_info_data="${BT_SRC_PATH}/tests/debug-info-data/x86_64-linux-gnu"
+debug_info_data="${BT_DEBUG_INFO_PATH}/x86_64-linux-gnu"
 
 "${curdir}/test_bin_info" \
        --foo-addr=0x2277 \
index 4c50ecb9ed3f05a369505d283bddc2696a82cc8c..8794bfac94139196566638eb3ae0404f4beed423 100644 (file)
@@ -23,6 +23,6 @@ NO_SH_TAP=1
 
 curdir="$(cd -P "$(dirname "$0")" >/dev/null && pwd)"
 
-debug_info_data="${BT_SRC_PATH}/tests/debug-info-data/i386-linux-gnu"
+debug_info_data="${BT_DEBUG_INFO_PATH}/i386-linux-gnu"
 
 "${curdir}/test_dwarf" "$debug_info_data"
index 1a7b77505ea1d923edec0472949855ddaad777c4..15d3a2f65ee399664f7baa2d6d2f8bf00c131c3e 100644 (file)
@@ -23,6 +23,6 @@ NO_SH_TAP=1
 
 curdir="$(cd -P "$(dirname "$0")" >/dev/null && pwd)"
 
-debug_info_data="${BT_SRC_PATH}/tests/debug-info-data/powerpc-linux-gnu"
+debug_info_data="${BT_DEBUG_INFO_PATH}/powerpc-linux-gnu"
 
 "${curdir}/test_dwarf" "$debug_info_data"
index 0a94ff002a6278316964680e4dd2e58b470ca9dd..cbb365037c9c534a336bfabe14ffc485b41902bb 100644 (file)
@@ -23,6 +23,6 @@ NO_SH_TAP=1
 
 curdir="$(cd -P "$(dirname "$0")" >/dev/null && pwd)"
 
-debug_info_data="${BT_SRC_PATH}/tests/debug-info-data/powerpc64le-linux-gnu"
+debug_info_data="${BT_DEBUG_INFO_PATH}/powerpc64le-linux-gnu"
 
 "${curdir}/test_dwarf" "$debug_info_data"
index 9d0c9d8869e104635ccd1950a8128e615ac42e0c..7b3508989f72b01b979b769ca133cd443c9fb47f 100644 (file)
@@ -22,6 +22,6 @@ NO_SH_TAP=1
 
 curdir="$(cd -P "$(dirname "$0")" >/dev/null && pwd)"
 
-debug_info_data="${BT_SRC_PATH}/tests/debug-info-data/x86_64-linux-gnu"
+debug_info_data="${BT_DEBUG_INFO_PATH}/x86_64-linux-gnu"
 
 "${curdir}/test_dwarf" "$debug_info_data"
index 5d02aaee1136ae057cc5bd3ca7adf0f25b7afa3d..210e01a7f1337d8352ce67f5e252b296e82cdee0 100644 (file)
@@ -25,7 +25,7 @@ TESTS_UTILS_PYTHON_DIR="${BT_SRC_PATH}/tests/utils/python"
 TESTRUNNER_PY="${BT_SRC_PATH}/tests/utils/python/testrunner.py"
 THIS_DIR="${BT_SRC_PATH}/tests/plugins"
 export BABELTRACE_PLUGIN_PATH="${BT_BUILD_PATH}/src/plugins/utils:${BT_BUILD_PATH}/src/plugins/ctf:${BT_BUILD_PATH}/src/plugins/lttng-utils"
-export DEBUG_INFO_DATA_DIR="${BT_SRC_PATH}/tests/debug-info-data"
+export BT_DEBUG_INFO_PATH
 
 if [ "x${MSYSTEM}" != "x" ]; then
        export PATH="${BT_BUILD_PATH}/src/lib/.libs:${PATH}"
index dd27ec9c239b6d68e71f0d8c8d5af42c04775a75..f4e6e2e787df2d5bca49c6cd1967a5243267fb28 100644 (file)
@@ -7,9 +7,9 @@ import os
 @unittest.skip('depends on Python bindings, which are broken')
 class LttngUtilsDebugInfoTestCase(unittest.TestCase):
     def test_debug_info(self):
-        debug_info_data_dir = os.environ['DEBUG_INFO_DATA_DIR']
-        trace_path = os.path.join(debug_info_data_dir, 'trace')
-        target_prefix = os.path.join(debug_info_data_dir, '..', '..')
+        debug_info_data_path = os.environ['BT_DEBUG_INFO_PATH']
+        trace_path = os.path.join(debug_info_data_path, 'trace')
+        target_prefix = os.path.join(debug_info_data_path, '..', '..')
         src = bt2.ComponentSpec('ctf', 'fs', trace_path)
         flt = bt2.ComponentSpec('lttng-utils', 'debug-info', {
             'target-prefix': target_prefix,
index a026a68ecebb4b7c9057309738f891bd2784fb2f..b3924640ca2fa8f2885eb2e209bb673832bcfc11 100644 (file)
@@ -20,7 +20,7 @@ import os
 import re
 
 
-test_ctf_traces_path = os.environ['TEST_CTF_TRACES_PATH']
+test_ctf_traces_path = os.environ['BT_CTF_TRACES_PATH']
 
 
 # Key to sort streams in a predictable order.
@@ -149,11 +149,11 @@ class QueryTraceInfoPortNameTestCase(unittest.TestCase):
         self.assertEqual(len(streams), 2)
         self.assertRegexpMatches(
             str(streams[0]["port-name"]),
-            r"^7afe8fbe-79b8-4f6a-bbc7-d0c782e7ddaf \| 0 \| .*/tests/ctf-traces/intersection/3eventsintersect/test_stream_0$",
+            r"^7afe8fbe-79b8-4f6a-bbc7-d0c782e7ddaf \| 0 \| .*/tests/data/ctf-traces/intersection/3eventsintersect/test_stream_0$",
         )
         self.assertRegexpMatches(
             str(streams[1]["port-name"]),
-            r"^7afe8fbe-79b8-4f6a-bbc7-d0c782e7ddaf \| 0 \| .*/tests/ctf-traces/intersection/3eventsintersect/test_stream_1$",
+            r"^7afe8fbe-79b8-4f6a-bbc7-d0c782e7ddaf \| 0 \| .*/tests/data/ctf-traces/intersection/3eventsintersect/test_stream_1$",
         )
 
     def test_trace_uuid_no_stream_class_id_no_stream_id(self):
@@ -168,7 +168,7 @@ class QueryTraceInfoPortNameTestCase(unittest.TestCase):
         self.assertEqual(len(streams), 1)
         self.assertRegexpMatches(
             str(streams[0]["port-name"]),
-            r"^2a6422d0-6cee-11e0-8c08-cb07d7b3a564 \| .*/tests/ctf-traces/succeed/succeed1/dummystream$",
+            r"^2a6422d0-6cee-11e0-8c08-cb07d7b3a564 \| .*/tests/data/ctf-traces/succeed/succeed1/dummystream$",
         )
 
 
index 4a562ccc3579569e847ca3b238ceffbbd40c5921..88f1bd5ec0e9fc64bab3819f1538e64e4b5d967d 100644 (file)
@@ -1,10 +1,5 @@
 dist_check_SCRIPTS = test_succeed
 
-# Expectation files
-EXTRA_DIST = \
-       trace-smalltrace.expect \
-       trace-simple.expect
-
 # CTF trace generators
 GEN_TRACE_LDADD = $(top_builddir)/src/ctf-writer/libbabeltrace2-ctf-writer.la
 
index 74db85a051d31bb031d12c1482396ecb03fda921..a84b80b7063a6febf00248608cac2b05f187af65 100644 (file)
@@ -25,9 +25,9 @@
 . "@abs_top_builddir@/tests/utils/diff.sh"
 
 this_dir_relative="tests/plugins/src.ctf.fs/succeed"
-this_dir_src="$BT_SRC_PATH/$this_dir_relative"
+this_dir_src="$BT_SRC_PATH/tests/data/plugins/src.ctf.fs/succeed"
 this_dir_build="$BT_BUILD_PATH/$this_dir_relative"
-succeed_trace_dir="$BT_CTF_TRACES/succeed"
+succeed_trace_dir="$BT_CTF_TRACES_PATH/succeed"
 
 test_ctf_common_details_args="-p with-trace-name=no,with-stream-name=no"
 
diff --git a/tests/plugins/src.ctf.fs/succeed/trace-simple.expect b/tests/plugins/src.ctf.fs/succeed/trace-simple.expect
deleted file mode 100644 (file)
index 90218c2..0000000
+++ /dev/null
@@ -1,218 +0,0 @@
-Trace class:
-  Stream class (ID 0):
-    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: No
-    Discarded packets have default clock snapshots: No
-    Default clock class:
-      Name: default
-      Frequency (Hz): 1,000,000,000
-      Precision (cycles): 1
-      Offset (s): 0
-      Offset (cycles): 0
-      Origin is Unix epoch: No
-    Event class `ev` (ID 0):
-      Payload field class: Structure (2 members):
-        first: Signed integer (8-bit, Base 10)
-        second: String
-
-{Trace 0, Stream class ID 0, Stream ID 0}
-Stream beginning:
-  Trace:
-    Stream (ID 0, Class ID 0)
-
-[Unknown]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Stream activity beginning
-
-[0 cycles, 0 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Packet beginning:
-
-[3600 cycles, 3600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -23
-    second: saluuuut
-
-[8600 cycles, 8600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -22
-    second: saluuuut
-
-[13,600 cycles, 13,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -21
-    second: saluuuut
-
-[18,600 cycles, 18,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -20
-    second: saluuuut
-
-[23,600 cycles, 23,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -19
-    second: saluuuut
-
-[28,600 cycles, 28,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -18
-    second: saluuuut
-
-[33,600 cycles, 33,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -17
-    second: saluuuut
-
-[38,600 cycles, 38,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -16
-    second: saluuuut
-
-[43,600 cycles, 43,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -15
-    second: saluuuut
-
-[48,600 cycles, 48,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -14
-    second: saluuuut
-
-[53,600 cycles, 53,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -13
-    second: saluuuut
-
-[58,600 cycles, 58,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -12
-    second: saluuuut
-
-[63,600 cycles, 63,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -11
-    second: saluuuut
-
-[68,600 cycles, 68,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -10
-    second: saluuuut
-
-[73,600 cycles, 73,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -9
-    second: saluuuut
-
-[78,600 cycles, 78,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -8
-    second: saluuuut
-
-[83,600 cycles, 83,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -7
-    second: saluuuut
-
-[88,600 cycles, 88,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -6
-    second: saluuuut
-
-[93,600 cycles, 93,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -5
-    second: saluuuut
-
-[98,600 cycles, 98,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -4
-    second: saluuuut
-
-[103,600 cycles, 103,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -3
-    second: saluuuut
-
-[108,600 cycles, 108,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -2
-    second: saluuuut
-
-[113,600 cycles, 113,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: -1
-    second: saluuuut
-
-[118,600 cycles, 118,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: 0
-    second: saluuuut
-
-[123,600 cycles, 123,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `ev` (Class ID 0):
-  Payload:
-    first: 1
-    second: saluuuut
-
-[123,600 cycles, 123,600 ns from origin]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Packet end
-
-[Unknown]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Stream activity end
-
-{Trace 0, Stream class ID 0, Stream ID 0}
-Stream end
diff --git a/tests/plugins/src.ctf.fs/succeed/trace-smalltrace.expect b/tests/plugins/src.ctf.fs/succeed/trace-smalltrace.expect
deleted file mode 100644 (file)
index 5140490..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-Trace class:
-  UUID: 2a6422d0-6cee-11e0-8c08-cb07d7b3a564
-  Stream class (ID 0):
-    Packets have beginning default clock snapshot: No
-    Packets have end default clock snapshot: No
-    Supports discarded events: No
-    Discarded events have default clock snapshots: No
-    Supports discarded packets: No
-    Discarded packets have default clock snapshots: No
-    Event class `string` (ID 0):
-      Payload field class: Structure (1 member):
-        str: String
-
-{Trace 0, Stream class ID 0, Stream ID 0}
-Stream beginning:
-  Trace:
-    Class UUID: 2a6422d0-6cee-11e0-8c08-cb07d7b3a564
-    Stream (ID 0, Class ID 0)
-
-[Unknown]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Stream activity beginning
-
-{Trace 0, Stream class ID 0, Stream ID 0}
-Packet beginning:
-
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `string` (Class ID 0):
-  Payload:
-    str: This is a test trace
-
-{Trace 0, Stream class ID 0, Stream ID 0}
-Event `string` (Class ID 0):
-  Payload:
-    str: with only two small events.
-
-{Trace 0, Stream class ID 0, Stream ID 0}
-Packet end
-
-[Unknown]
-{Trace 0, Stream class ID 0, Stream ID 0}
-Stream activity end
-
-{Trace 0, Stream class ID 0, Stream ID 0}
-Stream end
index 976ef70e2bf97b31b4f111b277955cb0788e346a..3f7e2a31a8babd66e18345c88a83e004f913e4a3 100644 (file)
@@ -4,7 +4,8 @@ BT_SRC_PATH="@abs_top_srcdir@"
 BT_BUILD_PATH="@abs_top_builddir@"
 
 BT_BIN="${BT_BUILD_PATH}/src/cli/babeltrace2@EXEEXT@"
-BT_CTF_TRACES="${BT_SRC_PATH}/tests/ctf-traces"
+BT_CTF_TRACES_PATH="${BT_SRC_PATH}/tests/data/ctf-traces"
+BT_DEBUG_INFO_PATH="${BT_SRC_PATH}/tests/data/debug-info"
 
 if [ "x${NO_SH_TAP}" = x ]; then
     . "${BT_SRC_PATH}/tests/utils/tap/tap.sh"
index d8e46b54a33b6206b42e00883bf4bd50ee207711..b4ea36b59b8ca358e10f3c8d8b61532ee3cdcd83 100644 (file)
@@ -30,7 +30,8 @@ NO_SH_TAP=1
 export BABELTRACE_PYTHON_BT2_NO_TRACEBACK=1
 export TEST_PLUGIN_PLUGINS_PATH="${BT_BUILD_PATH}/src/plugins"
 export BABELTRACE_PLUGIN_PATH="${BT_BUILD_PATH}/src/plugins/ctf:${BT_BUILD_PATH}/src/plugins/utils:${BT_BUILD_PATH}/src/plugins/text"
-export TEST_CTF_TRACES_PATH="${BT_SRC_PATH}/tests/ctf-traces"
+export BT_CTF_TRACES_PATH
+
 PYTHON_BUILD_DIR="${BT_BUILD_PATH}/src/bindings/python/bt2/build/build_lib"
 TESTS_UTILS_PYTHON_DIR="${BT_SRC_PATH}/tests/utils/python"
 export PYTHONPATH="${PYTHON_BUILD_DIR}:${TESTS_UTILS_PYTHON_DIR}"
This page took 0.144006 seconds and 4 git commands to generate.