Skip to content

Commit 24b1039

Browse files
authored
Merge pull request #3063 from PraveenPenguin/fix_mem
Fix mem
2 parents 3f26df9 + d84114a commit 24b1039

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

memory/memhotplug.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def setUp(self):
9999
for package in ['automake', 'make', 'autoconf']:
100100
if not smm.check_installed(package) and not smm.install(package):
101101
self.cancel('%s is needed for the test to be run' % package)
102-
default_url = 'https://fossies.org/linux/privat/old/stress-1.0.5.tar.gz'
102+
default_url = 'https://fossies.org/linux/privat/stress-1.0.7.tar.gz'
103103
stress_tar_url = self.params.get('stress_tar_url', default=default_url)
104104
if not smm.check_installed('stress') and not smm.install('stress'):
105105
tarball = self.fetch_asset(stress_tar_url)
@@ -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)