#include <stdio.h>
#include <libssh/libssh.h>

#include "torture.h"

static int verbosity = 0;

int torture_libssh_verbosity(void){
  return verbosity;
}

int main(int argc, char **argv) {
    int rc;

    (void) argc;
    (void) argv;

    ssh_init();

    rc = torture_run_tests();

    ssh_finalize();

    return rc;
}

#include "torture.h"

#include <stdio.h>

static int verbosity = 0;

int torture_libssh_verbosity(void){
  return verbosity;
}

int main(int argc, char **argv) {
    (void) argc;
    (void) argv;

    return torture_run_tests();
}

--- 
+++ 
@@ -1,6 +1,7 @@
+#include <stdio.h>
+#include <libssh/libssh.h>
+
 #include "torture.h"
-
-#include <stdio.h>
 
 static int verbosity = 0;
 
@@ -9,8 +10,16 @@
 }
 
 int main(int argc, char **argv) {
+    int rc;
+
     (void) argc;
     (void) argv;
 
-    return torture_run_tests();
+    ssh_init();
+
+    rc = torture_run_tests();
+
+    ssh_finalize();
+
+    return rc;
 }
tests: Call ssh_init() and ssh_finalize() before we run the tests.
