Linux RCU subsystem development
 help / color / mirror / Atom feed
From: zhouzhouyi@gmail.com
To: john.ogness@linutronix.de, pmladek@suse.com, paulmck@kernel.org,
	dave@stgolabs.net, josh@joshtriplett.org,
	linux-kernel@vger.kernel.org, rcu@vger.kernel.org
Cc: Zhouyi Zhou <zhouzhouyi@gmail.com>
Subject: [PATCH linux-next] RFC: torture: add pr_flush to flush the results to console
Date: Wed, 15 Jun 2022 08:37:33 +0800	[thread overview]
Message-ID: <20220615003733.16447-1-zhouzhouyi@gmail.com> (raw)

From: Zhouyi Zhou <zhouzhouyi@gmail.com>

currently tools/testing/selftests/rcutorture/bin/torture.sh reports
false positve because of kthread printing.

Commit "printk: add functions to prefer direct printing" (2bb2b7b57f812)
have added functions to prefer direct printing activated for the primary
import messages.

Meanwhile adding printk_prefer_direct_enter/exit to
torture_cleanup_begin/end still can't eliminate the false positives
for a hundred percent.

This patch add pr_flush to torture_cleanup_end because the latter
is sleepable.

Reported-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
Tested-by: Zhouyi Zhou <zhouzhouyi@gmail.com> 
---
 kernel/torture.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/torture.c b/kernel/torture.c
index 789aeb0e1159..b51e42463a67 100644
--- a/kernel/torture.c
+++ b/kernel/torture.c
@@ -878,6 +878,7 @@ void torture_cleanup_end(void)
 	mutex_lock(&fullstop_mutex);
 	torture_type = NULL;
 	mutex_unlock(&fullstop_mutex);
+	pr_flush(1000, true);
 }
 EXPORT_SYMBOL_GPL(torture_cleanup_end);
 
-- 
2.25.1


             reply	other threads:[~2022-06-15  0:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-15  0:37 zhouzhouyi [this message]
2022-06-15  5:15 ` [PATCH linux-next] RFC: torture: add pr_flush to flush the results to console Paul E. McKenney
2022-06-15 12:36   ` Zhouyi Zhou
2022-06-15 13:52     ` Paul E. McKenney
2022-06-15 19:09       ` Paul E. McKenney
2022-06-15 20:28         ` Zhouyi Zhou
2022-06-21  0:22           ` Zhouyi Zhou
2022-06-21  4:39             ` Paul E. McKenney
2022-06-21 13:15               ` Zhouyi Zhou

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=20220615003733.16447-1-zhouzhouyi@gmail.com \
    --to=zhouzhouyi@gmail.com \
    --cc=dave@stgolabs.net \
    --cc=john.ogness@linutronix.de \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=pmladek@suse.com \
    --cc=rcu@vger.kernel.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