diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-05-26 01:01:13 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-05-26 01:01:13 +0000 |
commit | 022f50f31d48b795f1d31383cf69c0de6116910f (patch) | |
tree | 1c0948b7cdbdc6f8ef62b86c91102b86812a72f6 | |
parent | e127f2277c4436a97f5b2d74307a31af2c98297f (diff) | |
parent | 0b3267b71d73e6ac98d39b0966d908114c62b722 (diff) | |
download | swift-022f50f31d48b795f1d31383cf69c0de6116910f.tar.gz |
Merge "Fix unit tests on i386 and other archs" into stable/ocata
-rw-r--r-- | test/unit/common/test_utils.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/unit/common/test_utils.py b/test/unit/common/test_utils.py index e2289801d..48525aded 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 @@ -3562,6 +3563,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): |