[lttng-dev] [PATCH] lttng-tools: accommodate stricter mktemp implementations in tests

Nathan Lynch nathan_lynch at mentor.com
Tue Nov 1 17:25:47 UTC 2016


Busybox's mktemp command uses mkstemp(3) which requires the last six
characters of the template to be X's.  Extend the mktemp templates
used in the test scripts.

Signed-off-by: Nathan Lynch <nathan_lynch at mentor.com>
---
 tests/regression/kernel/test_clock_override             | 4 ++--
 tests/regression/ust/clock-override/test_clock_override | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/regression/kernel/test_clock_override b/tests/regression/kernel/test_clock_override
index c52ddf100b25..2f64bd92943b 100755
--- a/tests/regression/kernel/test_clock_override
+++ b/tests/regression/kernel/test_clock_override
@@ -76,8 +76,8 @@ function extract_clock_metadata_token()
 
 function test_clock_override_metadata()
 {
-	local ctf_metadata_file=$(mktemp -p $TRACE_PATH ctf-metadata.XXXXX)
-	local clock_metadata_file=$(mktemp -p $TRACE_PATH clock-metadata.XXXXX)
+	local ctf_metadata_file=$(mktemp -p $TRACE_PATH ctf-metadata.XXXXXX)
+	local clock_metadata_file=$(mktemp -p $TRACE_PATH clock-metadata.XXXXXX)
 	local result=""
 
 	diag "Clock override plugin metadata test"
diff --git a/tests/regression/ust/clock-override/test_clock_override b/tests/regression/ust/clock-override/test_clock_override
index 722e7315849f..77fa91216fa3 100755
--- a/tests/regression/ust/clock-override/test_clock_override
+++ b/tests/regression/ust/clock-override/test_clock_override
@@ -76,8 +76,8 @@ function extract_clock_metadata_token()
 
 function test_getcpu_override_metadata()
 {
-	local ctf_metadata_file=$(mktemp -p $TRACE_PATH ctf-metadata.XXXXX)
-	local clock_metadata_file=$(mktemp -p $TRACE_PATH clock-metadata.XXXXX)
+	local ctf_metadata_file=$(mktemp -p $TRACE_PATH ctf-metadata.XXXXXX)
+	local clock_metadata_file=$(mktemp -p $TRACE_PATH clock-metadata.XXXXXX)
 	local result=""
 
 	diag "Clock override plugin metadata test"
-- 
2.7.4



More information about the lttng-dev mailing list