When running lttng_live_server.py with no arguments, we get:
Traceback (most recent call last):
File "lttng_live_server.py", line 1968, in <module>
trace_path_prefix,
File "lttng_live_server.py", line 1871, in _session_descriptors_from_path
with open(sessions_filename, "r") as sessions_file:
TypeError: invalid file: None
The --sessions-filename argument is effectively mandatory. Change it to
be a positional argument.
Change-Id: I48e67cbf1da8adfaa87d5024d91a922f9b67a7fd
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10898
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
help="Prefix to prepend to the trace paths of session configurations",
)
parser.add_argument(
help="Prefix to prepend to the trace paths of session configurations",
)
parser.add_argument(
type=str,
help="Path to a session configuration file",
type=str,
help="Path to a session configuration file",
+ metavar="sessions-filename",
)
parser.add_argument(
"-h",
)
parser.add_argument(
"-h",
local test_text="CLI prints the expected session list"
local cli_args_template="-i lttng-live net://localhost:@PORT@"
local sessions_file="$test_data_dir/list_sessions.json"
local test_text="CLI prints the expected session list"
local cli_args_template="-i lttng-live net://localhost:@PORT@"
local sessions_file="$test_data_dir/list_sessions.json"
- local server_args="--sessions-filename '$sessions_file'"
+ local server_args="'$sessions_file'"
template_expected=$(<"$test_data_dir/cli-list-sessions.expect")
cli_stderr="$(mktemp -t test_live_list_sessions_stderr.XXXXXX)"
template_expected=$(<"$test_data_dir/cli-list-sessions.expect")
cli_stderr="$(mktemp -t test_live_list_sessions_stderr.XXXXXX)"
local test_text="CLI attach and fetch from single-domains session - no discarded events"
local cli_args_template="-i lttng-live net://localhost:@PORT@/host/hostname/trace-with-index -c sink.text.details"
local sessions_file="$test_data_dir/base.json"
local test_text="CLI attach and fetch from single-domains session - no discarded events"
local cli_args_template="-i lttng-live net://localhost:@PORT@/host/hostname/trace-with-index -c sink.text.details"
local sessions_file="$test_data_dir/base.json"
- local server_args="--sessions-filename '$sessions_file'"
+ local server_args="'$sessions_file'"
local expected_stdout="${test_data_dir}/cli-base.expect"
local expected_stderr
local expected_stdout="${test_data_dir}/cli-base.expect"
local expected_stderr
local test_text="CLI attach and fetch from multi-domains session - discarded events"
local cli_args_template="-i lttng-live net://localhost:@PORT@/host/hostname/multi-domains -c sink.text.details"
local sessions_file="${test_data_dir}/multi_domains.json"
local test_text="CLI attach and fetch from multi-domains session - discarded events"
local cli_args_template="-i lttng-live net://localhost:@PORT@/host/hostname/multi-domains -c sink.text.details"
local sessions_file="${test_data_dir}/multi_domains.json"
- local server_args="--sessions-filename '$sessions_file'"
+ local server_args="'$sessions_file'"
local expected_stdout="$test_data_dir/cli-multi-domains.expect"
local expected_stderr
local expected_stdout="$test_data_dir/cli-multi-domains.expect"
local expected_stderr
local test_text="CLI many requests per packet"
local cli_args_template="-i lttng-live net://localhost:@PORT@/host/hostname/trace-with-index -c sink.text.details"
local sessions_file="$test_data_dir/rate_limited.json"
local test_text="CLI many requests per packet"
local cli_args_template="-i lttng-live net://localhost:@PORT@/host/hostname/trace-with-index -c sink.text.details"
local sessions_file="$test_data_dir/rate_limited.json"
- local server_args="--max-query-data-response-size 1024 --sessions-filename '$sessions_file'"
+ local server_args="--max-query-data-response-size 1024 '$sessions_file'"
local expected_stdout="${test_data_dir}/cli-base.expect"
local expected_stderr
local expected_stdout="${test_data_dir}/cli-base.expect"
local expected_stderr
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 sessions_file="$test_data_dir/multi_domains.json"
local sessions_file_inverse="$test_data_dir/multi_domains_inverse.json"
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 sessions_file="$test_data_dir/multi_domains.json"
local sessions_file_inverse="$test_data_dir/multi_domains_inverse.json"
- local server_args="--sessions-filename '$sessions_file'"
- local server_args_inverse="--sessions-filename '$sessions_file_inverse'"
+ local server_args="'$sessions_file'"
+ local server_args_inverse="'$sessions_file_inverse'"
local expected_stdout
local expected_stderr
local expected_stdout
local expected_stderr
local test_text="CLI attach and fetch from single-domains session - inactivity discarded packet"
local cli_args_template="-i lttng-live net://localhost:@PORT@/host/hostname/7_lost_between_2_with_index -c sink.text.details"
local sessions_file="$test_data_dir/inactivity_discarded_packet.json"
local test_text="CLI attach and fetch from single-domains session - inactivity discarded packet"
local cli_args_template="-i lttng-live net://localhost:@PORT@/host/hostname/7_lost_between_2_with_index -c sink.text.details"
local sessions_file="$test_data_dir/inactivity_discarded_packet.json"
- local server_args="--sessions-filename '$sessions_file'"
+ local server_args="'$sessions_file'"
local expected_stdout="$test_data_dir/inactivity_discarded_packet.expect"
local expected_stderr
local expected_stdout="$test_data_dir/inactivity_discarded_packet.expect"
local expected_stderr
local test_text="CLI attach and fetch from single-domain session - Receive metadata in two sections separated by a empty section"
local cli_args_template="-i lttng-live net://localhost:@PORT@/host/hostname/split_metadata -c sink.text.details"
local sessions_file="$test_data_dir/split_metadata.json"
local test_text="CLI attach and fetch from single-domain session - Receive metadata in two sections separated by a empty section"
local cli_args_template="-i lttng-live net://localhost:@PORT@/host/hostname/split_metadata -c sink.text.details"
local sessions_file="$test_data_dir/split_metadata.json"
- local server_args="--sessions-filename '$sessions_file'"
+ local server_args="'$sessions_file'"
local expected_stdout="${test_data_dir}/split_metadata.expect"
local expected_stderr
local expected_stdout="${test_data_dir}/split_metadata.expect"
local expected_stderr