diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-01-30 12:01:15 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-01-30 12:01:15 +0000 |
commit | d59eaffe242347c2cc99e55fce494f1d4f8e82c8 (patch) | |
tree | eab286774b3bff0ce047c939275dbb797a64c9d9 /src/vpn | |
parent | 950c22927b978fde5cfd92d9b1ff7a6523dcb569 (diff) | |
download | gnunet-d59eaffe242347c2cc99e55fce494f1d4f8e82c8.tar.gz gnunet-d59eaffe242347c2cc99e55fce494f1d4f8e82c8.zip |
-check if /dev/net/tun exists and skip test otherwise
Diffstat (limited to 'src/vpn')
-rw-r--r-- | src/vpn/test_gnunet_vpn.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vpn/test_gnunet_vpn.c b/src/vpn/test_gnunet_vpn.c index 2ef5f96e9..4df9e7eb0 100644 --- a/src/vpn/test_gnunet_vpn.c +++ b/src/vpn/test_gnunet_vpn.c | |||
@@ -476,6 +476,15 @@ main (int argc, char *const *argv) | |||
476 | GNUNET_GETOPT_OPTION_END | 476 | GNUNET_GETOPT_OPTION_END |
477 | }; | 477 | }; |
478 | 478 | ||
479 | if (0 != ACCESS ("/dev/net/tun", R_OK)) | ||
480 | { | ||
481 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, | ||
482 | "access", | ||
483 | "/dev/net/tun"); | ||
484 | fprintf (stderr, | ||
485 | "WARNING: System unable to run test, skipping.\n"); | ||
486 | return 0; | ||
487 | } | ||
479 | if ( (GNUNET_YES != | 488 | if ( (GNUNET_YES != |
480 | GNUNET_OS_check_helper_binary ("gnunet-helper-vpn")) || | 489 | GNUNET_OS_check_helper_binary ("gnunet-helper-vpn")) || |
481 | (GNUNET_YES != | 490 | (GNUNET_YES != |