summaryrefslogtreecommitdiff
path: root/src/pt
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-07-02 19:29:45 +0000
committerChristian Grothoff <christian@grothoff.org>2016-07-02 19:29:45 +0000
commit8964fee37d39c7b984495b6008c5de0472c9b0e3 (patch)
treebbe414cc7d5fd04a125dafdbb7cc3ea5db92b170 /src/pt
parent6a539aa9aec2894740e8901019a537b280e4f7a0 (diff)
-indicate skip if tests are not used
Diffstat (limited to 'src/pt')
-rw-r--r--src/pt/test_gns_vpn.c14
-rw-r--r--src/pt/test_gnunet_vpn.c6
2 files changed, 10 insertions, 10 deletions
diff --git a/src/pt/test_gns_vpn.c b/src/pt/test_gns_vpn.c
index c0d50d177..7e5bb503d 100644
--- a/src/pt/test_gns_vpn.c
+++ b/src/pt/test_gns_vpn.c
@@ -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))
{
diff --git a/src/pt/test_gnunet_vpn.c b/src/pt/test_gnunet_vpn.c
index df87da30a..206eb0f47 100644
--- a/src/pt/test_gnunet_vpn.c
+++ b/src/pt/test_gnunet_vpn.c
@@ -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);