mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	"John Warthog9 Hawley" <warthog9@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [GIT PULL][PATCH 0/2] ktest: Fixes for 4.11
Date: Wed, 08 Mar 2017 10:55:21 -0500	[thread overview]
Message-ID: <20170308155521.516183603@goodmis.org> (raw)


Linus,

Greg Kroah-Hartman reported to me that the ktest of v4.10 locked up in an
infinite loop while doing the make mrproper. Looking into the cause I noticed
that a recent update to the function run_command (used for running all
shell commands, including "make mrproper") changed the internal loop to
use the function wait_for_input. The wait_for_input uses select to look
at two file descriptors. One is the file descriptor of the command it is
running, the other is STDIN. The STDIN check was not checking the return
status of the sysread call, and was also just writing a lot of data into
syswrite without regard to the size of the data read.

Changing the code to check the return status of sysread, and also to still
process the passed in descriptor data without looping back to the select
fixed Greg's problem.

While looking at this code I also realized that the loop did not honor
the timeout if STDIN always had input (or for some reason return error).
this could prevent wait_for_input to timeout on the file descriptor it
is suppose to be waiting for. That is fixed too.

Please pull the latest ktest-v4.11-rc1 tree, which can be found at:


  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest.git
ktest-v4.11-rc1

Tag SHA1: 6692cf546881262ada6b98dc7f0ee374922e669b
Head SHA1: f7c6401ff84ab8ffffc281a29aa0a787f7eb346e


Steven Rostedt (VMware) (2):
      ktest: Fix while loop in wait_for_input
      ktest: Make sure wait_for_input does honor the timeout

----
 tools/testing/ktest/ktest.pl | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

             reply	other threads:[~2017-03-08 15:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-08 15:55 Steven Rostedt [this message]
2017-03-08 15:55 ` [GIT PULL][PATCH 1/2] ktest: Fix while loop in wait_for_input Steven Rostedt
2017-03-08 15:55 ` [GIT PULL][PATCH 2/2] ktest: Make sure wait_for_input does honor the timeout Steven Rostedt
2017-03-08 16:11 ` [GIT PULL][PATCH 0/2] ktest: Fixes for 4.11 Steven Rostedt

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=20170308155521.516183603@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=warthog9@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

all inboxes | Powered by JetHome®