Skip to content

Commit

Permalink
Merge pull request #3713 from hs0210/cleanup_hugepage
Browse files Browse the repository at this point in the history
hugepage_setup: Cleanup hugepage when setup process fails
  • Loading branch information
dzhengfy committed Jul 7, 2023
2 parents 5254729 + d5dd42a commit 7e880ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions virttest/test_setup/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,8 @@ def set_hugepages(self):
msg = "Can't read/write from kernel hugepage file"
raise exceptions.TestSetupFail(msg)
if loop_hp == hp:
if loop_hp > 0:
self.cleanup()
raise ValueError("Cannot set the kernel hugepage setting "
"to the target value of %d hugepages." %
self.target_hugepages)
Expand Down

0 comments on commit 7e880ed

Please sign in to comment.