From 2d2a59db23cb729ecd7a761d116ea4ec1fa95311 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Tue, 13 Aug 2019 19:18:06 -0400 Subject: [PATCH] Tests: src.ctf.lttng-live: add inverse ordering from relayd Validate that relayd side ordering does not have an influence on determinism of trace decoding. Change-Id: I37cf7f0d17616acb667339793d6624a7c67dfae3 Signed-off-by: Jonathan Rajotte Reviewed-on: https://review.lttng.org/c/babeltrace/+/1916 Reviewed-by: Simon Marchi --- tests/plugins/src.ctf.lttng-live/test_live | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/plugins/src.ctf.lttng-live/test_live b/tests/plugins/src.ctf.lttng-live/test_live index 41ed24a2..2ad689da 100755 --- a/tests/plugins/src.ctf.lttng-live/test_live +++ b/tests/plugins/src.ctf.lttng-live/test_live @@ -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 -- 2.34.1