summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkshithijiyer <kshithij.ki@gmail.com>2020-02-20 12:25:15 +0530
committerBala Konda Reddy M <bala12352@gmail.com>2020-02-26 06:01:04 +0000
commit3e6d5bdc8c45ac3b726ca3b7237e43194805cc56 (patch)
tree55dd6baa7b4a4b5a7e5b6ea7b1ad96dbf19d4d89
parent17fa26e1f33e5c29b7ed0e205dc85376948c5f92 (diff)
[Testfix] Remove python version dependency(Part 3)
Please refer to commit message of patch [1]. [1] https://review.gluster.org/#/c/glusto-tests/+/24140/ Change-Id: Ib357d5690bb28131d788073b80a088647167fe80 Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
-rw-r--r--tests/functional/fuse_subdir/test_fusesubdir_rename.py8
-rw-r--r--tests/functional/fuse_subdir/test_fusesubdir_with_addbrick.py7
-rw-r--r--tests/functional/fuse_subdir/test_fusesubdir_with_removebrick.py7
-rw-r--r--tests/functional/fuse_subdir/test_fusesubdir_with_replacebrick.py7
-rw-r--r--tests/functional/fuse_subdir/test_node_reboot_subdir_mounted.py7
-rw-r--r--tests/functional/fuse_subdir/test_volume_set_ops_sub_dirs_mounted.py7
-rw-r--r--tests/functional/nfs_ganesha/test_ganesha_add_brick.py8
-rw-r--r--tests/functional/nfs_ganesha/test_ganesha_replace_brick.py8
-rw-r--r--tests/functional/nfs_ganesha/test_new_mount_while_io_in_progress.py9
-rw-r--r--tests/functional/nfs_ganesha/test_new_volume_while_io_in_progress.py8
-rwxr-xr-xtests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py9
-rwxr-xr-xtests/functional/nfs_ganesha/test_nfs_ganesha_volume_exports.py15
-rw-r--r--tests/functional/quota/test_limit_usage_deep_dir.py7
-rwxr-xr-xtests/functional/quota/test_quota_limit_dir_breadth.py12
-rwxr-xr-xtests/functional/quota/test_quota_rebalance.py11
-rw-r--r--tests/functional/quota/test_quota_rebalance_heal.py11
-rw-r--r--tests/functional/quota/test_quota_single_brick_volume.py8
-rw-r--r--tests/functional/samba/test_stat_prefetch.py9
18 files changed, 63 insertions, 95 deletions
diff --git a/tests/functional/fuse_subdir/test_fusesubdir_rename.py b/tests/functional/fuse_subdir/test_fusesubdir_rename.py
index 8e0b3be21..065dccd7f 100644
--- a/tests/functional/fuse_subdir/test_fusesubdir_rename.py
+++ b/tests/functional/fuse_subdir/test_fusesubdir_rename.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2017-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,8 +14,6 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import copy
-import sys
-
from glusto.core import Glusto as g
from glustolibs.gluster.gluster_base_class import (GlusterBaseClass,
@@ -136,13 +134,13 @@ class SubdirWithRename(GlusterBaseClass):
for mount_obj in self.subdir_mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path, count,
+ self.script_upload_path, count,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
diff --git a/tests/functional/fuse_subdir/test_fusesubdir_with_addbrick.py b/tests/functional/fuse_subdir/test_fusesubdir_with_addbrick.py
index 2b36bc500..68dcd5d5d 100644
--- a/tests/functional/fuse_subdir/test_fusesubdir_with_addbrick.py
+++ b/tests/functional/fuse_subdir/test_fusesubdir_with_addbrick.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2017-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,7 +14,6 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import copy
-import sys
from glusto.core import Glusto as g
@@ -134,13 +133,13 @@ class SubdirWithAddBrick(GlusterBaseClass):
for mount_obj in self.subdir_mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path, count,
+ self.script_upload_path, count,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
diff --git a/tests/functional/fuse_subdir/test_fusesubdir_with_removebrick.py b/tests/functional/fuse_subdir/test_fusesubdir_with_removebrick.py
index 66598fcb7..fa526ac6d 100644
--- a/tests/functional/fuse_subdir/test_fusesubdir_with_removebrick.py
+++ b/tests/functional/fuse_subdir/test_fusesubdir_with_removebrick.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2017-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,7 +14,6 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import copy
-import sys
from glusto.core import Glusto as g
@@ -146,13 +145,13 @@ class SubdirWithRemoveBrick(GlusterBaseClass):
for mount_obj in self.subdir_mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
self.mpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path, count,
+ self.script_upload_path, count,
self.mpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
diff --git a/tests/functional/fuse_subdir/test_fusesubdir_with_replacebrick.py b/tests/functional/fuse_subdir/test_fusesubdir_with_replacebrick.py
index 5c7929cf8..def9ffeba 100644
--- a/tests/functional/fuse_subdir/test_fusesubdir_with_replacebrick.py
+++ b/tests/functional/fuse_subdir/test_fusesubdir_with_replacebrick.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2017-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,7 +14,6 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import copy
-import sys
from glusto.core import Glusto as g
@@ -135,13 +134,13 @@ class SubdirWithReplaceBrick(GlusterBaseClass):
for mount_obj in self.subdir_mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path, count,
+ self.script_upload_path, count,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
diff --git a/tests/functional/fuse_subdir/test_node_reboot_subdir_mounted.py b/tests/functional/fuse_subdir/test_node_reboot_subdir_mounted.py
index c6d18714e..865728a33 100644
--- a/tests/functional/fuse_subdir/test_node_reboot_subdir_mounted.py
+++ b/tests/functional/fuse_subdir/test_node_reboot_subdir_mounted.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2017-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,7 +19,6 @@
is mounted
"""
import copy
-import sys
from glusto.core import Glusto as g
@@ -136,13 +135,13 @@ class NodeRebootSubDirsMounted(GlusterBaseClass):
for mount_obj in self.subdir_mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path, count,
+ self.script_upload_path, count,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
diff --git a/tests/functional/fuse_subdir/test_volume_set_ops_sub_dirs_mounted.py b/tests/functional/fuse_subdir/test_volume_set_ops_sub_dirs_mounted.py
index 1006cc653..e0f31e3dd 100644
--- a/tests/functional/fuse_subdir/test_volume_set_ops_sub_dirs_mounted.py
+++ b/tests/functional/fuse_subdir/test_volume_set_ops_sub_dirs_mounted.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2017-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,7 +19,6 @@
operations when sub-dirs are mounted
"""
import copy
-import sys
from glusto.core import Glusto as g
@@ -123,13 +122,13 @@ class VolumeSetOpsSubDirsMounted(GlusterBaseClass):
for mount_obj in self.subdir_mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path, count,
+ self.script_upload_path, count,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
diff --git a/tests/functional/nfs_ganesha/test_ganesha_add_brick.py b/tests/functional/nfs_ganesha/test_ganesha_add_brick.py
index 20252359f..946b64c3b 100644
--- a/tests/functional/nfs_ganesha/test_ganesha_add_brick.py
+++ b/tests/functional/nfs_ganesha/test_ganesha_add_brick.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2019 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2018-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,8 +14,6 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-import sys
-
from glusto.core import Glusto as g
from glustolibs.gluster.nfs_ganesha_libs import NfsGaneshaClusterSetupClass
@@ -91,13 +89,13 @@ class TestGaneshaAddBrick(NfsGaneshaClusterSetupClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path, count,
+ self.script_upload_path, count,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
diff --git a/tests/functional/nfs_ganesha/test_ganesha_replace_brick.py b/tests/functional/nfs_ganesha/test_ganesha_replace_brick.py
index 68b2ed997..12cec1a74 100644
--- a/tests/functional/nfs_ganesha/test_ganesha_replace_brick.py
+++ b/tests/functional/nfs_ganesha/test_ganesha_replace_brick.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2019 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2018-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,8 +14,6 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-import sys
-
from glusto.core import Glusto as g
from glustolibs.gluster.nfs_ganesha_libs import NfsGaneshaClusterSetupClass
@@ -92,13 +90,13 @@ class TestGaneshaReplaceBrick(NfsGaneshaClusterSetupClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path, count,
+ self.script_upload_path, count,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
diff --git a/tests/functional/nfs_ganesha/test_new_mount_while_io_in_progress.py b/tests/functional/nfs_ganesha/test_new_mount_while_io_in_progress.py
index 6f99db59d..1c6fc313c 100644
--- a/tests/functional/nfs_ganesha/test_new_mount_while_io_in_progress.py
+++ b/tests/functional/nfs_ganesha/test_new_mount_while_io_in_progress.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2019 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2018-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,10 +14,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from copy import deepcopy
-import sys
-
from glusto.core import Glusto as g
-
from glustolibs.gluster.nfs_ganesha_libs import NfsGaneshaClusterSetupClass
from glustolibs.gluster.gluster_base_class import runs_on
from glustolibs.gluster.exceptions import ExecutionError
@@ -103,13 +100,13 @@ class TestMountWhileIoInProgress(NfsGaneshaClusterSetupClass):
# Start IO
g.log.info("Starting IO on %s:%s", mount_object.client_system,
mount_object.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
dirname_start_num, mount_object.mountpoint))
proc = g.run_async(mount_object.client_system, cmd,
user=mount_object.user)
diff --git a/tests/functional/nfs_ganesha/test_new_volume_while_io_in_progress.py b/tests/functional/nfs_ganesha/test_new_volume_while_io_in_progress.py
index 083ebb1ce..c367d3006 100644
--- a/tests/functional/nfs_ganesha/test_new_volume_while_io_in_progress.py
+++ b/tests/functional/nfs_ganesha/test_new_volume_while_io_in_progress.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2019 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2018-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,6 @@
IO is in progress on another volume
"""
from copy import deepcopy
-import sys
-
from glusto.core import Glusto as g
from glustolibs.gluster.nfs_ganesha_libs import (
@@ -98,13 +96,13 @@ class TestNewVolumeWhileIoInProgress(NfsGaneshaClusterSetupClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path, count,
+ self.script_upload_path, count,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
diff --git a/tests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py b/tests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py
index 53b069e01..2bca6d1c9 100755
--- a/tests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py
+++ b/tests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2017-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,9 +17,6 @@
""" Description:
Test Cases in this module test NFS-Ganesha Sanity.
"""
-
-import sys
-
from glusto.core import Glusto as g
from glustolibs.gluster.gluster_base_class import runs_on
@@ -107,13 +104,13 @@ class TestNfsGaneshaSanity(NfsGaneshaClusterSetupClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path, count,
+ self.script_upload_path, count,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
diff --git a/tests/functional/nfs_ganesha/test_nfs_ganesha_volume_exports.py b/tests/functional/nfs_ganesha/test_nfs_ganesha_volume_exports.py
index 700bd0ffe..8c90f953d 100755
--- a/tests/functional/nfs_ganesha/test_nfs_ganesha_volume_exports.py
+++ b/tests/functional/nfs_ganesha/test_nfs_ganesha_volume_exports.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2017 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2016-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,7 +22,6 @@
from copy import deepcopy
import os
import re
-import sys
from time import sleep
from glusto.core import Glusto as g
@@ -261,13 +260,13 @@ class TestNfsGaneshaVolumeExportsWithIO(NfsGaneshaClusterSetupClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path, count,
+ self.script_upload_path, count,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
@@ -400,13 +399,13 @@ class TestNfsGaneshaMultiVolumeExportsWithIO(NfsGaneshaClusterSetupClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path, count,
+ self.script_upload_path, count,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
@@ -569,13 +568,13 @@ class TestNfsGaneshaSubDirExportsWithIO(NfsGaneshaClusterSetupClass):
g.log.info("Starting IO on all mounts.")
self.all_mounts_procs = []
for mount_obj in mount_objs:
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 15 "
"--max-num-of-dirs 5 "
"--num-of-files 10 %s" % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
self.dir_start, mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
diff --git a/tests/functional/quota/test_limit_usage_deep_dir.py b/tests/functional/quota/test_limit_usage_deep_dir.py
index 092bac416..94dacfe9f 100644
--- a/tests/functional/quota/test_limit_usage_deep_dir.py
+++ b/tests/functional/quota/test_limit_usage_deep_dir.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2015-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,7 +15,6 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import random
-import sys
from glusto.core import Glusto as g
from glustolibs.gluster.gluster_base_class import (GlusterBaseClass,
@@ -180,9 +179,9 @@ class LimitUsageDeepDir(GlusterBaseClass):
# Data creation
# Creates one file of rand[0] size in each dir
rand = random.sample([1, 10, 512], 1)
- cmd = ("/usr/bin/env python%d %s create_files "
+ cmd = ("/usr/bin/env python %s create_files "
"--fixed-file-size %sk %s/%s" % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
rand[0], mount_object.mountpoint, dir_list[0]))
ret, _, _ = g.run(mount_object.client_system, cmd)
diff --git a/tests/functional/quota/test_quota_limit_dir_breadth.py b/tests/functional/quota/test_quota_limit_dir_breadth.py
index eb23efceb..acaa82790 100755
--- a/tests/functional/quota/test_quota_limit_dir_breadth.py
+++ b/tests/functional/quota/test_quota_limit_dir_breadth.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2015-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,8 +14,6 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-import sys
-
from glusto.core import Glusto as g
from glustolibs.gluster.gluster_base_class import (GlusterBaseClass,
@@ -102,8 +100,8 @@ class QuotaLimitDirBreadth(GlusterBaseClass):
g.log.info("Creating Directories on %s:%s",
client, mount_dir)
- cmd = "/usr/bin/env python%d %s create_deep_dir -d 0 -l 10 %s" % (
- sys.version_info.major, self.script_upload_path, mount_dir)
+ cmd = "/usr/bin/env python %s create_deep_dir -d 0 -l 10 %s" % (
+ self.script_upload_path, mount_dir)
proc = g.run_async(client, cmd, user=mount_obj.user)
self.all_mounts_procs.append(proc)
@@ -151,9 +149,9 @@ class QuotaLimitDirBreadth(GlusterBaseClass):
g.log.info("Creating Files on %s:%s", client, mount_dir)
for i in range(1, 11):
dir_name = "/user" + str(i)
- cmd = ("/usr/bin/env python%d %s create_files -f 10 "
+ cmd = ("/usr/bin/env python %s create_files -f 10 "
"--fixed-file-size 1M %s/%s" % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
mount_dir, dir_name))
ret, _, _ = g.run(client, cmd)
diff --git a/tests/functional/quota/test_quota_rebalance.py b/tests/functional/quota/test_quota_rebalance.py
index 5dd53f1f0..8f71ef9c9 100755
--- a/tests/functional/quota/test_quota_rebalance.py
+++ b/tests/functional/quota/test_quota_rebalance.py
@@ -14,7 +14,6 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-import sys
from time import sleep
from glusto.core import Glusto as g
from glustolibs.gluster.gluster_base_class import GlusterBaseClass, runs_on
@@ -127,10 +126,9 @@ class TestQuotaRebalance(GlusterBaseClass):
# Do some IO until hard limit is reached
cmd = (
- "/usr/bin/env python%d %s create_files "
+ "/usr/bin/env python %s create_files "
"-f 100 --fixed-file-size 1M --base-file-name file %s"
- % (sys.version_info.major,
- self.script_upload_path,
+ % (self.script_upload_path,
self.mounts[0].mountpoint))
proc = g.run_async(
self.mounts[0].client_system, cmd, user=self.mounts[0].user)
@@ -184,10 +182,9 @@ class TestQuotaRebalance(GlusterBaseClass):
# Perform some more IO and check if hard limit is honoured
self.all_mounts_procs = []
cmd = (
- "/usr/bin/env python%d %s create_files "
+ "/usr/bin/env python %s create_files "
"-f 100 --fixed-file-size 1M --base-file-name newfile %s"
- % (sys.version_info.major,
- self.script_upload_path,
+ % (self.script_upload_path,
self.mounts[0].mountpoint))
proc = g.run_async(
self.mounts[0].client_system, cmd, user=self.mounts[0].user)
diff --git a/tests/functional/quota/test_quota_rebalance_heal.py b/tests/functional/quota/test_quota_rebalance_heal.py
index e8d8f526f..e6feb123d 100644
--- a/tests/functional/quota/test_quota_rebalance_heal.py
+++ b/tests/functional/quota/test_quota_rebalance_heal.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2015-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,7 +14,6 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-import sys
from time import sleep
from glusto.core import Glusto as g
@@ -124,9 +123,9 @@ class TestQuotaRebalanceHeal(GlusterBaseClass):
for mount_object in self.mounts:
g.log.info("Creating Directories on %s:%s",
mount_object.client_system, mount_object.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files -d 0 "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files -d 0 "
"-f 1024 -l 4 --fixed-file-size 1k %s" % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
mount_object.mountpoint))
proc = g.run_async(mount_object.client_system, cmd,
@@ -184,9 +183,9 @@ class TestQuotaRebalanceHeal(GlusterBaseClass):
# Do some more IO and check if hard limit is honoured
all_mounts_procs = []
for mount_object in self.mounts:
- cmd = ("/usr/bin/env python%d %s create_files "
+ cmd = ("/usr/bin/env python %s create_files "
"-f 100 --base-file-name file %s" % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
mount_object.mountpoint))
proc = g.run_async(mount_object.client_system, cmd,
user=mount_object.user)
diff --git a/tests/functional/quota/test_quota_single_brick_volume.py b/tests/functional/quota/test_quota_single_brick_volume.py
index 6e43e2483..33537a115 100644
--- a/tests/functional/quota/test_quota_single_brick_volume.py
+++ b/tests/functional/quota/test_quota_single_brick_volume.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2017-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,8 +14,6 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-import sys
-
from glusto.core import Glusto as g
from glustolibs.gluster.gluster_base_class import (GlusterBaseClass,
@@ -122,13 +120,13 @@ class QuotaListPathValues(GlusterBaseClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 20 "
"--max-num-of-dirs 5 "
"--num-of-files 5 %s" % (
- sys.version_info.major, self.script_upload_path,
+ self.script_upload_path,
count, mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
diff --git a/tests/functional/samba/test_stat_prefetch.py b/tests/functional/samba/test_stat_prefetch.py
index d7d4e90fe..7bd5c573f 100644
--- a/tests/functional/samba/test_stat_prefetch.py
+++ b/tests/functional/samba/test_stat_prefetch.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2017-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,9 +21,6 @@ Description:
set stat-prefetch off-on this should fail the
IO running on the mount point.
"""
-
-import sys
-
from glusto.core import Glusto as g
from glustolibs.gluster.mount_ops import mount_volume
@@ -101,10 +98,10 @@ class TestValidateCifs(GlusterBaseClass):
self.assertEqual(ret, 0, "Cifs Mount Failed")
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("/usr/bin/env python%d %s create_files -f 10000"
+ cmd = ("/usr/bin/env python %s create_files -f 10000"
" --base-file-name ctdb-cifs "
" --fixed-file-size 10k %s/samba/"
- % (sys.version_info.major, self.script_upload_path,
+ % (self.script_upload_path,
mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,