From d59eaffe242347c2cc99e55fce494f1d4f8e82c8 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 30 Jan 2012 12:01:15 +0000 Subject: [PATCH] -check if /dev/net/tun exists and skip test otherwise --- src/vpn/test_gnunet_vpn.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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) GNUNET_GETOPT_OPTION_END }; + if (0 != ACCESS ("/dev/net/tun", R_OK)) + { + GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, + "access", + "/dev/net/tun"); + fprintf (stderr, + "WARNING: System unable to run test, skipping.\n"); + return 0; + } if ( (GNUNET_YES != GNUNET_OS_check_helper_binary ("gnunet-helper-vpn")) || (GNUNET_YES != -- 2.25.1