Re: [PATCH v2] ktest: introduce REBOOT_RETURN_CODE to confirm the result of REBOOT

From: Steven Rostedt
Date: Thu Apr 18 2019 - 11:26:16 EST


On Thu, 18 Apr 2019 09:59:43 -0400
Masayoshi Mizuma <msys.mizuma@xxxxxxxxx> wrote:

> From: Masayoshi Mizuma <m.mizuma@xxxxxxxxxxxxxx>
>
> 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.
>

Thanks for sending the patch. I added it to my local queue, and will
use it for testing of my changes to the Linux kernel, and it will
eventually be merged upstream.

-- Steve