aboutsummaryrefslogtreecommitdiff
path: root/QMP/qmp.py
diff options
context:
space:
mode:
authorWenchao Xia <xiawenc@linux.vnet.ibm.com>2013-09-06 11:24:33 +0800
committerKevin Wolf <kwolf@redhat.com>2013-09-12 10:12:46 +0200
commit30b005d9d75af6388899fad2f462efb8af2b25b3 (patch)
tree32ffce8cac6c49b5228e4cb6fd714540f1f922de /QMP/qmp.py
parentf93296eaffcb3753f680f2dcffea2637f14f2092 (diff)
qemu-iotests: add infrastructure of fd passing via SCM
This patch make use of the compiled scm helper program to transfer fd via unix socket at runtime. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'QMP/qmp.py')
-rw-r--r--QMP/qmp.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/QMP/qmp.py b/QMP/qmp.py
index c551df1ed7..074f09a063 100644
--- a/QMP/qmp.py
+++ b/QMP/qmp.py
@@ -188,3 +188,9 @@ class QEMUMonitorProtocol:
def settimeout(self, timeout):
self.__sock.settimeout(timeout)
+
+ def get_sock_fd(self):
+ return self.__sock.fileno()
+
+ def is_scm_available(self):
+ return self.__sock.family == socket.AF_UNIX