| OLD | NEW |
| 1 """ | 1 """ |
| 2 Library to perform pre/post test setup for KVM autotest. | 2 Library to perform pre/post test setup for KVM autotest. |
| 3 """ | 3 """ |
| 4 import os, logging | 4 import os, logging |
| 5 from autotest_lib.client.common_lib import error | 5 from autotest_lib.client.common_lib import error |
| 6 from autotest_lib.client.bin import utils | 6 from autotest_lib.client.bin import utils |
| 7 | 7 |
| 8 | 8 |
| 9 class HugePageConfig(object): | 9 class HugePageConfig(object): |
| 10 def __init__(self, params): | 10 def __init__(self, params): |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 @error.context_aware | 99 @error.context_aware |
| 100 def cleanup(self): | 100 def cleanup(self): |
| 101 error.context("trying to dealocate hugepage memory") | 101 error.context("trying to dealocate hugepage memory") |
| 102 try: | 102 try: |
| 103 utils.system("umount %s" % self.hugepage_path) | 103 utils.system("umount %s" % self.hugepage_path) |
| 104 except error.CmdError: | 104 except error.CmdError: |
| 105 return | 105 return |
| 106 utils.system("echo 0 > %s" % self.kernel_hp_file) | 106 utils.system("echo 0 > %s" % self.kernel_hp_file) |
| 107 logging.debug("Hugepage memory successfuly dealocated") | 107 logging.debug("Hugepage memory successfuly dealocated") |
| OLD | NEW |