diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2013-07-30 11:24:22 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2013-07-30 14:13:58 +0100 |
commit | a85bf91386293dc07446c82f95e5d5bd4e72c3d5 (patch) | |
tree | 1eab834b09f23b70096f4c201ddd82cb82589255 /tests/error.py | |
parent | 9dd30d27253563852208103dbad1951dde4c0909 (diff) | |
download | libvirt-python-split-a85bf91386293dc07446c82f95e5d5bd4e72c3d5.tar.gz libvirt-python-split-a85bf91386293dc07446c82f95e5d5bd4e72c3d5.tar.xz libvirt-python-split-a85bf91386293dc07446c82f95e5d5bd4e72c3d5.zip |
Delete obsolete / unused python test filesCVE-2013-5651CVE-2013-4239
The python/tests directory contains a number of so called
"tests" for the python API. These are all hardcoded to
look for Xen and cannot be run in any automated fashion,
and no one is ever manually running them. Given that they
don't meaningully contribute to the test coverage, delete
them.
For some reason these tests were also copied into the
filesystem as part of 'make install'. The change to the
RPM in commit 3347a4203278ec93d7b0ceb88b5ed10e4f14765c
caused a build failure, since it removed the code which
deleted these installed tests.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'tests/error.py')
-rwxr-xr-x | tests/error.py | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/tests/error.py b/tests/error.py deleted file mode 100755 index 295f9a7..0000000 --- a/tests/error.py +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/python -u -# -# Tests global error handlers at the python level. -# -import libvirt -import sys -import os - -errno = None - -def handler(ctxt, err): - global errno - - #print "handler(%s, %s)" % (ctxt, err) - errno = err - -libvirt.registerErrorHandler(handler, 'context') - -conn = libvirt.openReadOnly(None) -if conn == None: - print 'Failed to open connection to the hypervisor' - sys.exit(1) - -try: - dom0 = conn.lookupByName("Does_not_exist") - print 'strange found a Does_not_exist domain' - sys.exit(1) -except: - pass - -del conn - -if errno == None: - print 'failed to get an error' -elif errno[0] == libvirt.VIR_ERR_NO_CONNECT or \ - errno[0] == libvirt.VIR_ERR_INVALID_DOMAIN or \ - errno[0] == libvirt.VIR_ERR_GET_FAILED: - print "OK" -else: - print 'got unexpected error:', errno - -sys.exit(0) |