Skip to content

tests: retry KEX failures when using the WinCNG backend - #1023

Closed
vszakats wants to merge 7 commits into
libssh2:masterfrom
vszakats:wincng-kex-retry
Closed

vszakats wants to merge 7 commits into
libssh2:masterfrom
vszakats:wincng-kex-retry

Conversation

@vszakats

@vszakats vszakats commented May 3, 2023 •

Copy link
Copy Markdown
Member

Twice. This tests are flaky and we haven't figured out why. In the
meantime use this workaround to test and log these issues, but also
ensure that CI run aren't flagged red because of it.

Also:

  • kex: add debug message when hostkey sig_verify fails,
    to help tracking WinCNG KEX failures.
  • test_ssh2: also add retry logic.
    I'm not quite sure this is correct. Please let me know.
  • session_fixture: bump up src_path slots to fit retries and show
    message when hitting the limit.
  • session_fixture: clear kbd_password static variable after use.
  • session_fixture: close and deinit socket after use.
  • session_fixture: deinit libssh2 after use.

Ref: #804 #846 #979 #1012 #1015

Cherry-picked from #1017
Closes #1023

@vszakats vszakats added the tests label May 3, 2023
@vszakats
vszakats force-pushed the wincng-kex-retry branch from 919dd5f to 7cffc4f Compare May 3, 2023 11:27
@vszakats vszakats closed this in bc120a3 May 3, 2023
@vszakats
vszakats deleted the wincng-kex-retry branch May 3, 2023 12:32
agreppin pushed a commit to agreppin/libssh2 that referenced this pull request Jul 14, 2024
Twice. This tests are flaky and we haven't figured out why. In the
meantime use this workaround to test and log these issues, but also
ensure that CI run aren't flagged red because of it.

Also:
- kex: add debug message when hostkey `sig_verify` fails,
  to help tracking WinCNG KEX failures.
- test_ssh2: also add retry logic.
  I'm not quite sure this is correct. Please let me know.
- session_fixture: bump up `src_path` slots to fit retries and show
  message when hitting the limit.
- session_fixture: clear `kbd_password` static variable after use.
- session_fixture: close and deinit socket after use.
- session_fixture: deinit libssh2 after use.

Ref: libssh2#804 libssh2#846 libssh2#979 libssh2#1012 libssh2#1015

Cherry-picked from libssh2#1017
Closes libssh2#1023
vszakats added a commit to vszakats/libssh2 that referenced this pull request Sep 11, 2026
Should no longer be necessary after fixing the root cause.
(Though we do not run these tests in CI at the moment.)

Ref: libssh2#804
Follow-up to f216bbe libssh2#2583
Follow-up to bc120a3 libssh2#1023
vszakats added a commit that referenced this pull request Sep 11, 2026
Should no longer be necessary after fixing the root cause.
(Though we do not run these tests in CI at the moment.)

Ref: #804
Follow-up to f216bbe #2583
Follow-up to bc120a3 #1023

Closes #2603
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant