mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-01-06 14:21:55 +03:00
tests: Test calling ssh_init() after ssh_finalize()
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
41b0d263d6
commit
c413834764
@@ -16,10 +16,27 @@ static void torture_ssh_init(void **state) {
|
||||
assert_int_equal(rc, SSH_OK);
|
||||
}
|
||||
|
||||
static void torture_ssh_init_after_finalize(void **state) {
|
||||
|
||||
int rc;
|
||||
|
||||
(void) state;
|
||||
|
||||
rc = ssh_init();
|
||||
assert_int_equal(rc, SSH_OK);
|
||||
rc = ssh_finalize();
|
||||
assert_int_equal(rc, SSH_OK);
|
||||
rc = ssh_init();
|
||||
assert_int_equal(rc, SSH_OK);
|
||||
rc = ssh_finalize();
|
||||
assert_int_equal(rc, SSH_OK);
|
||||
}
|
||||
|
||||
int torture_run_tests(void) {
|
||||
int rc;
|
||||
struct CMUnitTest tests[] = {
|
||||
cmocka_unit_test(torture_ssh_init),
|
||||
cmocka_unit_test(torture_ssh_init_after_finalize),
|
||||
};
|
||||
|
||||
torture_filter_tests(tests);
|
||||
|
||||
Reference in New Issue
Block a user