Index: client/tests/kvm/scripts/ksm_overcommit_guest.py |
diff --git a/client/tests/kvm/scripts/allocator.py b/client/tests/kvm/scripts/ksm_overcommit_guest.py |
similarity index 98% |
rename from client/tests/kvm/scripts/allocator.py |
rename to client/tests/kvm/scripts/ksm_overcommit_guest.py |
index 227745add1970513cc49b2ab2e1379f0557142b3..d52be5b0ed7765a1bd9147c75b9f605abb15dea2 100755 |
--- a/client/tests/kvm/scripts/allocator.py |
+++ b/client/tests/kvm/scripts/ksm_overcommit_guest.py |
@@ -8,11 +8,11 @@ Auxiliary script used to allocate memory on guests. |
""" |
-import os, array, sys, struct, random, copy, inspect, tempfile, datetime, math |
+import os, array, sys, random, copy, tempfile, datetime, math |
PAGE_SIZE = 4096 # machine page size |
-TMPFS_OVERHEAD = 0.0022 # overhead on 1MB of write data |
+TMPFS_OVERHEAD = 0.0022 # overhead on 1MB of write data |
class MemFill(object): |
@@ -34,7 +34,7 @@ class MemFill(object): |
self.tmpdp = tempfile.mkdtemp() |
ret_code = os.system("mount -o size=%dM tmpfs %s -t tmpfs" % |
- ((mem+math.ceil(mem*TMPFS_OVERHEAD)), |
+ ((mem+math.ceil(mem*TMPFS_OVERHEAD)), |
self.tmpdp)) |
if ret_code != 0: |
if os.getuid() != 0: |