new release

rebased tuned to latest upstream
    resolves: rhbz#1792264
  oracle: turned off NUMA balancing
    resolves: rhbz#1782233
  man: documented the possibility to apply multiple profiles
    resolves: rhbz#1794337
  cpu-partitioning: disabled kernel.timer_migration
    resolves: rhbz#1797629
  profiles: new profile optimize-serial-console
    resolves: rhbz#1840689
  added support for a post-loaded profile
    resolves: rhbz#1798183
  plugins: new irqbalance plugin
    resolves: rhbz#1784645
  throughput-performance: added architecture specific tuning for Marvell ThunderX
    resolves: rhbz#1746961
  throughput-performance: added architecture specific tuning for AMD
    resolves: rhbz#1746957
  scheduler: added support for cgroups
    resolves: rhbz#1784648
This commit is contained in:
Jaroslav Škarvada 2020-06-09 11:07:58 +02:00
parent 27f62f70c1
commit da0e0d5ffc
3 changed files with 42 additions and 297 deletions

288
249.patch
View File

@ -1,288 +0,0 @@
From 2399aa3b2de67e0d8134bc2964c63121e5c4173f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Tue, 25 Feb 2020 19:59:25 +0100
Subject: [PATCH] Remove usage of unittest2, use unittest from the standard
library
Fixes https://github.com/redhat-performance/tuned/issues/241
Fedora is removing the unittest2 package: https://bugzilla.redhat.com/show_bug.cgi?id=1794222
tuned is not targeting Python 2.6: https://github.com/redhat-performance/tuned/issues/241#issuecomment-588320175
One thing not present in Python 2.7 is assertItemsEqual() -- renamed to assertCountEqual().
Related, mock was also listed as a requirement in the spec file,
but all the imports are from unittest.mock, hence removed.
---
tests/unit/exports/test_controller.py | 4 ++--
tests/unit/hardware/test_device_matcher.py | 4 ++--
tests/unit/hardware/test_device_matcher_udev.py | 4 ++--
tests/unit/hardware/test_inventory.py | 9 ++++++---
tests/unit/monitors/test_base.py | 4 ++--
tests/unit/plugins/test_base.py | 4 ++--
tests/unit/profiles/test_loader.py | 4 ++--
tests/unit/profiles/test_locator.py | 4 ++--
tests/unit/profiles/test_merger.py | 4 ++--
tests/unit/profiles/test_profile.py | 4 ++--
tests/unit/profiles/test_unit.py | 4 ++--
tests/unit/utils/test_commands.py | 4 ++--
tests/unit/utils/test_global_config.py | 4 ++--
tuned.spec | 2 +-
14 files changed, 31 insertions(+), 28 deletions(-)
diff --git a/tests/unit/exports/test_controller.py b/tests/unit/exports/test_controller.py
index af2e0176..333cff59 100644
--- a/tests/unit/exports/test_controller.py
+++ b/tests/unit/exports/test_controller.py
@@ -1,10 +1,10 @@
-import unittest2
+import unittest
from unittest.mock import Mock
from tuned.exports.controller import ExportsController
import tuned.exports as exports
-class ControllerTestCase(unittest2.TestCase):
+class ControllerTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls._controller = ExportsController()
diff --git a/tests/unit/hardware/test_device_matcher.py b/tests/unit/hardware/test_device_matcher.py
index 1987eb66..d3e879f3 100644
--- a/tests/unit/hardware/test_device_matcher.py
+++ b/tests/unit/hardware/test_device_matcher.py
@@ -1,7 +1,7 @@
-import unittest2
+import unittest
from tuned.hardware.device_matcher import DeviceMatcher
-class DeviceMatcherTestCase(unittest2.TestCase):
+class DeviceMatcherTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.matcher = DeviceMatcher()
diff --git a/tests/unit/hardware/test_device_matcher_udev.py b/tests/unit/hardware/test_device_matcher_udev.py
index 8e93428e..19039556 100644
--- a/tests/unit/hardware/test_device_matcher_udev.py
+++ b/tests/unit/hardware/test_device_matcher_udev.py
@@ -1,9 +1,9 @@
-import unittest2
+import unittest
import pyudev
from tuned.hardware.device_matcher_udev import DeviceMatcherUdev
-class DeviceMatcherUdevTestCase(unittest2.TestCase):
+class DeviceMatcherUdevTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.udev_context = pyudev.Context()
diff --git a/tests/unit/hardware/test_inventory.py b/tests/unit/hardware/test_inventory.py
index 00f8def0..f8a02402 100644
--- a/tests/unit/hardware/test_inventory.py
+++ b/tests/unit/hardware/test_inventory.py
@@ -1,4 +1,4 @@
-import unittest2
+import unittest
from unittest.mock import Mock
import pyudev
@@ -6,7 +6,7 @@
subsystem_name = "test subsystem"
-class InventoryTestCase(unittest2.TestCase):
+class InventoryTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls._context = pyudev.Context()
@@ -25,7 +25,10 @@ def test_get_device(self):
def test_get_devices(self):
device_list1 = self._context.list_devices(subsystem = "tty")
device_list2 = self._inventory.get_devices("tty")
- self.assertItemsEqual(device_list1,device_list2)
+ try:
+ self.assertCountEqual(device_list1,device_list2)
+ except AttributeError: # Python 2
+ self.assertItemsEqual(device_list1,device_list2)
def test_subscribe(self):
self._inventory.subscribe(self._dummy,subsystem_name,
diff --git a/tests/unit/monitors/test_base.py b/tests/unit/monitors/test_base.py
index 2d6e82c7..8b45fdae 100644
--- a/tests/unit/monitors/test_base.py
+++ b/tests/unit/monitors/test_base.py
@@ -1,4 +1,4 @@
-import unittest2
+import unittest
import tuned.monitors.base
class MockMonitor(tuned.monitors.base.Monitor):
@@ -12,7 +12,7 @@ def update(cls):
cls._load.setdefault(device, 0)
cls._load[device] += 1
-class MonitorBaseClassTestCase(unittest2.TestCase):
+class MonitorBaseClassTestCase(unittest.TestCase):
def test_fail_base_class_init(self):
with self.assertRaises(NotImplementedError):
tuned.monitors.base.Monitor()
diff --git a/tests/unit/plugins/test_base.py b/tests/unit/plugins/test_base.py
index b49f98ec..fdbf6cf4 100644
--- a/tests/unit/plugins/test_base.py
+++ b/tests/unit/plugins/test_base.py
@@ -3,7 +3,7 @@
except ImportError:
from collections import Mapping
import tempfile
-import unittest2
+import unittest
from tuned.monitors.repository import Repository
import tuned.plugins.decorators as decorators
@@ -26,7 +26,7 @@
storage_provider = storage.PickleProvider()
storage_factory = storage.Factory(storage_provider)
-class PluginBaseTestCase(unittest2.TestCase):
+class PluginBaseTestCase(unittest.TestCase):
def setUp(self):
self._plugin = DummyPlugin(monitors_repository,storage_factory,\
hardware_inventory,device_matcher,device_matcher_udev,\
diff --git a/tests/unit/profiles/test_loader.py b/tests/unit/profiles/test_loader.py
index 1f4ed658..b6ea76e9 100644
--- a/tests/unit/profiles/test_loader.py
+++ b/tests/unit/profiles/test_loader.py
@@ -1,4 +1,4 @@
-import unittest2
+import unittest
import tempfile
import shutil
import os
@@ -6,7 +6,7 @@
import tuned.profiles as profiles
from tuned.profiles.exceptions import InvalidProfileException
-class LoaderTestCase(unittest2.TestCase):
+class LoaderTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls._test_dir = tempfile.mkdtemp()
diff --git a/tests/unit/profiles/test_locator.py b/tests/unit/profiles/test_locator.py
index 6ab7c5ec..741abdc1 100644
--- a/tests/unit/profiles/test_locator.py
+++ b/tests/unit/profiles/test_locator.py
@@ -1,10 +1,10 @@
-import unittest2
+import unittest
import os
import shutil
import tempfile
from tuned.profiles.locator import Locator
-class LocatorTestCase(unittest2.TestCase):
+class LocatorTestCase(unittest.TestCase):
def setUp(self):
self.locator = Locator(self._tmp_load_dirs)
diff --git a/tests/unit/profiles/test_merger.py b/tests/unit/profiles/test_merger.py
index 6023b26f..7b91d675 100644
--- a/tests/unit/profiles/test_merger.py
+++ b/tests/unit/profiles/test_merger.py
@@ -1,9 +1,9 @@
-import unittest2
+import unittest
from tuned.profiles.merger import Merger
from tuned.profiles.profile import Profile
from collections import OrderedDict
-class MergerTestCase(unittest2.TestCase):
+class MergerTestCase(unittest.TestCase):
def test_merge_without_replace(self):
merger = Merger()
config1 = OrderedDict([
diff --git a/tests/unit/profiles/test_profile.py b/tests/unit/profiles/test_profile.py
index 8f43e3d2..e5c85c94 100644
--- a/tests/unit/profiles/test_profile.py
+++ b/tests/unit/profiles/test_profile.py
@@ -1,4 +1,4 @@
-import unittest2
+import unittest
import tuned.profiles
import collections
@@ -6,7 +6,7 @@ class MockProfile(tuned.profiles.profile.Profile):
def _create_unit(self, name, config):
return (name, config)
-class ProfileTestCase(unittest2.TestCase):
+class ProfileTestCase(unittest.TestCase):
def test_init(self):
MockProfile("test", {})
diff --git a/tests/unit/profiles/test_unit.py b/tests/unit/profiles/test_unit.py
index 34bfd0a5..d63ff0c1 100644
--- a/tests/unit/profiles/test_unit.py
+++ b/tests/unit/profiles/test_unit.py
@@ -1,7 +1,7 @@
-import unittest2
+import unittest
from tuned.profiles import Unit
-class UnitTestCase(unittest2.TestCase):
+class UnitTestCase(unittest.TestCase):
def test_default_options(self):
unit = Unit("sample", {})
diff --git a/tests/unit/utils/test_commands.py b/tests/unit/utils/test_commands.py
index 09502036..d63556ee 100644
--- a/tests/unit/utils/test_commands.py
+++ b/tests/unit/utils/test_commands.py
@@ -1,4 +1,4 @@
-import unittest2
+import unittest
import tempfile
import shutil
import re
@@ -9,7 +9,7 @@
from tuned.exceptions import TunedException
import tuned.utils.commands
-class CommandsTestCase(unittest2.TestCase):
+class CommandsTestCase(unittest.TestCase):
def setUp(self):
self._commands = commands()
self._test_dir = tempfile.mkdtemp()
diff --git a/tests/unit/utils/test_global_config.py b/tests/unit/utils/test_global_config.py
index d2a98895..5b93888c 100644
--- a/tests/unit/utils/test_global_config.py
+++ b/tests/unit/utils/test_global_config.py
@@ -1,4 +1,4 @@
-import unittest2
+import unittest
import tempfile
import shutil
import os
@@ -6,7 +6,7 @@
import tuned.consts as consts
import tuned.utils.global_config as global_config
-class GlobalConfigTestCase(unittest2.TestCase):
+class GlobalConfigTestCase(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.test_dir = tempfile.mkdtemp()
diff --git a/tuned.spec b/tuned.spec
index 618d42d5..ba8d5f97 100644
--- a/tuned.spec
+++ b/tuned.spec
@@ -60,7 +60,7 @@ Requires(preun): systemd
Requires(postun): systemd
BuildRequires: %{_py}, %{_py}-devel
# BuildRequires for 'make test'
-BuildRequires: %{_py}-unittest2, %{_py}-configobj, %{_py}-mock
+BuildRequires: %{_py}-configobj
BuildRequires: %{_py}-decorator, %{_py}-pyudev
Requires: %{_py}-decorator, %{_py}-pyudev, %{_py}-configobj
Requires: %{_py}-schedutils, %{_py}-linux-procfs, %{_py}-perf

View File

@ -1 +1 @@
SHA512 (tuned-2.13.0.tar.gz) = d81b0a80f911fe808ca324319da3e42c3c15196c0c37343d33b45c2b34f33e205e2913d77ffda8598379a91ef72ab73d88d7b83a4684b6a067e3f36d98a85927
SHA512 (tuned-2.14.0-rc.1.tar.gz) = 1e9a5377f76f59b8b33c427b96855cd5b0cb7803187f17df7a3327ab6fce7436c61c39bcaee41493545d9be9158e16fdd7568b5a06262ba4d0c1dcb15fc98256

View File

@ -25,23 +25,19 @@
%endif
%endif
#%%global prerelease rc
#%%global prereleasenum 1
%global prerelease rc
%global prereleasenum 1
%global prerel1 %{?prerelease:.%{prerelease}%{prereleasenum}}
%global prerel2 %{?prerelease:-%{prerelease}.%{prereleasenum}}
Summary: A dynamic adaptive system tuning daemon
Name: tuned
Version: 2.13.0
Release: 4%{?prerel1}%{?dist}
Version: 2.14.0
Release: 0.1%{?prerel1}%{?dist}
License: GPLv2+
Source0: https://github.com/redhat-performance/%{name}/archive/v%{version}%{?prerel2}/%{name}-%{version}%{?prerel2}.tar.gz
# Remove usage of unittest2, use unittest from the standard library
# Merged upstream
Patch1: https://github.com/redhat-performance/tuned/pull/249.patch
URL: http://www.tuned-project.org/
BuildArch: noarch
BuildRequires: systemd, desktop-file-utils
@ -191,6 +187,7 @@ Summary: Additional tuned profile(s) targeted to Network Function Virtualization
Requires: %{name} = %{version}
Requires: %{name}-profiles-realtime = %{version}
Requires: tuna
Requires: nmap-ncat
%if 0%{?rhel} == 7
Requires: qemu-kvm-tools-rhev
%else
@ -217,6 +214,13 @@ Requires: %{name} = %{version}
%description profiles-cpu-partitioning
Additional tuned profile(s) optimized for CPU partitioning.
%package profiles-spectrumscale
Summary: Additional tuned profile(s) optimized for IBM Spectrum Scale
Requires: %{name} = %{version}
%description profiles-spectrumscale
Additional tuned profile(s) optimized for IBM Spectrum Scale.
%package profiles-compat
Summary: Additional tuned profiles mainly for backward compatibility with tuned 1.0
Requires: %{name} = %{version}
@ -372,6 +376,7 @@ fi
%exclude %{_prefix}/lib/tuned/realtime-virtual-guest
%exclude %{_prefix}/lib/tuned/realtime-virtual-host
%exclude %{_prefix}/lib/tuned/cpu-partitioning
%exclude %{_prefix}/lib/tuned/spectrumscale-ece
%{_prefix}/lib/tuned
%dir %{_sysconfdir}/tuned
%dir %{_sysconfdir}/tuned/recommend.d
@ -379,6 +384,7 @@ fi
%{_libexecdir}/tuned/defirqaffinity*
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/tuned/active_profile
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/tuned/profile_mode
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/tuned/post_loaded_profile
%config(noreplace) %{_sysconfdir}/tuned/tuned-main.conf
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/tuned/bootcmdline
%{_sysconfdir}/dbus-1/system.d/com.redhat.tuned.conf
@ -470,6 +476,10 @@ fi
%{_prefix}/lib/tuned/cpu-partitioning
%{_mandir}/man7/tuned-profiles-cpu-partitioning.7*
%files profiles-spectrumscale
%{_prefix}/lib/tuned/spectrumscale-ece
%{_mandir}/man7/tuned-profiles-spectrumscale-ece.7*
%files profiles-compat
%{_prefix}/lib/tuned/default
%{_prefix}/lib/tuned/desktop-powersave
@ -481,6 +491,29 @@ fi
%{_mandir}/man7/tuned-profiles-compat.7*
%changelog
* Mon Jun 8 2020 Jaroslav Škarvada <jskarvad@redhat.com> - 2.14.0-0.1.rc1
- new release
- rebased tuned to latest upstream
resolves: rhbz#1792264
- oracle: turned off NUMA balancing
resolves: rhbz#1782233
- man: documented the possibility to apply multiple profiles
resolves: rhbz#1794337
- cpu-partitioning: disabled kernel.timer_migration
resolves: rhbz#1797629
- profiles: new profile optimize-serial-console
resolves: rhbz#1840689
- added support for a post-loaded profile
resolves: rhbz#1798183
- plugins: new irqbalance plugin
resolves: rhbz#1784645
- throughput-performance: added architecture specific tuning for Marvell ThunderX
resolves: rhbz#1746961
- throughput-performance: added architecture specific tuning for AMD
resolves: rhbz#1746957
- scheduler: added support for cgroups
resolves: rhbz#1784648
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.13.0-4
- Rebuilt for Python 3.9