[lttng-dev] [PATCH] babeltrace: remove temporary pathnames from test output

Nathan Lynch nathan_lynch at mentor.com
Mon Jul 10 16:22:47 UTC 2017

The test_trace_copy testcases report temporary file names in their

PASS: test_trace_copy 1 - Copy trace env-warning with ctf-fs sink
PASS: test_trace_copy 2 - Read the new trace in /tmp/tmp.QEIftzmua1
PASS: test_trace_copy 3 - Exact same content between the two traces
PASS: test_trace_copy 4 - Copy trace lttng-modules-2.0-pre5 with ctf-fs sink
PASS: test_trace_copy 5 - Read the new trace in /tmp/tmp.jswse49ryN

These change from one run to the next, making it difficult to compare
logs.  Since printing the pathnames doesn't seem to add any
significant value to the tests, use a message that won't vary
across runs with the same pass/fail status.

Signed-off-by: Nathan Lynch <nathan_lynch at mentor.com>
 tests/cli/test_trace_copy.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/cli/test_trace_copy.in b/tests/cli/test_trace_copy.in
index 36297bfc60d5..493ea0fafe22 100644
--- a/tests/cli/test_trace_copy.in
+++ b/tests/cli/test_trace_copy.in
@@ -47,10 +47,10 @@ for path in ${SUCCESS_TRACES[@]}; do
 	$BABELTRACE_BIN ${out_path} >/dev/null 2>&1
 	if test $? != 0; then
-		fail "Read the new trace in ${out_path}"
+		fail "Read the generated copy of ${trace}"
-	ok 0 "Read the new trace in ${out_path}"
+	ok 0 "Read the generated copy of ${trace}"
 	$BABELTRACE_BIN ${out_path} 2>/dev/null >${text_output2}
 	cnt=$(diff ${text_output1} ${text_output2} | wc -l)

More information about the lttng-dev mailing list