diff --git a/test/unit/common/test_utils.py b/test/unit/common/test_utils.py index 63d1e563a7..25926f2ed1 100644 --- a/test/unit/common/test_utils.py +++ b/test/unit/common/test_utils.py @@ -53,6 +53,7 @@ from functools import partial from tempfile import TemporaryFile, NamedTemporaryFile, mkdtemp from netifaces import AF_INET6 from mock import MagicMock, patch +from nose import SkipTest from six.moves.configparser import NoSectionError, NoOptionError from uuid import uuid4 @@ -3612,6 +3613,12 @@ cluster_dfw1 = http://dfw1.host/v1/ def _fake_syscall(*args): called['syscall'] = args + # Test if current architecture supports changing of priority + try: + utils.NR_ioprio_set() + except OSError as e: + raise SkipTest(e) + with patch('swift.common.utils._libc_setpriority', _fake_setpriority), \ patch('swift.common.utils._posix_syscall', _fake_syscall):