All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selftests/ftrace: Avoid unlink error on first run
@ 2026-10-14 11:48 Jaewon Jung
  2026-10-14 14:21 ` Masami Hiramatsu
  0 siblings, 1 reply; 3+ messages in thread
From: Jaewon Jung @ 2026-10-14 11:48 UTC (permalink / raw)
  To: Mathieu Desnoyers, Steven Rostedt (Google), Shuah Khan,
	Masami Hiramatsu (Google)
  Cc: linux-kernel, linux-trace-kernel, linux-kselftest

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 <jaewon8868@gmail.com>
---
 tools/testing/selftests/ftrace/ftracetest | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest
index 246d7e1d015c..95804610e079 100755
--- a/tools/testing/selftests/ftrace/ftracetest
+++ b/tools/testing/selftests/ftrace/ftracetest
@@ -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
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-14 15:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-14 11:48 [PATCH] selftests/ftrace: Avoid unlink error on first run Jaewon Jung
2026-10-14 14:21 ` Masami Hiramatsu
2026-10-14 15:47   ` Shuah Khan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.