()
| 295 | |
| 296 | #check function |
| 297 | def check_kvm(): |
| 298 | if distro in (Fedora,CentOS,RHEL6,SUSE): |
| 299 | if os.path.exists("/dev/kvm"): return True |
| 300 | raise CheckFailed("KVM is not correctly installed on this system, or support for it is not enabled in the BIOS") |
| 301 | else: |
| 302 | try: |
| 303 | kvmok() |
| 304 | return True |
| 305 | except CalledProcessError: |
| 306 | raise CheckFailed("KVM is not correctly installed on this system, or support for it is not enabled in the BIOS") |
| 307 | except OSError as e: |
| 308 | if e.errno == errno.ENOENT: raise CheckFailed("KVM is not correctly installed on this system, or support for it is not enabled in the BIOS") |
| 309 | raise |
| 310 | return True |
| 311 | raise AssertionError("check_kvm() should have never reached this part") |
| 312 | |
| 313 | def check_cgroups(): |
| 314 | return glob.glob("/*/cpu.shares") |
nothing calls this directly
no test coverage detected