Skip to content

tests: merge sshd_fixture.sh into test_sshd.test - #1024

Closed
vszakats wants to merge 5 commits into
libssh2:masterfrom
vszakats:sshd-fixture-merge
Closed

vszakats wants to merge 5 commits into
libssh2:masterfrom
vszakats:sshd-fixture-merge

Conversation

@vszakats

@vszakats vszakats commented May 3, 2023 •

Copy link
Copy Markdown
Member

Merge the loop executing multiple tests and the script that actually
launches the tests into a single script. This same script is now called
from both autotools and CMake. autotools loads the list of tests from
Makefile.inc, CMake passes it via the command-line. It's also possible
to call the script manually with a custom list of tests or individual
ones.

With this setup we're now launching a single sshd session for all tests,
instead of launching and killing it for each test. This did not improve
reliability of these test on CI machines, and it's easy to go back to
the previous behaviour if necessary.

Also:

  • allow passing custom sshd options via SSHD_FLAGS.

  • add SSHD_TESTS_LIMIT_TO to limit the number of tests to its value.
    E.g. SSHD_TESTS_LIMIT_TO=1 executes the first test only. Meant for
    debugging.

  • use ssh to test the connection (if available) instead of fixed
    amount of wait. Made to also work on Windows.

  • set PermitRootLogin yes in sshd, to allow running tests as root.

  • show sshd path and version.

Cherry-picked from #1017 (the last one)
Closes #1024

vszakats added 5 commits May 3, 2023 18:06
Merge the loop executing multiple tests and the script that actually
launches the tests into a single script. This same script is now called
from both autotools and CMake. autotools loads the list of tests from
`Makefile.inc`, CMake passes it via the command-line. It's also possible
to call the script manually with a custom list of tests or individual
ones.

With this setup we're now launching a single sshd session for all tests,
instead of launching and killing it for each test. This did not improve
reliability of these test on CI machines, and it's easy to go back to
the previous behaviour if necessary.

Also:
- allow passing custom sshd options via `SSHD_FLAGS`.
- add `SSHD_TESTS_LIMIT_TO` to limit the number of tests to its value.
  e.g. `SSHD_TESTS_LIMIT_TO=1` executes the first test only. Meant for
  debugging.
[...]

Cherry-picked from libssh2#1017
To allow running tests as root.
@vszakats vszakats added the tests label May 3, 2023
@vszakats vszakats closed this in d4690e9 May 3, 2023
@vszakats
vszakats deleted the sshd-fixture-merge branch May 3, 2023 19:17
agreppin pushed a commit to agreppin/libssh2 that referenced this pull request Jul 14, 2024
Merge the loop executing multiple tests and the script that actually
launches the tests into a single script. This same script is now called
from both autotools and CMake. autotools loads the list of tests from
`Makefile.inc`, CMake passes it via the command-line. It's also possible
to call the script manually with a custom list of tests or individual
ones.

With this setup we're now launching a single sshd session for all tests,
instead of launching and killing it for each test. This did not improve
reliability of these test on CI machines, and it's easy to go back to
the previous behaviour if necessary.

Also:

- allow passing custom sshd options via `SSHD_FLAGS`.

- add `SSHD_TESTS_LIMIT_TO` to limit the number of tests to its value.
  E.g. `SSHD_TESTS_LIMIT_TO=1` executes the first test only. Meant for
  debugging.

- use `ssh` to test the connection (if available) instead of fixed
  amount of wait. Made to also work on Windows.

- set `PermitRootLogin yes` in `sshd`, to allow running tests as root.

- show `sshd` path and version.

Cherry-picked from libssh2#1017 (the last one)
Closes libssh2#1024
vszakats added a commit that referenced this pull request Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant