Skip to content

Commit

Permalink
Patch helps to overcome login issue.
Browse files Browse the repository at this point in the history
Sometimes the console via ssh is not connected and Login attempt fails,
This could be due to network issue.Attempting to login for 5 times if
the connection is not established in one go.

Signed-off-by: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
  • Loading branch information
abdhaleegit committed Jan 23, 2024
1 parent 9da58c2 commit c17b2d0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions testcases/InstallUpstreamKernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,11 @@ def is_url(path):
self.prompt = self.cv_SYSTEM.util.build_prompt()
self.console_thread.console_terminate()
con.close()
time.sleep(10)
raw_pty = self.cv_SYSTEM.console.get_console()
for i in range(5):
raw_pty = self.cv_SYSTEM.console.get_console()
time.sleep(10)
if raw_pty.sendline("uname -r")!=0:
break
raw_pty.sendline("reboot")
raw_pty.expect("login:", timeout=600)
raw_pty.close()
Expand Down

0 comments on commit c17b2d0

Please sign in to comment.