python 2.4 has a bug (http://bugs.python.org/issue1471),
fcntl.ioctl() in vnet_hdr_probe() always raises OverflowError
exception. This problem doesn't exist in python 2.6
This patch added a debug message in exception process path.

Signed-off-by: Amos Kong <[email protected]>
---
 client/virt/virt_utils.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/client/virt/virt_utils.py b/client/virt/virt_utils.py
index 2288fb6..dcaaa3e 100644
--- a/client/virt/virt_utils.py
+++ b/client/virt/virt_utils.py
@@ -3795,6 +3795,8 @@ def vnet_hdr_probe(tapfd):
     try:
         r = fcntl.ioctl(tapfd, TUNGETFEATURES, u)
     except OverflowError:
+        logging.debug("fcntl.ioctl(tapfd, TUNGETFEATURES, u) raises an"
+                      " exception:OverflowError!vnet_hdr_probe() is false!")
         return False
     flags = struct.unpack("I", r)[0]
     if flags & IFF_VNET_HDR:
-- 
1.7.1

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to