Skip to content

Commit 2f56b16

Browse files
authored
Merge pull request #830 from stefanor/multi-word-mask
tests: Support multi-word cpusets
2 parents 068a904 + b65b6ae commit 2f56b16

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/ansible/tests/affinity_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ def _get_cpus(self, path='/proc/self/status'):
179179
try:
180180
for line in fp:
181181
if line.startswith('Cpus_allowed'):
182-
return int(line.split()[1], 16)
182+
mask = line.split()[1].replace(',', '')
183+
return int(mask, 16)
183184
finally:
184185
fp.close()
185186

0 commit comments

Comments
 (0)