Skip to content

Commit d84114a

Browse files
Rectified script to comply with PEP8 standards
Updated the script to align with PEP8 coding guidelines. Changes include fixing indentation, spacing, line length, and other formatting issues to improve readability and maintainability. Signed-off-by: Praveen K Pandey <[email protected]>
1 parent f0cc69b commit d84114a

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

memory/memhotplug.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ def setUp(self):
110110
os.chdir(self.sourcedir)
111111
for package in ['automake', 'make', 'autoconf']:
112112
if not smm.check_installed(package) and not smm.install(package):
113-
self.cancel('%s is needed for the test to be run' % package)
113+
self.cancel(
114+
'%s is needed for the test to be run' % package)
114115
process.run('./autogen.sh', shell=True)
115116
process.run('[ -x configure ] && ./configure', shell=True)
116117
build.make(self.sourcedir)
@@ -163,7 +164,9 @@ def run_stress(self):
163164
mem_free = memory.meminfo.MemFree.m // 4
164165
cpu_count = int(multiprocessing.cpu_count()) // 2
165166
process.run("stress --cpu %s --io %s --vm %s --vm-bytes %sM --timeout %ss" %
166-
(cpu_count, self.iocount, self.vmcount, mem_free, self.stresstime), ignore_status=True, sudo=True, shell=True)
167+
(cpu_count, self.iocount, self.vmcount,
168+
mem_free, self.stresstime), ignore_status=True,
169+
sudo=True, shell=True)
167170

168171
def test_hotplug_loop(self):
169172
self.log.info("\nTEST: hotunplug and hotplug in a loop\n")
@@ -192,11 +195,13 @@ def test_hotplug_toggle(self):
192195

193196
def test_dlpar_mem_hotplug(self):
194197
if 'power' in cpu.get_arch() and 'PowerNV' not in open('/proc/cpuinfo', 'r').read():
195-
if b"mem_dlpar=yes" in process.system_output("drmgr -C", ignore_status=True, shell=True):
198+
if b"mem_dlpar=yes" in process.system_output("drmgr -C",
199+
ignore_status=True, shell=True):
196200
self.log.info("\nDLPAR remove memory operation\n")
197201
for _ in range(len(self.blocks_hotpluggable) // 2):
198202
process.run(
199-
"drmgr -c mem -d 5 -w 30 -r", shell=True, ignore_status=True, sudo=True)
203+
"drmgr -c mem -d 5 -w 30 -r", shell=True,
204+
ignore_status=True, sudo=True)
200205
self.run_stress()
201206
self.log.info("\nDLPAR add memory operation\n")
202207
for _ in range(len(self.blocks_hotpluggable) // 2):

0 commit comments

Comments
 (0)