From: Jonathan Rajotte Date: Tue, 22 Oct 2019 16:05:28 +0000 (-0400) Subject: Tests: fix: tmp dir can be a symlink X-Git-Tag: v2.12.0-rc1~290 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b2f4c4fadc015bd2506d6940082a61683e565f1a;p=lttng-tools.git Tests: fix: tmp dir can be a symlink Get the real path to perform valid comparison. Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- diff --git a/tests/regression/tools/working-directory/test_relayd_working_directory b/tests/regression/tools/working-directory/test_relayd_working_directory index 8a261af21..956cb780a 100755 --- a/tests/regression/tools/working-directory/test_relayd_working_directory +++ b/tests/regression/tools/working-directory/test_relayd_working_directory @@ -37,7 +37,7 @@ function test_relayd() local pid local cwd - working_dir=$(mktemp -d) + working_dir=$(realpath "$(mktemp -d)") diag "Test lttng-relayd normal mode change working directory" @@ -72,7 +72,7 @@ function test_relayd_daemon() local cwd local pid - working_dir=$(mktemp -d) + working_dir=$(realpath "$(mktemp -d)") diag "Test lttng-relayd daemon mode change working directory" @@ -116,7 +116,7 @@ function test_relayd_background() local cwd local pid - working_dir=$(mktemp -d) + working_dir=$(realpath "$(mktemp -d)") diag "Test lttng-relayd background mode change working directory" @@ -161,7 +161,7 @@ function test_relayd_debug_permission() local cwd local pid - working_dir=$(mktemp -d) + working_dir=$(realpath "$(mktemp -d)") diag "Test lttng-relayd change working directory on non writable directory" @@ -197,7 +197,7 @@ function test_relayd_failure() local output_dest local pid - working_dir="$(mktemp -d)" + working_dir=$(realpath "$(mktemp -d)") working_dir_imaginary="${working_dir}/imaginary_directory" output_dest=$(mktemp) @@ -229,6 +229,7 @@ function test_relayd_env() local pid working_dir=$(mktemp -d) + working_dir=$(realpath "$(mktemp -d)") diag "Test lttng-relayd change working directory from env. variable" @@ -254,8 +255,8 @@ function test_relayd_cmdline_overwrite_env() local cwd local pid - working_dir_env=$(mktemp -d) - working_dir_cmdline=$(mktemp -d) + working_dir_env=$(realpath "$(mktemp -d)") + working_dir_cmdline=$(realpath "$(mktemp -d)") diag "Test lttng-relayd change working directory command line overwrite env variable"