selftests/ftrace: Avoid unlink error on first run
PATCH 1/1 selftests/ftrace: Avoid unlink error on first run
On the first run, ftracetest tries to unlink a symlink that does not exist.
Use rm -f to avoid the "No such file or directory" error.
Fixes 7dc1e125f07a ("ftrace/selftests: Add softlink to latest log directory")
Signed-off-by Jaewon Jung <[email protected]>
--- tools/testing/selftests/ftrace/ftracetest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/ftrace/ftracetest +1 -1
@@ -243,7 +243,7 @@ else 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 + rm -f $LINK_PTR ln -fs $LOG_DATE $LINK_PTR fi fi
Signature · 1 line
2.43.0
Quoted 6 lines · Jaewon Jung
On the first run, ftracetest tries to unlink a symlink that does not exist.
Use rm -f to avoid the "No such file or directory" error.Fixes 7dc1e125f07a ("ftrace/selftests: Add softlink to latest log directory")Signed-off-by Jaewon Jung <[email protected]>
Looks good to me.
Shuah, will you pick this?
Thank you,
Quoted 20 lines
--- tools/testing/selftests/ftrace/ftracetest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/ftrace/ftracetest +1
-1@@ -243,7 +243,7 @@ else 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 + rm -f $LINK_PTR ln -fs $LOG_DATE $LINK_PTR fi fiSignature · 1 line
2.43.0
Signature · 1 line
Masami Hiramatsu (Google) <[email protected]>
Shuah Khan
maintainerQuoted 5 lines · Masami Hiramatsu (Google)
Quoted 4 lines · Jaewon Jung
On the first run, ftracetest tries to unlink a symlink that does not exist.
Use rm -f to avoid the "No such file or directory" error.
Quoted 8 lines
Quoted 2 lines
Fixes 7dc1e125f07a ("ftrace/selftests: Add softlink to latest log directory")Signed-off-by Jaewon Jung <[email protected]>Looks good to me.
Shuah, will you pick this?
Done.
thanks,
-- Shuah