diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/bugs/distribute/overlap.py | 26 | ||||
-rwxr-xr-x | tests/features/ipctest.py | 8 | ||||
-rwxr-xr-x | tests/utils/gfid-access.py | 2 | ||||
-rwxr-xr-x | tests/utils/setfattr.py | 2 |
4 files changed, 19 insertions, 19 deletions
diff --git a/tests/bugs/distribute/overlap.py b/tests/bugs/distribute/overlap.py index 105aa6792cf..726389a78d6 100755 --- a/tests/bugs/distribute/overlap.py +++ b/tests/bugs/distribute/overlap.py @@ -4,15 +4,15 @@ from __future__ import print_function import sys def calculate_one (ov, nv): - old_start = int(ov[18:26],16) - old_end = int(ov[26:34],16) - new_start = int(nv[18:26],16) - new_end = int(nv[26:34],16) + old_start = int(ov[18:26], 16) + old_end = int(ov[26:34], 16) + new_start = int(nv[18:26], 16) + new_end = int(nv[26:34], 16) if (new_end < old_start) or (new_start > old_end): #print '%s, %s -> ZERO' % (ov, nv) return 0 - all_start = max(old_start,new_start) - all_end = min(old_end,new_end) + all_start = max(old_start, new_start) + all_end = min(old_end, new_end) #print '%s, %s -> %08x' % (ov, nv, all_end - all_start + 1) return all_end - all_start + 1 @@ -22,7 +22,7 @@ def calculate_all (values): for old_val in values[:nv_index]: new_val = values[nv_index] nv_index += 1 - total += calculate_one(old_val,new_val) + total += calculate_one(old_val, new_val) return total """ @@ -45,13 +45,13 @@ test2_vals = [ '0x000000000000000055555555aaaaaaa9', # second third ] -print '%08x' % calculate_one(test1_vals[0],test1_vals[3]) -print '%08x' % calculate_one(test1_vals[1],test1_vals[4]) -print '%08x' % calculate_one(test1_vals[2],test1_vals[5]) +print '%08x' % calculate_one(test1_vals[0], test1_vals[3]) +print '%08x' % calculate_one(test1_vals[1], test1_vals[4]) +print '%08x' % calculate_one(test1_vals[2], test1_vals[5]) print '= %08x' % calculate_all(test1_vals) -print '%08x' % calculate_one(test2_vals[0],test2_vals[3]) -print '%08x' % calculate_one(test2_vals[1],test2_vals[4]) -print '%08x' % calculate_one(test2_vals[2],test2_vals[5]) +print '%08x' % calculate_one(test2_vals[0], test2_vals[3]) +print '%08x' % calculate_one(test2_vals[1], test2_vals[4]) +print '%08x' % calculate_one(test2_vals[2], test2_vals[5]) print '= %08x' % calculate_all(test2_vals) """ diff --git a/tests/features/ipctest.py b/tests/features/ipctest.py index 4417493a0ae..b64d4f86895 100755 --- a/tests/features/ipctest.py +++ b/tests/features/ipctest.py @@ -3,18 +3,18 @@ from __future__ import print_function import ctypes -api = ctypes.CDLL("libgfapi.so",mode=ctypes.RTLD_GLOBAL) +api = ctypes.CDLL("libgfapi.so", mode=ctypes.RTLD_GLOBAL) api.glfs_ipc.argtypes = [ ctypes.c_void_p, ctypes.c_int, ctypes.c_void_p, ctypes.c_void_p ] api.glfs_ipc.restype = ctypes.c_int def do_ipc (host, volume): fs = api.glfs_new(volume) - #api.glfs_set_logging(fs,"/dev/stderr",7) - api.glfs_set_volfile_server(fs,"tcp",host,24007) + #api.glfs_set_logging(fs, "/dev/stderr", 7) + api.glfs_set_volfile_server(fs, "tcp", host, 24007) api.glfs_init(fs) - ret = api.glfs_ipc(fs,1470369258,0,0) + ret = api.glfs_ipc(fs, 1470369258, 0, 0) api.glfs_fini(fs) return ret diff --git a/tests/utils/gfid-access.py b/tests/utils/gfid-access.py index 2a58bfebc4e..6d892a37b2e 100755 --- a/tests/utils/gfid-access.py +++ b/tests/utils/gfid-access.py @@ -64,7 +64,7 @@ if __name__ == '__main__': ftype = sys.argv[5] uid = int(sys.argv[6]) gid = int(sys.argv[7]) - perm = int(sys.argv[8],8) + perm = int(sys.argv[8], 8) os.chdir(mtpt) if pargfid == 'ROOT': diff --git a/tests/utils/setfattr.py b/tests/utils/setfattr.py index 159218d8bef..9a7daeb1be4 100755 --- a/tests/utils/setfattr.py +++ b/tests/utils/setfattr.py @@ -46,7 +46,7 @@ if __name__ == '__main__': parser.add_option("-x", action="store", dest="xname", type="string", help="Remove the named extended attribute entirely.") - (option,args) = parser.parse_args() + (option, args) = parser.parse_args() if not args: print ("Usage: setfattr {-n name} [-v value] file...") print (" setfattr {-x name} file...") |