summaryrefslogtreecommitdiffstats
path: root/tests/functional/afr/test_client_side_quorum_with_cross2.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/afr/test_client_side_quorum_with_cross2.py')
-rw-r--r--tests/functional/afr/test_client_side_quorum_with_cross2.py109
1 files changed, 53 insertions, 56 deletions
diff --git a/tests/functional/afr/test_client_side_quorum_with_cross2.py b/tests/functional/afr/test_client_side_quorum_with_cross2.py
index 86e51ef..6df722f 100644
--- a/tests/functional/afr/test_client_side_quorum_with_cross2.py
+++ b/tests/functional/afr/test_client_side_quorum_with_cross2.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
@@ -17,9 +17,6 @@
""" Description:
Test Cases in this module tests the client side quorum.
"""
-
-import sys
-
from glusto.core import Glusto as g
from glustolibs.gluster.exceptions import ExecutionError
@@ -127,9 +124,9 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
# Start IO on mounts
g.log.info("Starting IO .....")
all_mounts_procs = []
- cmd = ("/usr/bin/env python%d %s create_files "
+ cmd = ("/usr/bin/env python %s create_files "
"-f 10 --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)
@@ -165,9 +162,9 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
# create new file named newfile0.txt
g.log.info("Start creating new file on all mounts...")
all_mounts_procs = []
- cmd = ("/usr/bin/env python%d %s create_files "
+ cmd = ("/usr/bin/env python %s create_files "
"-f 1 --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)
@@ -182,8 +179,8 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
# create directory user1
g.log.info("Start creating directory on all mounts...")
all_mounts_procs = []
- cmd = "/usr/bin/env python%d %s create_deep_dir %s" % (
- sys.version_info.major, self.script_upload_path,
+ cmd = "/usr/bin/env python %s create_deep_dir %s" % (
+ self.script_upload_path,
self.mounts[0].mountpoint)
proc = g.run_async(self.mounts[0].client_system, cmd,
user=self.mounts[0].user)
@@ -253,8 +250,8 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
g.log.info("Starting reading files on all mounts")
all_mounts_procs = []
for mount_obj in self.mounts:
- cmd = "/usr/bin/env python%d %s read %s" % (
- sys.version_info.major, self.script_upload_path,
+ cmd = "/usr/bin/env python %s read %s" % (
+ self.script_upload_path,
mount_obj.mountpoint)
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
@@ -279,8 +276,8 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
# stat on dir
g.log.info("stat on directory on all mounts")
for mount_obj in self.mounts:
- cmd = "/usr/bin/env python%d %s stat %s" % (
- sys.version_info.major, self.script_upload_path,
+ cmd = "/usr/bin/env python %s stat %s" % (
+ self.script_upload_path,
mount_obj.mountpoint)
ret, _, _ = g.run(mount_obj.client_system, cmd)
self.assertFalse(ret, 'Failed to stat directory on %s'
@@ -291,8 +288,8 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
# ls on mount point
g.log.info("ls on mount point on all mounts")
for mount_obj in self.mounts:
- cmd = "/usr/bin/env python%d %s ls %s" % (
- sys.version_info.major, self.script_upload_path,
+ cmd = "/usr/bin/env python %s ls %s" % (
+ self.script_upload_path,
mount_obj.mountpoint)
ret, _, _ = g.run(mount_obj.client_system, cmd)
self.assertFalse(ret, 'Failed to ls on %s'
@@ -360,9 +357,9 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
g.log.info("Starting IO on all mounts...")
g.log.info("mounts: %s", self.mounts)
all_mounts_procs = []
- cmd = ("/usr/bin/env python%d %s create_files "
+ cmd = ("/usr/bin/env python %s create_files "
"-f 10 --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)
@@ -378,8 +375,8 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
g.log.info("Start reading files on all mounts")
all_mounts_procs = []
for mount_obj in self.mounts:
- cmd = "/usr/bin/env python%d %s read %s" % (
- sys.version_info.major, self.script_upload_path,
+ cmd = "/usr/bin/env python %s read %s" % (
+ self.script_upload_path,
mount_obj.mountpoint)
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
@@ -418,9 +415,9 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
g.log.info("Starting IO on all mounts...")
g.log.info("mounts: %s", self.mounts)
all_mounts_procs = []
- cmd = ("/usr/bin/env python%d %s create_files "
+ cmd = ("/usr/bin/env python %s create_files "
"-f 10 --base-file-name second_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)
@@ -436,8 +433,8 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
g.log.info("Start reading files on all mounts")
all_mounts_procs = []
for mount_obj in self.mounts:
- cmd = "/usr/bin/env python%d %s read %s" % (
- sys.version_info.major, self.script_upload_path,
+ cmd = "/usr/bin/env python %s read %s" % (
+ self.script_upload_path,
mount_obj.mountpoint)
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
@@ -461,9 +458,9 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
# start I/0 ( write and read ) - must succeed
g.log.info("Starting IO on mount.....")
all_mounts_procs = []
- cmd = ("/usr/bin/env python%d %s create_files "
+ cmd = ("/usr/bin/env python %s create_files "
"-f 10 --base-file-name third_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)
@@ -479,8 +476,8 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
g.log.info("Start reading files on all mounts")
all_mounts_procs = []
for mount_obj in self.mounts:
- cmd = "/usr/bin/env python%d %s read %s" % (
- sys.version_info.major, self.script_upload_path,
+ cmd = "/usr/bin/env python %s read %s" % (
+ self.script_upload_path,
mount_obj.mountpoint)
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
@@ -504,9 +501,9 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
# start I/0 ( write and read ) - read must pass, write will fail
g.log.info("Starting IO on mount......")
all_mounts_procs = []
- cmd = ("/usr/bin/env python%d %s create_files "
+ cmd = ("/usr/bin/env python %s create_files "
"-f 10 --base-file-name fourth_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)
@@ -524,8 +521,8 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
g.log.info("Start reading files on all mounts")
all_mounts_procs = []
for mount_obj in self.mounts:
- cmd = "/usr/bin/env python%d %s read %s" % (
- sys.version_info.major, self.script_upload_path,
+ cmd = "/usr/bin/env python %s read %s" % (
+ self.script_upload_path,
mount_obj.mountpoint)
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
@@ -550,9 +547,9 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
# start I/0 ( write and read ) - must succeed
g.log.info("Starting IO on mount.....")
all_mounts_procs = []
- cmd = ("/usr/bin/env python%d %s create_files "
+ cmd = ("/usr/bin/env python %s create_files "
"-f 10 --base-file-name fifth_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)
@@ -568,8 +565,8 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
g.log.info("Start reading files on all mounts")
all_mounts_procs = []
for mount_obj in self.mounts:
- cmd = "/usr/bin/env python%d %s read %s" % (
- sys.version_info.major, self.script_upload_path,
+ cmd = "/usr/bin/env python %s read %s" % (
+ self.script_upload_path,
mount_obj.mountpoint)
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
@@ -593,9 +590,9 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
# start I/0 ( write and read ) - read must pass, write will fail
g.log.info("Start creating files on mounts.....")
all_mounts_procs = []
- cmd = ("/usr/bin/env python%d %s create_files "
+ cmd = ("/usr/bin/env python %s create_files "
"-f 10 --base-file-name sixth_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)
@@ -613,8 +610,8 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
g.log.info("Start reading files on all mounts")
all_mounts_procs = []
for mount_obj in self.mounts:
- cmd = "/usr/bin/env python%d %s read %s" % (
- sys.version_info.major, self.script_upload_path,
+ cmd = "/usr/bin/env python %s read %s" % (
+ self.script_upload_path,
mount_obj.mountpoint)
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
@@ -638,9 +635,9 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
# start I/0 ( write and read ) - must succeed
g.log.info("Starting IO on mount.....")
all_mounts_procs = []
- cmd = ("/usr/bin/env python%d %s create_files "
+ cmd = ("/usr/bin/env python %s create_files "
"-f 10 --base-file-name seventh_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)
@@ -656,8 +653,8 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
g.log.info("Start reading files on all mounts")
all_mounts_procs = []
for mount_obj in self.mounts:
- cmd = "/usr/bin/env python%d %s read %s" % (
- sys.version_info.major, self.script_upload_path,
+ cmd = "/usr/bin/env python %s read %s" % (
+ self.script_upload_path,
mount_obj.mountpoint)
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
@@ -682,9 +679,9 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
# start I/0 ( write and read ) - must succeed
g.log.info("Starting IO on mount.....")
all_mounts_procs = []
- cmd = ("/usr/bin/env python%d %s create_files "
+ cmd = ("/usr/bin/env python %s create_files "
"-f 10 --base-file-name eigth_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)
@@ -700,8 +697,8 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
g.log.info("Start reading files on all mounts")
all_mounts_procs = []
for mount_obj in self.mounts:
- cmd = "/usr/bin/env python%d %s read %s" % (
- sys.version_info.major, self.script_upload_path,
+ cmd = "/usr/bin/env python %s read %s" % (
+ self.script_upload_path,
mount_obj.mountpoint)
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
@@ -735,9 +732,9 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
# start I/0 ( write and read ) - read must pass, write will fail
g.log.info("Start creating files on mounts.....")
all_mounts_procs = []
- cmd = ("/usr/bin/env python%d %s create_files "
+ cmd = ("/usr/bin/env python %s create_files "
"-f 10 --base-file-name ninth_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)
@@ -755,8 +752,8 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
g.log.info("Start reading files on all mounts")
all_mounts_procs = []
for mount_obj in self.mounts:
- cmd = "/usr/bin/env python%d %s read %s" % (
- sys.version_info.major, self.script_upload_path,
+ cmd = "/usr/bin/env python %s read %s" % (
+ self.script_upload_path,
mount_obj.mountpoint)
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
@@ -780,9 +777,9 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
# start I/0 ( write and read ) - must succeed
g.log.info("Starting IO on mount.....")
all_mounts_procs = []
- cmd = ("/usr/bin/env python%d %s create_files "
+ cmd = ("/usr/bin/env python %s create_files "
"-f 10 --base-file-name tenth_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)
@@ -798,8 +795,8 @@ class ClientSideQuorumCross2Tests(GlusterBaseClass):
g.log.info("Start reading files on all mounts")
all_mounts_procs = []
for mount_obj in self.mounts:
- cmd = "/usr/bin/env python%d %s read %s" % (
- sys.version_info.major, self.script_upload_path,
+ cmd = "/usr/bin/env python %s read %s" % (
+ self.script_upload_path,
mount_obj.mountpoint)
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)