From: Stefano Rivera <stefanor@debian.org>
Date: Sat, 24 Apr 2021 11:50:10 -0400
Subject: tests: Support multi-word cpusets

On systems with large numbers of CPUs, the cpuset will be larger than
one word.

Forwarded: https://github.com/mitogen-hq/mitogen/pull/830
---
 tests/ansible/tests/affinity_test.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/ansible/tests/affinity_test.py b/tests/ansible/tests/affinity_test.py
index 9572717..fa0efb6 100644
--- a/tests/ansible/tests/affinity_test.py
+++ b/tests/ansible/tests/affinity_test.py
@@ -179,7 +179,8 @@ class LinuxPolicyTest(testlib.TestCase):
         try:
             for line in fp:
                 if line.startswith('Cpus_allowed'):
-                    return int(line.split()[1], 16)
+                    mask = line.split()[1].replace(',', '')
+                    return int(mask, 16)
         finally:
             fp.close()
 
