idella4     14/05/28 14:53:29

  Added:                14.0.0-tests.patch
  Log:
  patch to fix tests, fixes Bug #510834 by Patrick, re-keyword ~arm, tested on 
armv7, cubieboard2 wrt Bug #510832 also by Patrick
  
  (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 
0xB8072B0D)

Revision  Changes    Path
1.1                  dev-python/twisted-pair/files/14.0.0-tests.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/twisted-pair/files/14.0.0-tests.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/twisted-pair/files/14.0.0-tests.patch?rev=1.1&content-type=text/plain

Index: 14.0.0-tests.patch
===================================================================
Allows user to access /dev/net/tun
--- twisted/pair/test/test_tuntap.py.orig       2014-05-27 22:55:56.230232748 
-0400
+++ twisted/pair/test/test_tuntap.py            2014-05-27 23:30:02.769956742 
-0400
@@ -10,7 +10,7 @@
 import os
 import struct
 import socket
-from errno import EPERM, EBADF, EINVAL, EAGAIN, EWOULDBLOCK, ENOENT, ENODEV
+from errno import EPERM, EBADF, EINVAL, EAGAIN, EWOULDBLOCK, ENOENT, ENODEV, 
EACCES
 from random import randrange
 from collections import deque
 from itertools import cycle
@@ -582,8 +582,11 @@
         except OSError as e:
             # The device file may simply be missing.  The device file may also
             # exist but be unsupported by the kernel.
-            if e.errno in (ENOENT, ENODEV) and filename == b"/dev/net/tun":
-                raise SkipTest("Platform lacks /dev/net/tun")
+            if filename == b"/dev/net/tun":
+                if e.errno in (ENOENT, ENODEV):
+                    raise SkipTest("Platform lacks /dev/net/tun")
+                elif e.errno == EACCES:
+                    raise SkipTest("Access denied opening /dev/net/tun")
             raise
 
 




Reply via email to