Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Jaewon Jung <jaewon8868@gmail.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	"Steven Rostedt (Google)" <rostedt@goodmis.org>,
	Shuah Khan <skhan@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH] selftests/ftrace: Avoid unlink error on first run
Date: Wed, 14 Oct 2026 23:21:45 +0900	[thread overview]
Message-ID: <20261014142147.95DB11F000C4@smtp.kernel.org> (raw)
In-Reply-To: <20261014114839.6258-1-jaewon8868@gmail.com>

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>

  reply	other threads:[~2026-10-14 14:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14 11:48 [PATCH] selftests/ftrace: Avoid unlink error on first run Jaewon Jung
2026-10-14 14:21 ` Masami Hiramatsu [this message]
2026-10-14 15:47   ` Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261014142147.95DB11F000C4@smtp.kernel.org \
    --to=mhiramat@kernel.org \
    --cc=jaewon8868@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=rostedt@goodmis.org \
    --cc=skhan@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox