diff options
author | luca fancellu <luca.fancellu@arm.com> | 2023-11-09 14:36:31 +0000 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2023-11-24 05:01:37 -1000 |
commit | 20a4de703c2e584e322175674c8cc6dcfa3a0735 (patch) | |
tree | c31a4d44b3d2b93eebaf08446ff9fd454fb51d4d /meta/lib/patchtest/patch.py | |
parent | 2dec4dcecf07aa0f950fb0659bc9929ada2f0b24 (diff) | |
download | poky-20a4de703c2e584e322175674c8cc6dcfa3a0735.tar.gz |
oeqa/ssh: Handle SSHCall timeout error code
The current code in ssh.py is terminating the ssh process that
does not finish its computation in a given timeout (when timeout
is passed), the SSHCall function is returning the process error
code.
The Openssl ssh before version 8.6_p1 is returning 0 when it is
terminated, from commit 8a9520836e71830f4fccca066dba73fea3d16bda
onwards (version >= 8.6_p1) ssh is returning 255 instead.
So for version of ssh older than 8.6_p1 when the SSHCall time out,
the return code will be 0, meaning success, which is wrong.
Fix this issue checking if the process has timeout (hence it's been
terminated) and checking if the returned code is 0, in that case
set it to 255 to advertise that an error occurred.
Add a test case excercising the timeout in the SSHTest, test_ssh
test function.
(From OE-Core rev: 82215c855ee39b4e39f24113241a7fb3f20f9531)
Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 948fecca1db4c7a30fcca5fcf5eef95cd12efb00)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/lib/patchtest/patch.py')
0 files changed, 0 insertions, 0 deletions