Tests: src.ctf.lttng-live: add inverse ordering from relayd
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 13 Aug 2019 23:18:06 +0000 (19:18 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 24 Sep 2019 19:53:51 +0000 (15:53 -0400)
Validate that relayd side ordering does not have an influence on
determinism of trace decoding.

Change-Id: I37cf7f0d17616acb667339793d6624a7c67dfae3
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1916
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
tests/plugins/src.ctf.lttng-live/test_live

index 41ed24a29266a0e0c657254fc69cd60f6d961b07..2ad689da7153d75eebaa371117cbb95c742b08fd 100755 (executable)
@@ -210,7 +210,7 @@ test_list_sessions() {
 
        local test_text="CLI prints the expected session list"
        local cli_args_template="-i lttng-live net://localhost:@PORT@"
-       local server_args="'multi-domains,0,hostname,1,0,${trace_dir}/multi-domains/kernel/,${trace_dir}/multi-domains/ust/' 'trace-with-index,1,hostname,1,0,${trace_dir}/trace-with-index/'"
+       local server_args="'multi-domains,0,hostname,1,0,${trace_dir}/multi-domains/ust/' 'multi-domains,1,hostname,1,0,${trace_dir}/multi-domains/kernel/' 'trace-with-index,2,hostname,1,0,${trace_dir}/trace-with-index/' "
 
        template_expected=$(<"$test_data_dir/cli-list-sessions.expect")
        cli_stderr="$(mktemp)"
@@ -297,23 +297,28 @@ test_rate_limited() {
 test_compare_to_ctf_fs() {
        # Compare the details text sink or ctf.fs and ctf.lttng-live to ensure
        # that the trace is parsed the same way.
+       # Do the same with the session swapped on the relayd side. This validate
+       # that ordering is consistent between live and ctf fs.
        local test_text="CLI src.ctf.fs vs src.ctf.lttng-live"
-       local cli_args_template="-i lttng-live net://localhost:@PORT@/host/hostname/trace-with-index -c sink.text.details --params with-trace-name=false,with-stream-name=false"
-       local server_args="'trace-with-index,0,hostname,1,0,${trace_dir}/trace-with-index/'"
+       local cli_args_template="-i lttng-live net://localhost:@PORT@/host/hostname/multi-domains -c sink.text.details --params with-trace-name=false,with-stream-name=false"
+       local server_args="'multi-domains,0,hostname,1,0,${trace_dir}/multi-domains/kernel/' 'multi-domains,1,hostname,1,0,${trace_dir}/multi-domains/ust/'"
+       local server_args_inverse="'multi-domains,0,hostname,1,0,${trace_dir}/multi-domains/ust/' 'multi-domains,1,hostname,1,0,${trace_dir}/multi-domains/kernel/'"
        local expected_stdout
        local expected_stderr
 
        expected_stdout=$(mktemp)
        expected_stderr=$(mktemp)
 
-       bt_cli "$expected_stdout" "$expected_stderr" "${trace_dir}/trace-with-index/" -c sink.text.details --params "with-trace-name=false,with-stream-name=false"
+       bt_cli "$expected_stdout" "$expected_stderr" "${trace_dir}/multi-domains" -c sink.text.details --params "with-trace-name=false,with-stream-name=false"
        run_test "$test_text" "$cli_args_template" "$server_args" "$expected_stdout" "$expected_stderr"
+       diag "Inverse session order from lttng-relayd"
+       run_test "$test_text" "$cli_args_template" "$server_args_inverse" "$expected_stdout" "$expected_stderr"
 
        rm -f "$expected_stdout"
        rm -f "$expected_stderr"
 }
 
-plan_tests 10
+plan_tests 12
 
 test_list_sessions
 test_base
This page took 0.02551 seconds and 4 git commands to generate.