-indicate skip if tests are not used
authorChristian Grothoff <christian@grothoff.org>
Sat, 2 Jul 2016 19:29:45 +0000 (19:29 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 2 Jul 2016 19:29:45 +0000 (19:29 +0000)
src/pt/test_gns_vpn.c
src/pt/test_gnunet_vpn.c

index c0d50d1771a95223c7f71eb2fdfa759d914f37df..7e5bb503d24695741d6f3c4e1a1acd936b36e8a7 100644 (file)
@@ -725,14 +725,14 @@ main (int argc, char *const *argv)
     fprintf (stderr,
             "Executable iptables not found in approved directories: %s, skipping\n",
             strerror (errno));
-    return 0;
+    return 77;
   }
 
   if (0 != fork_and_exec (sbin_iptables, iptables_args))
   {
     fprintf (stderr,
              "Failed to run `iptables -t mangle -L -v'. Skipping test.\n");
-    return 0;
+    return 77;
   }
 
   if (0 != ACCESS ("/dev/net/tun", R_OK))
@@ -742,7 +742,7 @@ main (int argc, char *const *argv)
                              "/dev/net/tun");
     fprintf (stderr,
             "WARNING: System unable to run test, skipping.\n");
-    return 0;
+    return 77;
   }
 
   bin_vpn = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-vpn");
@@ -765,7 +765,7 @@ main (int argc, char *const *argv)
     GNUNET_free (bin_exit);
     GNUNET_free (bin_dns);
     GNUNET_free (srv_dns);
-    return 0;
+    return 77;
   }
   GNUNET_free (bin_vpn);
   GNUNET_free (bin_exit);
@@ -782,7 +782,7 @@ main (int argc, char *const *argv)
              (0 == (S_ISUID & s.st_mode)) || (0 != getuid()) );
     GNUNET_free (bin_dns);
     GNUNET_free (srv_dns);
-    return 0;
+    return 77;
   }
   if ( (0 != stat (srv_dns, &s)) ||
        (my_gid == s.st_gid) ||
@@ -796,7 +796,7 @@ main (int argc, char *const *argv)
              (0 == (S_ISGID & s.st_mode)) );
     GNUNET_free (bin_dns);
     GNUNET_free (srv_dns);
-    return 0;
+    return 77;
   }
   GNUNET_free (bin_dns);
   GNUNET_free (srv_dns);
@@ -815,7 +815,7 @@ main (int argc, char *const *argv)
   {
     fprintf (stderr,
             "Required address families not supported by this system, skipping test.\n");
-    return 0;
+    return 77;
   }
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
   {
index df87da30abc78eed3cbef05c94fe645acf712b7c..206eb0f4716b0064e9f30a7111a7a13ff2916b77 100644 (file)
@@ -404,7 +404,7 @@ main (int argc, char *const *argv)
   const char *bin;
   char *vpn_binary;
   char *exit_binary;
-  int ret=0;
+  int ret = 0;
 
 #ifndef MINGW
   if (0 != ACCESS ("/dev/net/tun", R_OK))
@@ -413,7 +413,7 @@ main (int argc, char *const *argv)
                               "/dev/net/tun");
     fprintf (stderr,
              "WARNING: System unable to run test, skipping.\n");
-    return 0;
+    return 77;
   }
 #endif
   vpn_binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-vpn");
@@ -425,7 +425,7 @@ main (int argc, char *const *argv)
     GNUNET_free (exit_binary);
     fprintf (stderr,
              "WARNING: gnunet-helper-{exit,vpn} binaries are not SUID, refusing to run test (as it would have to fail). %d\n", ret);
-    return 0;
+    return 77;
   }
 
   GNUNET_free (vpn_binary);