diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-07-02 19:29:45 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-07-02 19:29:45 +0000 |
commit | 8964fee37d39c7b984495b6008c5de0472c9b0e3 (patch) | |
tree | bbe414cc7d5fd04a125dafdbb7cc3ea5db92b170 | |
parent | 6a539aa9aec2894740e8901019a537b280e4f7a0 (diff) | |
download | gnunet-8964fee37d39c7b984495b6008c5de0472c9b0e3.tar.gz gnunet-8964fee37d39c7b984495b6008c5de0472c9b0e3.zip |
-indicate skip if tests are not used
-rw-r--r-- | src/pt/test_gns_vpn.c | 14 | ||||
-rw-r--r-- | src/pt/test_gnunet_vpn.c | 6 |
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) | |||
725 | fprintf (stderr, | 725 | fprintf (stderr, |
726 | "Executable iptables not found in approved directories: %s, skipping\n", | 726 | "Executable iptables not found in approved directories: %s, skipping\n", |
727 | strerror (errno)); | 727 | strerror (errno)); |
728 | return 0; | 728 | return 77; |
729 | } | 729 | } |
730 | 730 | ||
731 | if (0 != fork_and_exec (sbin_iptables, iptables_args)) | 731 | if (0 != fork_and_exec (sbin_iptables, iptables_args)) |
732 | { | 732 | { |
733 | fprintf (stderr, | 733 | fprintf (stderr, |
734 | "Failed to run `iptables -t mangle -L -v'. Skipping test.\n"); | 734 | "Failed to run `iptables -t mangle -L -v'. Skipping test.\n"); |
735 | return 0; | 735 | return 77; |
736 | } | 736 | } |
737 | 737 | ||
738 | if (0 != ACCESS ("/dev/net/tun", R_OK)) | 738 | if (0 != ACCESS ("/dev/net/tun", R_OK)) |
@@ -742,7 +742,7 @@ main (int argc, char *const *argv) | |||
742 | "/dev/net/tun"); | 742 | "/dev/net/tun"); |
743 | fprintf (stderr, | 743 | fprintf (stderr, |
744 | "WARNING: System unable to run test, skipping.\n"); | 744 | "WARNING: System unable to run test, skipping.\n"); |
745 | return 0; | 745 | return 77; |
746 | } | 746 | } |
747 | 747 | ||
748 | bin_vpn = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-vpn"); | 748 | bin_vpn = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-vpn"); |
@@ -765,7 +765,7 @@ main (int argc, char *const *argv) | |||
765 | GNUNET_free (bin_exit); | 765 | GNUNET_free (bin_exit); |
766 | GNUNET_free (bin_dns); | 766 | GNUNET_free (bin_dns); |
767 | GNUNET_free (srv_dns); | 767 | GNUNET_free (srv_dns); |
768 | return 0; | 768 | return 77; |
769 | } | 769 | } |
770 | GNUNET_free (bin_vpn); | 770 | GNUNET_free (bin_vpn); |
771 | GNUNET_free (bin_exit); | 771 | GNUNET_free (bin_exit); |
@@ -782,7 +782,7 @@ main (int argc, char *const *argv) | |||
782 | (0 == (S_ISUID & s.st_mode)) || (0 != getuid()) ); | 782 | (0 == (S_ISUID & s.st_mode)) || (0 != getuid()) ); |
783 | GNUNET_free (bin_dns); | 783 | GNUNET_free (bin_dns); |
784 | GNUNET_free (srv_dns); | 784 | GNUNET_free (srv_dns); |
785 | return 0; | 785 | return 77; |
786 | } | 786 | } |
787 | if ( (0 != stat (srv_dns, &s)) || | 787 | if ( (0 != stat (srv_dns, &s)) || |
788 | (my_gid == s.st_gid) || | 788 | (my_gid == s.st_gid) || |
@@ -796,7 +796,7 @@ main (int argc, char *const *argv) | |||
796 | (0 == (S_ISGID & s.st_mode)) ); | 796 | (0 == (S_ISGID & s.st_mode)) ); |
797 | GNUNET_free (bin_dns); | 797 | GNUNET_free (bin_dns); |
798 | GNUNET_free (srv_dns); | 798 | GNUNET_free (srv_dns); |
799 | return 0; | 799 | return 77; |
800 | } | 800 | } |
801 | GNUNET_free (bin_dns); | 801 | GNUNET_free (bin_dns); |
802 | GNUNET_free (srv_dns); | 802 | GNUNET_free (srv_dns); |
@@ -815,7 +815,7 @@ main (int argc, char *const *argv) | |||
815 | { | 815 | { |
816 | fprintf (stderr, | 816 | fprintf (stderr, |
817 | "Required address families not supported by this system, skipping test.\n"); | 817 | "Required address families not supported by this system, skipping test.\n"); |
818 | return 0; | 818 | return 77; |
819 | } | 819 | } |
820 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) | 820 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) |
821 | { | 821 | { |
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) | |||
404 | const char *bin; | 404 | const char *bin; |
405 | char *vpn_binary; | 405 | char *vpn_binary; |
406 | char *exit_binary; | 406 | char *exit_binary; |
407 | int ret=0; | 407 | int ret = 0; |
408 | 408 | ||
409 | #ifndef MINGW | 409 | #ifndef MINGW |
410 | if (0 != ACCESS ("/dev/net/tun", R_OK)) | 410 | if (0 != ACCESS ("/dev/net/tun", R_OK)) |
@@ -413,7 +413,7 @@ main (int argc, char *const *argv) | |||
413 | "/dev/net/tun"); | 413 | "/dev/net/tun"); |
414 | fprintf (stderr, | 414 | fprintf (stderr, |
415 | "WARNING: System unable to run test, skipping.\n"); | 415 | "WARNING: System unable to run test, skipping.\n"); |
416 | return 0; | 416 | return 77; |
417 | } | 417 | } |
418 | #endif | 418 | #endif |
419 | vpn_binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-vpn"); | 419 | vpn_binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-vpn"); |
@@ -425,7 +425,7 @@ main (int argc, char *const *argv) | |||
425 | GNUNET_free (exit_binary); | 425 | GNUNET_free (exit_binary); |
426 | fprintf (stderr, | 426 | fprintf (stderr, |
427 | "WARNING: gnunet-helper-{exit,vpn} binaries are not SUID, refusing to run test (as it would have to fail). %d\n", ret); | 427 | "WARNING: gnunet-helper-{exit,vpn} binaries are not SUID, refusing to run test (as it would have to fail). %d\n", ret); |
428 | return 0; | 428 | return 77; |
429 | } | 429 | } |
430 | 430 | ||
431 | GNUNET_free (vpn_binary); | 431 | GNUNET_free (vpn_binary); |