From: Steven Rostedt <rostedt@goodmis.org> Date: 2023-09-08 22:17:09
From: Steven Rostedt (Google) <rostedt@goodmis.org>
When I'm debugging something with the ftrace selftests and need to look at
the logs, it becomes tedious that I need to do the following:
ls -ltr logs
[ copy the last directory ]
ls logs/<paste-last-dir>
to see where the logs are.
Instead, do the common practice of having a "latest" softlink to the last
run selftest. This way after running the selftest I only need to do:
ls logs/latest/
and it will always give me the directory of the last run selftest logs!
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
@@ -207,6 +211,10 @@ else LOG_FILE=$LOG_DIR/ftracetest.log mkdir -p $LOG_DIR || errexit "Failed to make a log directory: $LOG_DIR" date > $LOG_FILE+ if [ "x-$LINK_PTR" != "x-" ]; then+ unlink $LINK_PTR+ ln -fs $LOG_DATE $LINK_PTR+ fi fi # Define text colors
On Fri, 8 Sep 2023 18:17:21 -0400
Steven Rostedt [off-list ref] wrote:
From: Steven Rostedt (Google) <rostedt@goodmis.org>
When I'm debugging something with the ftrace selftests and need to look at
the logs, it becomes tedious that I need to do the following:
ls -ltr logs
[ copy the last directory ]
ls logs/<paste-last-dir>
to see where the logs are.
Instead, do the common practice of having a "latest" softlink to the last
run selftest. This way after running the selftest I only need to do:
ls logs/latest/
and it will always give me the directory of the last run selftest logs!
Nice! I like this and this looks good to me.
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Thank you!
quoted hunk
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
@@ -207,6 +211,10 @@ else LOG_FILE=$LOG_DIR/ftracetest.log mkdir -p $LOG_DIR || errexit "Failed to make a log directory: $LOG_DIR" date > $LOG_FILE+ if [ "x-$LINK_PTR" != "x-" ]; then+ unlink $LINK_PTR+ ln -fs $LOG_DATE $LINK_PTR+ fi fi # Define text colors
On Fri, 8 Sep 2023 18:17:21 -0400
Steven Rostedt [off-list ref] wrote:
quoted
From: Steven Rostedt (Google) <rostedt@goodmis.org>
When I'm debugging something with the ftrace selftests and need to look at
the logs, it becomes tedious that I need to do the following:
ls -ltr logs
[ copy the last directory ]
ls logs/<paste-last-dir>
to see where the logs are.
Instead, do the common practice of having a "latest" softlink to the last
run selftest. This way after running the selftest I only need to do:
ls logs/latest/
and it will always give me the directory of the last run selftest logs!
Nice! I like this and this looks good to me.
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Thank you!
Should this go via Shuah's tree?
Looks like it is a self contained patch. I will take it.
thanks,
-- Shuah
On Fri, 8 Sep 2023 18:17:21 -0400
Steven Rostedt [off-list ref] wrote:
quoted
From: Steven Rostedt (Google) <rostedt@goodmis.org>
When I'm debugging something with the ftrace selftests and need to look at
the logs, it becomes tedious that I need to do the following:
ls -ltr logs
[ copy the last directory ]
ls logs/<paste-last-dir>
to see where the logs are.
Instead, do the common practice of having a "latest" softlink to the last
run selftest. This way after running the selftest I only need to do:
ls logs/latest/
and it will always give me the directory of the last run selftest logs!
Nice! I like this and this looks good to me.
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Thank you!