Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Unified Diff: client/tests/kvm/scripts/ksm_overcommit_guest.py

Issue 6246035: Merge remote branch 'cros/upstream' into master (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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:

Powered by Google App Engine
This is Rietveld 408576698