<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/ktest/sample.conf, branch v5.4.239</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.4.239</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.4.239'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-03-11T15:44:05+00:00</updated>
<entry>
<title>ktest.pl: Add RUN_TIMEOUT option with default unlimited</title>
<updated>2023-03-11T15:44:05+00:00</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2023-01-18T21:37:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=18d347d1b08e389e0e598afc825bb3342e181253'/>
<id>urn:sha1:18d347d1b08e389e0e598afc825bb3342e181253</id>
<content type='text'>
commit 4e7d2a8f0b52abf23b1dc13b3d88bc0923383cd5 upstream.

There is a disconnect between the run_command function and the
wait_for_input. The wait_for_input has a default timeout of 2 minutes. But
if that happens, the run_command loop will exit out to the waitpid() of
the executing command. This fails in that it no longer monitors the
command, and also, the ssh to the test box can hang when its finished, as
it's waiting for the pipe it's writing to to flush, but the loop that
reads that pipe has already exited, leaving the command stuck, and the
test hangs.

Instead, make the default "wait_for_input" of the run_command infinite,
and allow the user to override it if they want with a default timeout
option "RUN_TIMEOUT".

But this fixes the hang that happens when the pipe is full and the ssh
session never exits.

Cc: stable@vger.kernel.org
Fixes: 6e98d1b4415fe ("ktest: Add timeout to ssh command")
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ktest: update sample.conf for grub2bls</title>
<updated>2019-05-10T18:54:52+00:00</updated>
<author>
<name>Masayoshi Mizuma</name>
<email>m.mizuma@jp.fujitsu.com</email>
</author>
<published>2019-05-09T21:36:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d20f6b41b7c2715b3d900f2da02029dbc14cd60a'/>
<id>urn:sha1:d20f6b41b7c2715b3d900f2da02029dbc14cd60a</id>
<content type='text'>
Update sample.conf for grub2bls

Link: http://lkml.kernel.org/r/20190509213647.6276-7-msys.mizuma@gmail.com

Signed-off-by: Masayoshi Mizuma &lt;m.mizuma@jp.fujitsu.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ktest: introduce REBOOT_RETURN_CODE to confirm the result of REBOOT</title>
<updated>2019-04-18T15:25:13+00:00</updated>
<author>
<name>Masayoshi Mizuma</name>
<email>m.mizuma@jp.fujitsu.com</email>
</author>
<published>2019-04-18T13:59:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=37e1677330bdc2e96e70f18701e589876f054c67'/>
<id>urn:sha1:37e1677330bdc2e96e70f18701e589876f054c67</id>
<content type='text'>
Unexpected power cycle occurs while the installation of the
kernel.

   ssh root@Test sync ... [0 seconds] SUCCESS
   ssh root@Test reboot ... [1 second] FAILED!
   virsh destroy Test; sleep 5; virsh start Test ... [6 seconds] SUCCESS

That is because REBOOT, the default is "ssh $SSH_USER@$MACHINE
reboot", exits as 255 even if the reboot is successfully done,
like as:

   ]# ssh root@Test reboot
   Connection to Test closed by remote host.
   ]# echo $?
   255
   ]#

To avoid the unexpected power cycle, introduce a new parameter,
REBOOT_RETURN_CODE to judge whether REBOOT is successfully done
or not.

Link: http://lkml.kernel.org/r/20190418135943.12640-1-msys.mizuma@gmail.com

Signed-off-by: Masayoshi Mizuma &lt;m.mizuma@jp.fujitsu.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ktest.pl: Add MAIL_COMMAND option to define how to send email</title>
<updated>2018-04-08T00:21:06+00:00</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2018-04-08T00:11:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c2d84ddb338c829e3ee9d1af6a55325998fcdb82'/>
<id>urn:sha1:c2d84ddb338c829e3ee9d1af6a55325998fcdb82</id>
<content type='text'>
Allow the user to override the default way to send email. This will allow
the user to add their own mailer and format for sending email.

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ktest.pl: Add MAIL_PATH option to define where to find the mailer</title>
<updated>2018-04-08T00:16:08+00:00</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2018-04-06T20:38:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=be1546b87f3b60f107b8f8dfef0e268cc12792f1'/>
<id>urn:sha1:be1546b87f3b60f107b8f8dfef0e268cc12792f1</id>
<content type='text'>
The option MAIL_PATH lets the user decide how to find the mailer they are
using. For example, sendmail is usually located in /usr/sbin but is not
always in the path of non admin users. Have ktest look through the user's
PATH environment variable (adding /usr/sbin) as well, but if that's not good
enough, allow the user to define where to find the mailer.

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;

squash to mail exec

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>Ktest: add email options to sample.config</title>
<updated>2018-04-06T18:30:18+00:00</updated>
<author>
<name>Tim Tianyang Chen</name>
<email>tianyang.chen@oracle.com</email>
</author>
<published>2018-03-26T20:08:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eaaa1e283ada2e8808f9074829c27857adb35bdb'/>
<id>urn:sha1:eaaa1e283ada2e8808f9074829c27857adb35bdb</id>
<content type='text'>
A block of email options is added under the optional config section.

Link: http://lkml.kernel.org/r/1522094884-22718-5-git-send-email-tianyang.chen@oracle.com

Suggested-by: Dhaval Giani &lt;dhaval.giani@oracle.com&gt;
Signed-off-by: Tim Tianyang Chen &lt;tianyang.chen@oracle.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ktest.pl: Make finding config-bisect.pl dynamic</title>
<updated>2018-04-06T18:08:11+00:00</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2018-04-05T16:14:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=40667fb5fda0483e5c617d133968b17f6854cb9b'/>
<id>urn:sha1:40667fb5fda0483e5c617d133968b17f6854cb9b</id>
<content type='text'>
Just looking for config-bisect.pl in the source tree can be risky,
especially, if the source tree being tested doesn't have config-bisect.pl in
place. Instead, allow the user to set where to find config-bisect.pl with a
new option CONFIG_BISECT_EXEC.

If this option is not set, by default, ktest.pl will look for
config-bisect.pl in the following locations:

 `pwd`/config-bisect.pl # where ktest.pl was called from
 `dirname /path/to/ktest.pl`/config-bisect.pl # where ktest.pl exists
 ${BUILD_DIR}/tools/testing/ktest/config-bisect.pl
   # where config-bisect.pl exists in the source tree.

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ktest: Comment about other names than just ktest.conf</title>
<updated>2018-03-21T16:08:02+00:00</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2018-03-21T16:08:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6dd3791dcf3051f47898a59553aaf21cd2cf8d1d'/>
<id>urn:sha1:6dd3791dcf3051f47898a59553aaf21cd2cf8d1d</id>
<content type='text'>
ktest.pl will read any file as long as its name is specified as the first
argument on the command line. Comment this fact in sample.conf.

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ktest: Clarify config file usage</title>
<updated>2018-03-21T16:06:25+00:00</updated>
<author>
<name>Scott Wood</name>
<email>swood@redhat.com</email>
</author>
<published>2017-07-17T00:16:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=edbd0ede0078bde5eb539e175cd7e0e89cd82df0'/>
<id>urn:sha1:edbd0ede0078bde5eb539e175cd7e0e89cd82df0</id>
<content type='text'>
Simply telling a new user to edit "the config file" without giving any
hints on where that file should go, what it should be named, or where
a template can be found, is not particularly helpful.

Link: http://lkml.kernel.org/r/20170717001630.10518-1-swood@redhat.com

Signed-off-by: Scott Wood &lt;swood@redhat.com&gt;
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ktest: Add CONNECT_TIMEOUT to change the connection timeout time</title>
<updated>2018-03-21T14:36:08+00:00</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2018-03-21T14:36:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3e1d3678844b2b1f4c41818bc9a2885cbf5ccef6'/>
<id>urn:sha1:3e1d3678844b2b1f4c41818bc9a2885cbf5ccef6</id>
<content type='text'>
Before ktest issues a reboot, it will try to connect to the target machine
to make sure that it is still alive. If the target does not respond within 5
seconds, it will power cycle the box instead of issuing a reboot.

Five seconds may be too short, and ktest may unnecessarially power cycle the
box. I have found 25 seconds seems to be a better timeout for this purpose.
But even 25 may be too arbitrary. Add a CONNECT_TIMEOUT option to let the
user determine the timeout time before rebooting. By default, it has been
raised to 25 seconds.

Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
