aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt (Google) <rostedt@goodmis.org>2022-12-10 20:53:28 -0500
committerSteven Rostedt (Google) <rostedt@goodmis.org>2022-12-10 21:08:47 -0500
commit14d197bf071791e976f688421903f2e014bdd996 (patch)
tree1bea89df18cbe224a51fa454e6bbfa40ed616415
parentb492b1c1f7426183d461d49d643fb9662da7cdeb (diff)
downloadtrace-cmd-14d197bf071791e976f688421903f2e014bdd996.tar.gz
trace-cmd: Fix reading stats of read max test
The read max test checks the stats by running trace-cmd report --stat on the file. The problem is that it left out the output file that was created, and if the default file trace.dat does not exist, it fails to read it. Unfortunately, if it does exist, it may give a false pass or fail. Link: https://lore.kernel.org/linux-trace-devel/20221210205328.1f1f03ce@gandalf.local.home Fixes: 1f75010a2 ("trace-cmd: Add test for max size option of record") Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
-rw-r--r--utest/tracecmd-utest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utest/tracecmd-utest.c b/utest/tracecmd-utest.c
index c72684ad..69dcb4be 100644
--- a/utest/tracecmd-utest.c
+++ b/utest/tracecmd-utest.c
@@ -374,7 +374,7 @@ static void test_trace_record_max(void)
"sleep", "10", NULL);
CU_TEST(ret == 0);
- ret = read_stats(TRACECMD_FILE, ".*bytes in size.*", "report", "--stat", NULL);
+ ret = read_stats(TRACECMD_FILE, ".*bytes in size.*", "report", TRACECMD_IN, "--stat", NULL);
CU_TEST(ret == 0);
}