aboutsummaryrefslogtreecommitdiff
path: root/tests/client/torture_sftp_dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/client/torture_sftp_dir.c')
-rw-r--r--tests/client/torture_sftp_dir.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/client/torture_sftp_dir.c b/tests/client/torture_sftp_dir.c
index 67303324..e5b5369a 100644
--- a/tests/client/torture_sftp_dir.c
+++ b/tests/client/torture_sftp_dir.c
@@ -3,7 +3,7 @@
#include "torture.h"
#include "sftp.c"
-static void setup(void **state) {
+static int setup(void **state) {
ssh_session session;
struct torture_sftp *t;
const char *host;
@@ -24,15 +24,19 @@ static void setup(void **state) {
assert_false(t == NULL);
*state = t;
+
+ return 0;
}
-static void teardown(void **state) {
+static int teardown(void **state) {
struct torture_sftp *t = *state;
assert_false(t == NULL);
torture_rmdirs(t->testdir);
torture_sftp_close(t);
+
+ return 0;
}
static void torture_sftp_mkdir(void **state) {
@@ -61,14 +65,14 @@ static void torture_sftp_mkdir(void **state) {
int torture_run_tests(void) {
int rc;
- UnitTest tests[] = {
- unit_test_setup_teardown(torture_sftp_mkdir, setup, teardown)
+ struct CMUnitTest tests[] = {
+ cmocka_unit_test_setup_teardown(torture_sftp_mkdir, setup, teardown)
};
ssh_init();
torture_filter_tests(tests);
- rc = run_tests(tests);
+ rc = cmocka_run_group_tests(tests, NULL, NULL);
ssh_finalize();
return rc;