summaryrefslogtreecommitdiffstats
path: root/tests/node.py
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2013-07-30 11:24:22 +0100
committerDaniel P. Berrange <berrange@redhat.com>2013-07-30 14:13:58 +0100
commita85bf91386293dc07446c82f95e5d5bd4e72c3d5 (patch)
tree1eab834b09f23b70096f4c201ddd82cb82589255 /tests/node.py
parent9dd30d27253563852208103dbad1951dde4c0909 (diff)
downloadlibvirt-python-split-CVE-2013-4239.tar.gz
libvirt-python-split-CVE-2013-4239.tar.xz
libvirt-python-split-CVE-2013-4239.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/node.py')
-rwxr-xr-xtests/node.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/tests/node.py b/tests/node.py
deleted file mode 100755
index f199fc3..0000000
--- a/tests/node.py
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/python -u
-import libvirt
-import sys
-import os
-
-if not os.access("/proc/xen", os.R_OK):
- print 'System is not running a Xen kernel'
- sys.exit(1)
-
-conn = libvirt.openReadOnly(None)
-if conn == None:
- print 'Failed to open connection to the hypervisor'
- sys.exit(1)
-
-try:
- (model, memory, cpus, mhz, nodes, socket, cores, threads) = conn.getInfo()
-except:
- print 'Failed to extract the current node information'
- sys.exit(1)
-
-print "Xen running on %d %s processors at %d MHz, %d MBytes of memory" % (
- cpus, model, mhz, memory)
-
-if cpus > nodes * socket * cores * threads:
- print "Erroneous CPU information"
- sys.exit(1)
-
-if cpus < nodes * socket * cores * threads:
- print "Strange, running in degrated mode, some CPU are not available"
-
-del conn
-print "OK"
-
-sys.exit(0)