From b5ba8abccb3ce6f65850a918d40781eda51ab8d8 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 30 Sep 2019 11:28:45 -0400 Subject: [PATCH] tests: delete temporary files in cli/test_help Also, use `-t` option of mktemp so that temporary files are created in the system's tmp directory (/tmp) instead of the current working directory. Change-Id: If27b7cc420a70033abc81f8f901521ea58a830bc Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/2106 Tested-by: jenkins Reviewed-by: Francis Deslauriers --- tests/cli/test_help | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/cli/test_help b/tests/cli/test_help index b867618e..da6460b7 100755 --- a/tests/cli/test_help +++ b/tests/cli/test_help @@ -28,8 +28,8 @@ source "$UTILSSH" plan_tests 21 -stdout=$(mktemp test_help_stdout.XXXXXX) -stderr=$(mktemp test_help_stderr.XXXXXX) +stdout=$(mktemp -t test_help_stdout.XXXXXX) +stderr=$(mktemp -t test_help_stderr.XXXXXX) # Return 0 if file "$1" exists and is empty, non-0 otherwise. @@ -107,3 +107,5 @@ ok $? "help with unknown component class plugin produces expected error" is_empty "${stdout}" ok $? "help with unknown component class plugin produces no output" + +rm -f "${stdout}" "${stderr}" -- 2.34.1