diff options
author | Jakub Jelen <jakuje@gmail.com> | 2018-12-10 20:08:49 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-12-10 20:28:01 +0100 |
commit | c9bdb9a01ed47698926899d9102ca758a1f4a0f5 (patch) | |
tree | 7fd20e821c84e7976c6177e1674e0cae78f170a6 | |
parent | 973da84a470f3284414737f9df908547f2685576 (diff) | |
download | libssh-c9bdb9a01ed47698926899d9102ca758a1f4a0f5.tar.gz libssh-c9bdb9a01ed47698926899d9102ca758a1f4a0f5.tar.xz libssh-c9bdb9a01ed47698926899d9102ca758a1f4a0f5.zip |
tests: Do not segfault when built without ZLIB
Signed-off-by: Jakub Jelen <jakuje@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r-- | tests/unittests/torture_config.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unittests/torture_config.c b/tests/unittests/torture_config.c index c22ae3e0..93a90137 100644 --- a/tests/unittests/torture_config.c +++ b/tests/unittests/torture_config.c @@ -279,10 +279,15 @@ static void torture_config_new(void **state) assert_string_equal(session->opts.global_knownhosts, GLOBAL_KNOWN_HOSTS); assert_int_equal(session->opts.timeout, 30); assert_string_equal(session->opts.bindaddr, BIND_ADDRESS); +#ifdef WITH_ZLIB assert_string_equal(session->opts.wanted_methods[SSH_COMP_C_S], "zlib@openssh.com,zlib"); assert_string_equal(session->opts.wanted_methods[SSH_COMP_S_C], "zlib@openssh.com,zlib"); +#else + assert_null(session->opts.wanted_methods[SSH_COMP_C_S]); + assert_null(session->opts.wanted_methods[SSH_COMP_S_C]); +#endif /* WITH_ZLIB */ assert_int_equal(session->opts.StrictHostKeyChecking, 0); assert_int_equal(session->opts.gss_delegate_creds, 1); assert_string_equal(session->opts.gss_server_identity, "example.com"); |