linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: LKML <linux-kernel@vger.kernel.org>,
	Linux Trace Kernel <linux-trace-kernel@vger.kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Ali Zahraee <ahzahraee@gmail.com>, Shuah Khan <shuah@kernel.org>,
	Shuah Khan <skhan@linuxfoundation.org>,
	linux-kselftest@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] tracing/selftests: Run the ownership test twice
Date: Fri, 14 Jun 2024 12:41:51 -0400	[thread overview]
Message-ID: <20240614124151.33ee0dc6@rorschach.local.home> (raw)
In-Reply-To: <20240523124541.7dd4cca9@gandalf.local.home>


Shuah,

Can you take this through your tree?

-- Steve


On Thu, 23 May 2024 12:45:41 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
> 
> A regression happened where running the ownership test passes on the first
> iteration but fails running it a second time. This was caught and fixed,
> but a later change brought it back. The regression was missed because the
> automated tests only run the tests once per boot.
> 
> Change the ownership test to iterate through the tests twice, as this will
> catch the regression with a single run.
> 
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
> ---
>  .../ftrace/test.d/00basic/test_ownership.tc   | 34 +++++++++++--------
>  1 file changed, 20 insertions(+), 14 deletions(-)
> 
> diff --git a/tools/testing/selftests/ftrace/test.d/00basic/test_ownership.tc b/tools/testing/selftests/ftrace/test.d/00basic/test_ownership.tc
> index c45094d1e1d2..71e43a92352a 100644
> --- a/tools/testing/selftests/ftrace/test.d/00basic/test_ownership.tc
> +++ b/tools/testing/selftests/ftrace/test.d/00basic/test_ownership.tc
> @@ -83,32 +83,38 @@ run_tests() {
>  	done
>  }
>  
> -mount -o remount,"$new_options" .
> +# Run the tests twice as leftovers can cause issues
> +for loop in 1 2 ; do
>  
> -run_tests
> +	echo "Running iteration $loop"
>  
> -mount -o remount,"$mount_options" .
> +	mount -o remount,"$new_options" .
>  
> -for d in "." "events" "events/sched" "events/sched/sched_switch" "events/sched/sched_switch/enable" $canary; do
> -	test "$d" $original_group
> -done
> +	run_tests
> +
> +	mount -o remount,"$mount_options" .
> +
> +	for d in "." "events" "events/sched" "events/sched/sched_switch" "events/sched/sched_switch/enable" $canary; do
> +		test "$d" $original_group
> +	done
>  
>  # check instances as well
>  
> -chgrp $other_group instances
> +	chgrp $other_group instances
>  
> -instance="$(mktemp -u test-XXXXXX)"
> +	instance="$(mktemp -u test-XXXXXX)"
>  
> -mkdir instances/$instance
> +	mkdir instances/$instance
>  
> -cd instances/$instance
> +	cd instances/$instance
>  
> -run_tests
> +	run_tests
>  
> -cd ../..
> +	cd ../..
>  
> -rmdir instances/$instance
> +	rmdir instances/$instance
>  
> -chgrp $original_group instances
> +	chgrp $original_group instances
> +done
>  
>  exit 0


  parent reply	other threads:[~2024-06-14 16:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-23 16:45 [PATCH] tracing/selftests: Run the ownership test twice Steven Rostedt
2024-05-24  0:47 ` Masami Hiramatsu
2024-06-14 16:41 ` Steven Rostedt [this message]
2024-08-07 20:29   ` Steven Rostedt
2024-08-07 20:49     ` 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=20240614124151.33ee0dc6@rorschach.local.home \
    --to=rostedt@goodmis.org \
    --cc=ahzahraee@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=mhiramat@kernel.org \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).