<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/tools/testing/ktest, branch v4.11-rc3</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge tag 'ktest-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest</title>
<updated>2017-03-08T19:06:05+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-03-08T19:06:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8557b8e43a1de99b12b0d61384742e0d5d0adf84'/>
<id>8557b8e43a1de99b12b0d61384742e0d5d0adf84</id>
<content type='text'>
Pull ktest fixes from Steven Rostedt:
 "Greg Kroah-Hartman reported to me that the ktest of v4.11-rc1 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 function 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"

* tag 'ktest-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
  ktest: Make sure wait_for_input does honor the timeout
  ktest: Fix while loop in wait_for_input
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull ktest fixes from Steven Rostedt:
 "Greg Kroah-Hartman reported to me that the ktest of v4.11-rc1 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 function 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"

* tag 'ktest-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
  ktest: Make sure wait_for_input does honor the timeout
  ktest: Fix while loop in wait_for_input
</pre>
</div>
</content>
</entry>
<entry>
<title>ktest: Make sure wait_for_input does honor the timeout</title>
<updated>2017-03-08T15:41:37+00:00</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2017-03-08T15:36:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f7c6401ff84ab8ffffc281a29aa0a787f7eb346e'/>
<id>f7c6401ff84ab8ffffc281a29aa0a787f7eb346e</id>
<content type='text'>
The function wait_for_input takes in a timeout, and even has a default
timeout. But if for some reason the STDIN descriptor keeps sending in data,
the function will never time out. The timout is to wait for the data from
the passed in file descriptor, not for STDIN. Adding a test in the case
where there's no data from the passed in file descriptor that checks to see
if the timeout passed, will ensure that it will timeout properly even if
there's input in STDIN.

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function wait_for_input takes in a timeout, and even has a default
timeout. But if for some reason the STDIN descriptor keeps sending in data,
the function will never time out. The timout is to wait for the data from
the passed in file descriptor, not for STDIN. Adding a test in the case
where there's no data from the passed in file descriptor that checks to see
if the timeout passed, will ensure that it will timeout properly even if
there's input in STDIN.

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ktest: Fix while loop in wait_for_input</title>
<updated>2017-03-08T15:16:17+00:00</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2017-03-08T15:16:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=99c014a87979c9244806685f3c3fc7767f79f645'/>
<id>99c014a87979c9244806685f3c3fc7767f79f645</id>
<content type='text'>
The run_command function was changed to use the wait_for_input function to
allow having a timeout if the command to run takes too much time. There was
a bug in the wait_for_input where it could end up going into an infinite
loop. There's two issues here. One is that the return value of the sysread
wasn't used for the write (to write a proper size), and that it should
continue processing the passed in file descriptor too even if there was
input. There was no check for error, if for some reason STDIN returned an
error, the function would go into an infinite loop and never exit.

Reported-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Tested-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Fixes: 6e98d1b4415f ("ktest: Add timeout to ssh command")
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The run_command function was changed to use the wait_for_input function to
allow having a timeout if the command to run takes too much time. There was
a bug in the wait_for_input where it could end up going into an infinite
loop. There's two issues here. One is that the return value of the sysread
wasn't used for the write (to write a proper size), and that it should
continue processing the passed in file descriptor too even if there was
input. There was no check for error, if for some reason STDIN returned an
error, the function would go into an infinite loop and never exit.

Reported-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Tested-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Fixes: 6e98d1b4415f ("ktest: Add timeout to ssh command")
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'ktest-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest</title>
<updated>2017-02-28T07:07:59+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-02-28T07:07:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1ac884f173d4842216f6a24c03c9833e3ce6e982'/>
<id>1ac884f173d4842216f6a24c03c9833e3ce6e982</id>
<content type='text'>
Pull ktest updates from Steven Rostedt:
 "These are various fixes that I have made and never got around to
  pushing. I've been asked to get the upstream repo back up-to-date"

* tag 'ktest-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
  ktest: Add variable run_command_status to save status of commands executed
  ktest.pl: Powercycle the box on reboot if no connection can be made
  ktest: Add timeout to ssh command
  ktest: Fix child exit code processing
  ktest: Have POST_TEST run after the test has totally completed
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull ktest updates from Steven Rostedt:
 "These are various fixes that I have made and never got around to
  pushing. I've been asked to get the upstream repo back up-to-date"

* tag 'ktest-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
  ktest: Add variable run_command_status to save status of commands executed
  ktest.pl: Powercycle the box on reboot if no connection can be made
  ktest: Add timeout to ssh command
  ktest: Fix child exit code processing
  ktest: Have POST_TEST run after the test has totally completed
</pre>
</div>
</content>
</entry>
<entry>
<title>ktest: Add variable run_command_status to save status of commands executed</title>
<updated>2017-02-07T19:50:03+00:00</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2017-02-07T19:50:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5739438b725c09938bb6af9e4477c4283b8326cf'/>
<id>5739438b725c09938bb6af9e4477c4283b8326cf</id>
<content type='text'>
Create a variable called run_command_status that saves the status of the
executed commands and can be used by other functions later to test for
status.

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Create a variable called run_command_status that saves the status of the
executed commands and can be used by other functions later to test for
status.

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ktest.pl: Powercycle the box on reboot if no connection can be made</title>
<updated>2017-02-07T17:23:38+00:00</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2017-02-07T17:13:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6474ace999edd714151c04c0b0534b89c2e9b6d8'/>
<id>6474ace999edd714151c04c0b0534b89c2e9b6d8</id>
<content type='text'>
When performing a reboot of the test box, try to ssh to it. If it can't
connect for 5 seconds, then powercycle the box. This is useful because the
reboot is done via ssh, and if you can't ssh to the box because it is hung,
the reboot fails to reboot.

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When performing a reboot of the test box, try to ssh to it. If it can't
connect for 5 seconds, then powercycle the box. This is useful because the
reboot is done via ssh, and if you can't ssh to the box because it is hung,
the reboot fails to reboot.

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ktest: Add timeout to ssh command</title>
<updated>2017-02-07T17:23:38+00:00</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2017-02-07T17:22:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6e98d1b4415fe681ceb245e1374ed5e1942a332b'/>
<id>6e98d1b4415fe681ceb245e1374ed5e1942a332b</id>
<content type='text'>
Add a timeout to performing an ssh command. This will let testing if a
machine is alive or not, or if something else may be amiss. A timeout can be
passed to ssh, where ssh will fail if it does not complete within the given
timeout.

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a timeout to performing an ssh command. This will let testing if a
machine is alive or not, or if something else may be amiss. A timeout can be
passed to ssh, where ssh will fail if it does not complete within the given
timeout.

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ktest: Fix child exit code processing</title>
<updated>2017-02-07T17:05:25+00:00</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2017-02-07T17:05:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=32677207dcc5e594254b7fb4fb2352b1755b1d5b'/>
<id>32677207dcc5e594254b7fb4fb2352b1755b1d5b</id>
<content type='text'>
The child_exit errno needs to be shifted by 8 bits to compare against the
return values for the bisect variables.

Fixes: c5dacb88f0a64 ("ktest: Allow overriding bisect test results")
Cc: stable@vger.kernel.org
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The child_exit errno needs to be shifted by 8 bits to compare against the
return values for the bisect variables.

Fixes: c5dacb88f0a64 ("ktest: Allow overriding bisect test results")
Cc: stable@vger.kernel.org
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ktest: Have POST_TEST run after the test has totally completed</title>
<updated>2017-02-07T16:49:21+00:00</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2017-02-07T16:49:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2e07c9f55ecabdf78746b9808fec6ab549a07f8a'/>
<id>2e07c9f55ecabdf78746b9808fec6ab549a07f8a</id>
<content type='text'>
The POST_TEST config is to be executed after a test has fully compeleted,
whether the test passed or failed. It currently is executed at the moment
that the test has been decided if it failed or not. As the test does other
clean ups, it isn't truly finished. Move the POST_TEST execution to after
all the test cleanups have been done.

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The POST_TEST config is to be executed after a test has fully compeleted,
whether the test passed or failed. It currently is executed at the moment
that the test has been decided if it failed or not. As the test does other
clean ups, it isn't truly finished. Move the POST_TEST execution to after
all the test cleanups have been done.

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ktest.pl: fix english</title>
<updated>2016-12-15T00:04:08+00:00</updated>
<author>
<name>Pavel Machek</name>
<email>pavel@ucw.cz</email>
</author>
<published>2016-12-14T23:06:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=22722799de869912fb541c2c85b51cec4226c614'/>
<id>22722799de869912fb541c2c85b51cec4226c614</id>
<content type='text'>
Ajdust spelling to more common "mandatory".  Variant "mandidory" is
certainly wrong.

Link: http://lkml.kernel.org/r/20161011073003.GA19476@amd
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ajdust spelling to more common "mandatory".  Variant "mandidory" is
certainly wrong.

Link: http://lkml.kernel.org/r/20161011073003.GA19476@amd
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
