From: Michael Jeanson Date: Thu, 13 Jun 2019 20:18:40 +0000 (-0400) Subject: tests: Move data files to a common directory X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=bbff0ab4992445a57cb04e35da8e63b8ed32ea38 tests: Move data files to a common directory * 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 Change-Id: I5fd06e5280e5864593aca8e964eeda9121b8a48e Reviewed-on: https://review.lttng.org/c/babeltrace/+/1428 Tested-by: jenkins Reviewed-by: Philippe Proulx --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 60694d93..92472785 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 = \ diff --git a/tests/bindings/python/bt2/test_python_bt2.in b/tests/bindings/python/bt2/test_python_bt2.in index e9941018..a067f7fb 100644 --- a/tests/bindings/python/bt2/test_python_bt2.in +++ b/tests/bindings/python/bt2/test_python_bt2.in @@ -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" diff --git a/tests/bindings/python/bt2/test_trace_collection_message_iterator.py b/tests/bindings/python/bt2/test_trace_collection_message_iterator.py index e30cad43..64a974dc 100644 --- a/tests/bindings/python/bt2/test_trace_collection_message_iterator.py +++ b/tests/bindings/python/bt2/test_trace_collection_message_iterator.py @@ -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') diff --git a/tests/cli/test_intersection.in b/tests/cli/test_intersection.in index 7cea9be7..b84ec8ab 100644 --- a/tests/cli/test_intersection.in +++ b/tests/cli/test_intersection.in @@ -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 diff --git a/tests/cli/test_output_ctf_metadata.in b/tests/cli/test_output_ctf_metadata.in index d01be19b..e39bbc49 100644 --- a/tests/cli/test_output_ctf_metadata.in +++ b/tests/cli/test_output_ctf_metadata.in @@ -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 index 01dbf3f0..00000000 --- a/tests/cli/test_output_ctf_metadata.ref +++ /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 { - 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 { - 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/cli/test_packet_seq_num.in b/tests/cli/test_packet_seq_num.in index 38a6bf29..3a42f8f9 100644 --- a/tests/cli/test_packet_seq_num.in +++ b/tests/cli/test_packet_seq_num.in @@ -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" diff --git a/tests/cli/test_trace_copy.in b/tests/cli/test_trace_copy.in index ca37ced4..c9047460 100644 --- a/tests/cli/test_trace_copy.in +++ b/tests/cli/test_trace_copy.in @@ -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)) diff --git a/tests/cli/test_trace_read.in b/tests/cli/test_trace_read.in index e9857eef..5cd6344a 100644 --- a/tests/cli/test_trace_read.in +++ b/tests/cli/test_trace_read.in @@ -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[@]})) diff --git a/tests/cli/test_trimmer.in b/tests/cli/test_trimmer.in index 8c853aea..f40ab444 100644 --- a/tests/cli/test_trimmer.in +++ b/tests/cli/test_trimmer.in @@ -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 index 26010671..00000000 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 index 28185f5d..00000000 --- a/tests/ctf-traces/fail/fail1/metadata +++ /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 index 456661ed..00000000 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 index 35749408..00000000 --- a/tests/ctf-traces/fail/integer-range/metadata +++ /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 index 6f92a298..00000000 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 index e2097803..00000000 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 index fc7e07cb..00000000 --- a/tests/ctf-traces/fail/smalltrace/dummystream-fail +++ /dev/null @@ -1 +0,0 @@ -ÁüÁ*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 index 86f8e0a3..00000000 --- a/tests/ctf-traces/fail/smalltrace/metadata +++ /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 index 7cc1b4d1..00000000 --- a/tests/ctf-traces/intersection/3eventsintersect/metadata +++ /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 index 6a69e445..00000000 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 index 0cf1404d..00000000 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 index 7cc1b4d1..00000000 --- a/tests/ctf-traces/intersection/3eventsintersectreverse/metadata +++ /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 index 0cf1404d..00000000 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 index 6a69e445..00000000 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 index 5e14a71b..00000000 --- a/tests/ctf-traces/intersection/nointersect/metadata +++ /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 index 7c32bae6..00000000 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 index e656ba67..00000000 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 index 5e14a71b..00000000 --- a/tests/ctf-traces/intersection/nostream/metadata +++ /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 index 5e14a71b..00000000 --- a/tests/ctf-traces/intersection/onestream/metadata +++ /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 index 7c32bae6..00000000 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 index 36e26cdf..00000000 --- a/tests/ctf-traces/packet_seq_num/2_lost_before_last/metadata +++ /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 index 50d36a46..00000000 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 index 525405e2..00000000 --- a/tests/ctf-traces/packet_seq_num/2_streams_lost_in_1/metadata +++ /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 index 1b362cd4..00000000 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 index d5114d90..00000000 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 index 680d9103..00000000 --- a/tests/ctf-traces/packet_seq_num/2_streams_lost_in_2/metadata +++ /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 index b0beb6b4..00000000 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 index 1ad83201..00000000 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 index d562061a..00000000 --- a/tests/ctf-traces/packet_seq_num/no_lost/metadata +++ /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 index 15821fb1..00000000 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 index c8f5783d..00000000 --- a/tests/ctf-traces/packet_seq_num/no_lost_not_starting_at_0/metadata +++ /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 index f9639a3a..00000000 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 index 53d735e0..00000000 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 index 0fb823cb..00000000 --- a/tests/ctf-traces/succeed/env-warning/metadata +++ /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 index 1b4803b1..00000000 --- a/tests/ctf-traces/succeed/ev-disc-no-ts-begin-end/metadata +++ /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 index b42129a0..00000000 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 index c8114323..00000000 --- a/tests/ctf-traces/succeed/no-packet-context/metadata +++ /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 index 0db26329..00000000 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 index 5038a227..00000000 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 index fd947382..00000000 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 index 9d848fcb..00000000 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 index ef385c38..00000000 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 index 2163abfc..00000000 --- a/tests/ctf-traces/succeed/sequence/metadata +++ /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 { - 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 { - 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 index 469cb9a3..00000000 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 index bf356a85..00000000 --- a/tests/ctf-traces/succeed/smalltrace/metadata +++ /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 index 53d735e0..00000000 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 index 2c18b9d0..00000000 --- a/tests/ctf-traces/succeed/succeed1/metadata +++ /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 index 53d735e0..00000000 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 index c52443fc..00000000 --- a/tests/ctf-traces/succeed/succeed2/metadata +++ /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 index 53d735e0..00000000 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 index 5bcd1c8e..00000000 --- a/tests/ctf-traces/succeed/succeed3/metadata +++ /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 index 63979e97..00000000 --- a/tests/ctf-traces/succeed/succeed4/metadata +++ /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 index 53d735e0..00000000 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 index 125a5d58..00000000 --- a/tests/ctf-traces/succeed/warnings/metadata +++ /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 index e35f463e..00000000 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 index 3af2cdc1..00000000 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 index 7b74c035..00000000 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 index 13a69fc1..00000000 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 index 1cdde727..00000000 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 index c1360344..00000000 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 index a0a58817..00000000 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 index b1c8520e..00000000 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 index 05f7393e..00000000 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 index 00000000..01dbf3f0 --- /dev/null +++ b/tests/data/cli/test_output_ctf_metadata.ref @@ -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 { + 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 { + 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 index 00000000..26010671 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 index 00000000..28185f5d --- /dev/null +++ b/tests/data/ctf-traces/fail/fail1/metadata @@ -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 index 00000000..456661ed 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 index 00000000..35749408 --- /dev/null +++ b/tests/data/ctf-traces/fail/integer-range/metadata @@ -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 index 00000000..6f92a298 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 index 00000000..e2097803 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 index 00000000..fc7e07cb --- /dev/null +++ b/tests/data/ctf-traces/fail/smalltrace/dummystream-fail @@ -0,0 +1 @@ +ÁüÁ*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 index 00000000..86f8e0a3 --- /dev/null +++ b/tests/data/ctf-traces/fail/smalltrace/metadata @@ -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 index 00000000..7cc1b4d1 --- /dev/null +++ b/tests/data/ctf-traces/intersection/3eventsintersect/metadata @@ -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 index 00000000..6a69e445 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 index 00000000..0cf1404d 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 index 00000000..7cc1b4d1 --- /dev/null +++ b/tests/data/ctf-traces/intersection/3eventsintersectreverse/metadata @@ -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 index 00000000..0cf1404d 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 index 00000000..6a69e445 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 index 00000000..5e14a71b --- /dev/null +++ b/tests/data/ctf-traces/intersection/nointersect/metadata @@ -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 index 00000000..7c32bae6 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 index 00000000..e656ba67 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 index 00000000..5e14a71b --- /dev/null +++ b/tests/data/ctf-traces/intersection/nostream/metadata @@ -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 index 00000000..5e14a71b --- /dev/null +++ b/tests/data/ctf-traces/intersection/onestream/metadata @@ -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 index 00000000..7c32bae6 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 index 00000000..36e26cdf --- /dev/null +++ b/tests/data/ctf-traces/packet_seq_num/2_lost_before_last/metadata @@ -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 index 00000000..50d36a46 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 index 00000000..525405e2 --- /dev/null +++ b/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_1/metadata @@ -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 index 00000000..1b362cd4 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 index 00000000..d5114d90 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 index 00000000..680d9103 --- /dev/null +++ b/tests/data/ctf-traces/packet_seq_num/2_streams_lost_in_2/metadata @@ -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 index 00000000..b0beb6b4 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 index 00000000..1ad83201 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 index 00000000..d562061a --- /dev/null +++ b/tests/data/ctf-traces/packet_seq_num/no_lost/metadata @@ -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 index 00000000..15821fb1 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 index 00000000..c8f5783d --- /dev/null +++ b/tests/data/ctf-traces/packet_seq_num/no_lost_not_starting_at_0/metadata @@ -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 index 00000000..f9639a3a 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 index 00000000..53d735e0 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 index 00000000..0fb823cb --- /dev/null +++ b/tests/data/ctf-traces/succeed/env-warning/metadata @@ -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 index 00000000..1b4803b1 --- /dev/null +++ b/tests/data/ctf-traces/succeed/ev-disc-no-ts-begin-end/metadata @@ -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 index 00000000..b42129a0 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 index 00000000..c8114323 --- /dev/null +++ b/tests/data/ctf-traces/succeed/no-packet-context/metadata @@ -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 index 00000000..0db26329 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 index 00000000..5038a227 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 index 00000000..fd947382 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 index 00000000..9d848fcb 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 index 00000000..ef385c38 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 index 00000000..2163abfc --- /dev/null +++ b/tests/data/ctf-traces/succeed/sequence/metadata @@ -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 { + 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 { + 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 index 00000000..469cb9a3 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 index 00000000..bf356a85 --- /dev/null +++ b/tests/data/ctf-traces/succeed/smalltrace/metadata @@ -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 index 00000000..53d735e0 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 index 00000000..2c18b9d0 --- /dev/null +++ b/tests/data/ctf-traces/succeed/succeed1/metadata @@ -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 index 00000000..53d735e0 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 index 00000000..c52443fc --- /dev/null +++ b/tests/data/ctf-traces/succeed/succeed2/metadata @@ -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 index 00000000..53d735e0 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 index 00000000..5bcd1c8e --- /dev/null +++ b/tests/data/ctf-traces/succeed/succeed3/metadata @@ -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 index 00000000..63979e97 --- /dev/null +++ b/tests/data/ctf-traces/succeed/succeed4/metadata @@ -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 index 00000000..53d735e0 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 index 00000000..125a5d58 --- /dev/null +++ b/tests/data/ctf-traces/succeed/warnings/metadata @@ -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 index 00000000..e35f463e 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 index 00000000..3af2cdc1 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 index 00000000..7b74c035 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 index 00000000..13a69fc1 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 index 00000000..1cdde727 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 index 00000000..c1360344 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 index 00000000..a0a58817 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 index 00000000..b1c8520e 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 index 00000000..05f7393e 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 index 00000000..28208052 --- /dev/null +++ b/tests/data/debug-info/Makefile @@ -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 index 00000000..1912194a --- /dev/null +++ b/tests/data/debug-info/README.md @@ -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 index 00000000..ba371f5d 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 index 00000000..218e6685 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 index 00000000..4dcfdc50 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 index 00000000..1ede7704 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 index 00000000..08390c8f 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 index 00000000..84c31e25 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 index 00000000..95382b55 --- /dev/null +++ b/tests/data/debug-info/libhello.c @@ -0,0 +1,50 @@ +/* + * libhello.c + * + * Debug Info - Tests + * + * Copyright 2016 Antoine Busque + * + * Author: Antoine Busque + * + * 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 +#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 index 00000000..b3f8893e --- /dev/null +++ b/tests/data/debug-info/libhello.h @@ -0,0 +1,36 @@ +/* + * libhello.h + * + * Debug Info - Tests + * + * Copyright 2016 Antoine Busque + * + * Author: Antoine Busque + * + * 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 index 00000000..e272bc10 --- /dev/null +++ b/tests/data/debug-info/main.c @@ -0,0 +1,37 @@ +/* + * main.c + * + * Debug Info - Main + * + * Copyright 2017 Julien Desfossez + * + * 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 +#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 index 00000000..6fa14992 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 index 00000000..49c62499 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 index 00000000..23efdc8b 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 index 00000000..a95eed28 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 index 00000000..ef39d51e 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 index 00000000..d1e7322b 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 index 00000000..b419832f 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 index 00000000..f740eb0c 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 index 00000000..01e0c6b4 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 index 00000000..86364a3b 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 index 00000000..3874f118 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 index 00000000..067b4720 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 index 00000000..e893355f --- /dev/null +++ b/tests/data/debug-info/tp.c @@ -0,0 +1,30 @@ +/* + * tp.c + * + * Debug Info - Tests + * + * Copyright 2016 Antoine Busque + * + * Author: Antoine Busque + * + * 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 index 00000000..1a3660e8 --- /dev/null +++ b/tests/data/debug-info/tp.h @@ -0,0 +1,66 @@ +/* + * tp.h + * + * Debug Info - Tests + * + * Copyright 2016 Antoine Busque + * + * Author: Antoine Busque + * + * 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 + +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 diff --git a/tests/data/debug-info/trace/metadata b/tests/data/debug-info/trace/metadata new file mode 100644 index 00000000..1388b296 --- /dev/null +++ b/tests/data/debug-info/trace/metadata @@ -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 { + 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 index 00000000..582f445a 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 index 00000000..41e2cfb0 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 index 00000000..0edfd79b 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 index 00000000..0c126010 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 index 00000000..082f5136 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 index 00000000..f8d3e411 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 index 00000000..bffdaab7 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 index 00000000..90218c2c --- /dev/null +++ b/tests/data/plugins/src.ctf.fs/succeed/trace-simple.expect @@ -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 index 00000000..51404900 --- /dev/null +++ b/tests/data/plugins/src.ctf.fs/succeed/trace-smalltrace.expect @@ -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 index 28208052..00000000 --- a/tests/debug-info-data/Makefile +++ /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 index 1912194a..00000000 --- a/tests/debug-info-data/README.md +++ /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 index ba371f5d..00000000 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 index 218e6685..00000000 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 index 4dcfdc50..00000000 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 index 1ede7704..00000000 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 index 08390c8f..00000000 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 index 84c31e25..00000000 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 index 95382b55..00000000 --- a/tests/debug-info-data/libhello.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * libhello.c - * - * Debug Info - Tests - * - * Copyright 2016 Antoine Busque - * - * Author: Antoine Busque - * - * 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 -#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 index b3f8893e..00000000 --- a/tests/debug-info-data/libhello.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * libhello.h - * - * Debug Info - Tests - * - * Copyright 2016 Antoine Busque - * - * Author: Antoine Busque - * - * 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 index e272bc10..00000000 --- a/tests/debug-info-data/main.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * main.c - * - * Debug Info - Main - * - * Copyright 2017 Julien Desfossez - * - * 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 -#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 index 6fa14992..00000000 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 index 49c62499..00000000 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 index 23efdc8b..00000000 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 index a95eed28..00000000 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 index ef39d51e..00000000 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 index d1e7322b..00000000 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 index b419832f..00000000 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 index f740eb0c..00000000 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 index 01e0c6b4..00000000 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 index 86364a3b..00000000 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 index 3874f118..00000000 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 index 067b4720..00000000 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 index e893355f..00000000 --- a/tests/debug-info-data/tp.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * tp.c - * - * Debug Info - Tests - * - * Copyright 2016 Antoine Busque - * - * Author: Antoine Busque - * - * 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 index 1a3660e8..00000000 --- a/tests/debug-info-data/tp.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * tp.h - * - * Debug Info - Tests - * - * Copyright 2016 Antoine Busque - * - * Author: Antoine Busque - * - * 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 - -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 diff --git a/tests/debug-info-data/trace/metadata b/tests/debug-info-data/trace/metadata deleted file mode 100644 index 1388b296..00000000 --- a/tests/debug-info-data/trace/metadata +++ /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 { - 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 index 582f445a..00000000 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 index 41e2cfb0..00000000 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 index 0edfd79b..00000000 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 index 0c126010..00000000 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 index 082f5136..00000000 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 index f8d3e411..00000000 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 index bffdaab7..00000000 Binary files a/tests/debug-info-data/x86_64-linux-gnu/elf_only/libhello_so and /dev/null differ diff --git a/tests/plugins/flt.lttng-utils.debug-info/test_bin_info_i386-linux-gnu.in b/tests/plugins/flt.lttng-utils.debug-info/test_bin_info_i386-linux-gnu.in index 9b58d63c..e36379c2 100644 --- a/tests/plugins/flt.lttng-utils.debug-info/test_bin_info_i386-linux-gnu.in +++ b/tests/plugins/flt.lttng-utils.debug-info/test_bin_info_i386-linux-gnu.in @@ -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 \ diff --git a/tests/plugins/flt.lttng-utils.debug-info/test_bin_info_powerpc-linux-gnu.in b/tests/plugins/flt.lttng-utils.debug-info/test_bin_info_powerpc-linux-gnu.in index d0948aa6..c37568c0 100644 --- a/tests/plugins/flt.lttng-utils.debug-info/test_bin_info_powerpc-linux-gnu.in +++ b/tests/plugins/flt.lttng-utils.debug-info/test_bin_info_powerpc-linux-gnu.in @@ -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 \ diff --git a/tests/plugins/flt.lttng-utils.debug-info/test_bin_info_powerpc64le-linux-gnu.in b/tests/plugins/flt.lttng-utils.debug-info/test_bin_info_powerpc64le-linux-gnu.in index 5e814157..70e5b2cf 100644 --- a/tests/plugins/flt.lttng-utils.debug-info/test_bin_info_powerpc64le-linux-gnu.in +++ b/tests/plugins/flt.lttng-utils.debug-info/test_bin_info_powerpc64le-linux-gnu.in @@ -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 \ diff --git a/tests/plugins/flt.lttng-utils.debug-info/test_bin_info_x86_64-linux-gnu.in b/tests/plugins/flt.lttng-utils.debug-info/test_bin_info_x86_64-linux-gnu.in index 6ed40daf..8a29f287 100644 --- a/tests/plugins/flt.lttng-utils.debug-info/test_bin_info_x86_64-linux-gnu.in +++ b/tests/plugins/flt.lttng-utils.debug-info/test_bin_info_x86_64-linux-gnu.in @@ -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 \ diff --git a/tests/plugins/flt.lttng-utils.debug-info/test_dwarf_i386-linux-gnu.in b/tests/plugins/flt.lttng-utils.debug-info/test_dwarf_i386-linux-gnu.in index 4c50ecb9..8794bfac 100644 --- a/tests/plugins/flt.lttng-utils.debug-info/test_dwarf_i386-linux-gnu.in +++ b/tests/plugins/flt.lttng-utils.debug-info/test_dwarf_i386-linux-gnu.in @@ -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" diff --git a/tests/plugins/flt.lttng-utils.debug-info/test_dwarf_powerpc-linux-gnu.in b/tests/plugins/flt.lttng-utils.debug-info/test_dwarf_powerpc-linux-gnu.in index 1a7b7750..15d3a2f6 100644 --- a/tests/plugins/flt.lttng-utils.debug-info/test_dwarf_powerpc-linux-gnu.in +++ b/tests/plugins/flt.lttng-utils.debug-info/test_dwarf_powerpc-linux-gnu.in @@ -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" diff --git a/tests/plugins/flt.lttng-utils.debug-info/test_dwarf_powerpc64le-linux-gnu.in b/tests/plugins/flt.lttng-utils.debug-info/test_dwarf_powerpc64le-linux-gnu.in index 0a94ff00..cbb36503 100644 --- a/tests/plugins/flt.lttng-utils.debug-info/test_dwarf_powerpc64le-linux-gnu.in +++ b/tests/plugins/flt.lttng-utils.debug-info/test_dwarf_powerpc64le-linux-gnu.in @@ -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" diff --git a/tests/plugins/flt.lttng-utils.debug-info/test_dwarf_x86_64-linux-gnu.in b/tests/plugins/flt.lttng-utils.debug-info/test_dwarf_x86_64-linux-gnu.in index 9d0c9d88..7b350898 100644 --- a/tests/plugins/flt.lttng-utils.debug-info/test_dwarf_x86_64-linux-gnu.in +++ b/tests/plugins/flt.lttng-utils.debug-info/test_dwarf_x86_64-linux-gnu.in @@ -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" diff --git a/tests/plugins/flt.lttng-utils.debug-info/test_lttng_utils_debug_info.in b/tests/plugins/flt.lttng-utils.debug-info/test_lttng_utils_debug_info.in index 5d02aaee..210e01a7 100644 --- a/tests/plugins/flt.lttng-utils.debug-info/test_lttng_utils_debug_info.in +++ b/tests/plugins/flt.lttng-utils.debug-info/test_lttng_utils_debug_info.in @@ -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}" diff --git a/tests/plugins/flt.lttng-utils.debug-info/test_lttng_utils_debug_info.py b/tests/plugins/flt.lttng-utils.debug-info/test_lttng_utils_debug_info.py index dd27ec9c..f4e6e2e7 100644 --- a/tests/plugins/flt.lttng-utils.debug-info/test_lttng_utils_debug_info.py +++ b/tests/plugins/flt.lttng-utils.debug-info/test_lttng_utils_debug_info.py @@ -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, diff --git a/tests/plugins/src.ctf.fs/query/test_query_trace_info.py b/tests/plugins/src.ctf.fs/query/test_query_trace_info.py index a026a68e..b3924640 100644 --- a/tests/plugins/src.ctf.fs/query/test_query_trace_info.py +++ b/tests/plugins/src.ctf.fs/query/test_query_trace_info.py @@ -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$", ) diff --git a/tests/plugins/src.ctf.fs/succeed/Makefile.am b/tests/plugins/src.ctf.fs/succeed/Makefile.am index 4a562ccc..88f1bd5e 100644 --- a/tests/plugins/src.ctf.fs/succeed/Makefile.am +++ b/tests/plugins/src.ctf.fs/succeed/Makefile.am @@ -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 diff --git a/tests/plugins/src.ctf.fs/succeed/test_succeed.in b/tests/plugins/src.ctf.fs/succeed/test_succeed.in index 74db85a0..a84b80b7 100644 --- a/tests/plugins/src.ctf.fs/succeed/test_succeed.in +++ b/tests/plugins/src.ctf.fs/succeed/test_succeed.in @@ -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 index 90218c2c..00000000 --- a/tests/plugins/src.ctf.fs/succeed/trace-simple.expect +++ /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 index 51404900..00000000 --- a/tests/plugins/src.ctf.fs/succeed/trace-smalltrace.expect +++ /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 diff --git a/tests/utils/common.sh.in b/tests/utils/common.sh.in index 976ef70e..3f7e2a31 100644 --- a/tests/utils/common.sh.in +++ b/tests/utils/common.sh.in @@ -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" diff --git a/tests/utils/test_python_bt2_env.in b/tests/utils/test_python_bt2_env.in index d8e46b54..b4ea36b5 100644 --- a/tests/utils/test_python_bt2_env.in +++ b/tests/utils/test_python_bt2_env.in @@ -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}"