From 37e1677330bdc2e96e70f18701e589876f054c67 Mon Sep 17 00:00:00 2001 From: Masayoshi Mizuma Date: Thu, 18 Apr 2019 09:59:43 -0400 Subject: ktest: introduce REBOOT_RETURN_CODE to confirm the result of REBOOT 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 Signed-off-by: Steven Rostedt (VMware) --- tools/testing/ktest/sample.conf | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/testing/ktest/sample.conf') diff --git a/tools/testing/ktest/sample.conf b/tools/testing/ktest/sample.conf index 6ca6ca0ce695..8c893a58b68e 100644 --- a/tools/testing/ktest/sample.conf +++ b/tools/testing/ktest/sample.conf @@ -887,6 +887,10 @@ # The variables SSH_USER and MACHINE are defined. #REBOOT = ssh $SSH_USER@$MACHINE reboot +# The return code of REBOOT +# (default 255) +#REBOOT_RETURN_CODE = 255 + # The way triple faults are detected is by testing the kernel # banner. If the kernel banner for the kernel we are testing is # found, and then later a kernel banner for another kernel version -- cgit v1.2.3-59-g8ed1b