diff options
author | Jakub Jelen <jjelen@redhat.com> | 2019-03-25 16:41:11 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-04-29 13:18:09 +0200 |
commit | bb7920efbc8f9aa307756d9790c6a7dfa41c611b (patch) | |
tree | 09d9f5d8761541bbca6797d155c78f2a8ec2a3dd /tests/client | |
parent | 3e8bdb122f12f6606476b6a87f5d3e5295343079 (diff) | |
download | libssh-bb7920efbc8f9aa307756d9790c6a7dfa41c611b.tar.gz libssh-bb7920efbc8f9aa307756d9790c6a7dfa41c611b.tar.xz libssh-bb7920efbc8f9aa307756d9790c6a7dfa41c611b.zip |
tests: Avoid reading user configuration when running algorithm tests
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'tests/client')
-rw-r--r-- | tests/client/torture_algorithms.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/client/torture_algorithms.c b/tests/client/torture_algorithms.c index 3902d779..5fa12479 100644 --- a/tests/client/torture_algorithms.c +++ b/tests/client/torture_algorithms.c @@ -49,7 +49,9 @@ static int session_setup(void **state) { struct torture_state *s = *state; int verbosity = torture_libssh_verbosity(); struct passwd *pwd; + bool false_v = false; int rc; + pwd = getpwnam("bob"); assert_non_null(pwd); @@ -61,6 +63,9 @@ static int session_setup(void **state) { ssh_options_set(s->ssh.session, SSH_OPTIONS_LOG_VERBOSITY, &verbosity); ssh_options_set(s->ssh.session, SSH_OPTIONS_HOST, TORTURE_SSH_SERVER); + /* Prevent parsing configuration files that can introduce different + * algorithms then we want to test */ + ssh_options_set(s->ssh.session, SSH_OPTIONS_PROCESS_CONFIG, &false_v); return 0; } |