Fix the path to utils.sh, so that shellcheck finds it. Then, fix:
In test_succeed line 69:
local temp_stdout_output_file="$(mktemp -t actual_stdout.XXXXXX)"
^---------------------^ SC2155: Declare and assign separately to avoid masking return values.
In test_succeed line 70:
local temp_greped_stdout_output_file="$(mktemp -t greped_stdout.XXXXXX)"
^----------------------------^ SC2155: Declare and assign separately to avoid masking return values.
In test_succeed line 71:
local temp_stderr_output_file="$(mktemp -t actual_stderr.XXXXXX)"
^---------------------^ SC2155: Declare and assign separately to avoid masking return values.
In test_succeed line 103:
local temp_stdout_output_file="$(mktemp -t actual_stdout.XXXXXX)"
^---------------------^ SC2155: Declare and assign separately to avoid masking return values.
In test_succeed line 104:
local temp_stderr_output_file="$(mktemp -t actual_stderr.XXXXXX)"
^---------------------^ SC2155: Declare and assign separately to avoid masking return values.
Change-Id: Ia67e0726aa898df7a761a3284fdd2919ac2570e8
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reported-by: shellcheck
Reviewed-on: https://review.lttng.org/c/babeltrace/+/3137
Tested-by: jenkins <jenkins@lttng.org>
local ret_stderr
local details_comp=("-c" "sink.text.details")
local details_args=("-p" "with-trace-name=no,with-stream-name=no,with-metadata=no,compact=yes")
local ret_stderr
local details_comp=("-c" "sink.text.details")
local details_args=("-p" "with-trace-name=no,with-stream-name=no,with-metadata=no,compact=yes")
- local temp_stdout_output_file="$(mktemp -t actual_stdout.XXXXXX)"
- local temp_greped_stdout_output_file="$(mktemp -t greped_stdout.XXXXXX)"
- local temp_stderr_output_file="$(mktemp -t actual_stderr.XXXXXX)"
+ local temp_stdout_output_file
+ local temp_greped_stdout_output_file
+ local temp_stderr_output_file
+
+ temp_stdout_output_file="$(mktemp -t actual_stdout.XXXXXX)"
+ temp_greped_stdout_output_file="$(mktemp -t greped_stdout.XXXXXX)"
+ temp_stderr_output_file="$(mktemp -t actual_stderr.XXXXXX)"
bt_cli "$temp_stdout_output_file" "$temp_stderr_output_file" \
"$succeed_trace_dir/$name" "${details_comp[@]}" \
bt_cli "$temp_stdout_output_file" "$temp_stderr_output_file" \
"$succeed_trace_dir/$name" "${details_comp[@]}" \
local src_ctf_fs_args=("-p" "force-clock-class-origin-unix-epoch=true")
local details_comp=("-c" "sink.text.details")
local details_args=("-p" "with-trace-name=no,with-stream-name=no,with-metadata=yes,compact=yes")
local src_ctf_fs_args=("-p" "force-clock-class-origin-unix-epoch=true")
local details_comp=("-c" "sink.text.details")
local details_args=("-p" "with-trace-name=no,with-stream-name=no,with-metadata=yes,compact=yes")
- local temp_stdout_output_file="$(mktemp -t actual_stdout.XXXXXX)"
- local temp_stderr_output_file="$(mktemp -t actual_stderr.XXXXXX)"
+ local temp_stdout_output_file
+ local temp_stderr_output_file
+
+ temp_stdout_output_file="$(mktemp -t actual_stdout.XXXXXX)"
+ temp_stderr_output_file="$(mktemp -t actual_stderr.XXXXXX)"
bt_cli "$temp_stdout_output_file" "$temp_stderr_output_file" \
"$succeed_trace_dir/$name1" "${src_ctf_fs_args[@]}" \
bt_cli "$temp_stdout_output_file" "$temp_stderr_output_file" \
"$succeed_trace_dir/$name1" "${src_ctf_fs_args[@]}" \