* [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* Re: [PATCH] selftests/ftrace: Avoid unlink error on first run
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
0 siblings, 1 reply; 3+ messages in thread
From: Masami Hiramatsu @ 2026-10-14 14:21 UTC (permalink / raw)
To: Jaewon Jung
Cc: Mathieu Desnoyers, Steven Rostedt (Google), Shuah Khan,
linux-kernel, linux-trace-kernel, linux-kselftest
On Wed, 14 Oct 2026 20:48:25 +0900, Jaewon Jung <jaewon8868@gmail.com> wrote:
> 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>
Looks good to me.
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Shuah, will you pick this?
Thank you,
> ---
> 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
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] selftests/ftrace: Avoid unlink error on first run
2026-10-14 14:21 ` Masami Hiramatsu
@ 2026-10-14 15:47 ` Shuah Khan
0 siblings, 0 replies; 3+ messages in thread
From: Shuah Khan @ 2026-10-14 15:47 UTC (permalink / raw)
To: Masami Hiramatsu (Google), Jaewon Jung
Cc: Mathieu Desnoyers, Steven Rostedt (Google), linux-kernel,
linux-trace-kernel, linux-kselftest, Shuah Khan
On 10/14/26 08:21, Masami Hiramatsu (Google) wrote:
> On Wed, 14 Oct 2026 20:48:25 +0900, Jaewon Jung <jaewon8868@gmail.com> wrote:
>> 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>
>
> Looks good to me.
>
> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
>
> Shuah, will you pick this?
Done.
thanks,
-- Shuah
^ permalink raw reply [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.