aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2011-01-02 17:25:51 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2011-01-02 17:25:51 +0100
commit3f538b3ddd237c04ccdf774b6274bdbbdee0e6e7 (patch)
treea9790d83a6ce2cd36dec09b221048c78395e9334 /tests
parent2faaefade94d1ded2d246a90081aca781d6ff56e (diff)
downloadlibssh-3f538b3ddd237c04ccdf774b6274bdbbdee0e6e7.tar.gz
libssh-3f538b3ddd237c04ccdf774b6274bdbbdee0e6e7.tar.xz
libssh-3f538b3ddd237c04ccdf774b6274bdbbdee0e6e7.zip
Call ssh_init()/ssh_finalize bf/af each testcase
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/torture_buffer.c6
-rw-r--r--tests/unittests/torture_callbacks.c6
-rw-r--r--tests/unittests/torture_keyfiles.c7
-rw-r--r--tests/unittests/torture_list.c6
-rw-r--r--tests/unittests/torture_misc.c6
-rw-r--r--tests/unittests/torture_options.c6
6 files changed, 31 insertions, 6 deletions
diff --git a/tests/unittests/torture_buffer.c b/tests/unittests/torture_buffer.c
index cb5fc701..8215cd40 100644
--- a/tests/unittests/torture_buffer.c
+++ b/tests/unittests/torture_buffer.c
@@ -85,11 +85,15 @@ static void torture_buffer_prepend(void **state) {
}
int torture_run_tests(void) {
+ int rc;
const UnitTest tests[] = {
unit_test_setup_teardown(torture_growing_buffer, setup, teardown),
unit_test_setup_teardown(torture_growing_buffer_shifting, setup, teardown),
unit_test_setup_teardown(torture_buffer_prepend, setup, teardown),
};
- return run_tests(tests);
+ ssh_init();
+ rc=run_tests(tests);
+ ssh_finalize();
+ return rc;
}
diff --git a/tests/unittests/torture_callbacks.c b/tests/unittests/torture_callbacks.c
index c199f1a0..97991899 100644
--- a/tests/unittests/torture_callbacks.c
+++ b/tests/unittests/torture_callbacks.c
@@ -58,10 +58,14 @@ static void torture_callbacks_exists(void **state) {
}
int torture_run_tests(void) {
+ int rc;
const UnitTest tests[] = {
unit_test_setup_teardown(torture_callbacks_size, setup, teardown),
unit_test_setup_teardown(torture_callbacks_exists, setup, teardown),
};
- return run_tests(tests);
+ ssh_init();
+ rc=run_tests(tests);
+ ssh_finalize();
+ return rc;
}
diff --git a/tests/unittests/torture_keyfiles.c b/tests/unittests/torture_keyfiles.c
index 47eb7b42..6e801c35 100644
--- a/tests/unittests/torture_keyfiles.c
+++ b/tests/unittests/torture_keyfiles.c
@@ -232,6 +232,7 @@ static void torture_privatekey_from_file_passphrase(void **state) {
}
int torture_run_tests(void) {
+ int rc;
const UnitTest tests[] = {
unit_test_setup_teardown(torture_pubkey_from_file,
setup_rsa_key,
@@ -245,5 +246,9 @@ int torture_run_tests(void) {
setup_both_keys_passphrase, teardown),
};
- return run_tests(tests);
+
+ ssh_init();
+ rc=run_tests(tests);
+ ssh_finalize();
+ return rc;
}
diff --git a/tests/unittests/torture_list.c b/tests/unittests/torture_list.c
index 2f5894c5..75f41825 100644
--- a/tests/unittests/torture_list.c
+++ b/tests/unittests/torture_list.c
@@ -77,11 +77,15 @@ static void torture_ssh_list_prepend(void **state) {
}
int torture_run_tests(void) {
+ int rc;
const UnitTest tests[] = {
unit_test(torture_ssh_list_new),
unit_test(torture_ssh_list_append),
unit_test(torture_ssh_list_prepend),
};
- return run_tests(tests);
+ ssh_init();
+ rc=run_tests(tests);
+ ssh_finalize();
+ return rc;
}
diff --git a/tests/unittests/torture_misc.c b/tests/unittests/torture_misc.c
index e7562334..9df70bbc 100644
--- a/tests/unittests/torture_misc.c
+++ b/tests/unittests/torture_misc.c
@@ -157,6 +157,7 @@ static void torture_path_expand_known_hosts(void **state) {
}
int torture_run_tests(void) {
+ int rc;
const UnitTest tests[] = {
unit_test(torture_get_user_home_dir),
unit_test(torture_basename),
@@ -171,5 +172,8 @@ int torture_run_tests(void) {
unit_test_setup_teardown(torture_path_expand_known_hosts, setup, teardown),
};
- return run_tests(tests);
+ ssh_init();
+ rc=run_tests(tests);
+ ssh_finalize();
+ return rc;
}
diff --git a/tests/unittests/torture_options.c b/tests/unittests/torture_options.c
index 4d20c216..d5da8288 100644
--- a/tests/unittests/torture_options.c
+++ b/tests/unittests/torture_options.c
@@ -119,6 +119,7 @@ static void torture_options_set_identity(void **state) {
}
int torture_run_tests(void) {
+ int rc;
const UnitTest tests[] = {
unit_test_setup_teardown(torture_options_set_host, setup, teardown),
unit_test_setup_teardown(torture_options_set_port, setup, teardown),
@@ -127,5 +128,8 @@ int torture_run_tests(void) {
unit_test_setup_teardown(torture_options_set_identity, setup, teardown),
};
- return run_tests(tests);
+ ssh_init();
+ rc=run_tests(tests);
+ ssh_finalize();
+ return rc;
}