summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/features/ipctest.py2
-rwxr-xr-xtests/utils/create-files.py10
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/features/ipctest.py b/tests/features/ipctest.py
index a8de3936b27..4417493a0ae 100755
--- a/tests/features/ipctest.py
+++ b/tests/features/ipctest.py
@@ -23,7 +23,7 @@ if __name__ == "__main__":
import sys
try:
- res = apply(do_ipc,sys.argv[1:3])
+ res = do_ipc(*sys.argv[1:3])
print(res)
except:
print("IPC failed (volume not started?)")
diff --git a/tests/utils/create-files.py b/tests/utils/create-files.py
index 71f967f4fdb..594072a359a 100755
--- a/tests/utils/create-files.py
+++ b/tests/utils/create-files.py
@@ -51,7 +51,7 @@ def os_rd(src, size):
def os_wr(dest, data):
global timr
st = time.time()
- fd = os.open(dest, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0644)
+ fd = os.open(dest, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o644)
os.write(fd, data)
os.close(fd)
ed = time.time()
@@ -88,7 +88,7 @@ def create_txt_file(fil, size, mins, maxs, rand):
else:
data = os_rd("/etc/services", 512*1024)
file_size = 0
- fd = os.open(fil, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0644)
+ fd = os.open(fil, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o644)
while file_size < size:
os.write(fd, data)
file_size += 500*1024
@@ -323,9 +323,9 @@ def human2bytes(size):
def bytes2human(byts):
abbr = {
- 1 << 30L: "GB",
- 1 << 20L: "MB",
- 1 << 10L: "KB",
+ 1 << 30: "GB",
+ 1 << 20: "MB",
+ 1 << 10: "KB",
1: "bytes"
}
if byts == 1: