Makefile: Remove non-distutil install leftovers
PATCH 1/3 Makefile: Remove non-distutil install leftovers
setup.py installs into /usr/local by default, but the makefile is still creating directories in /usr that it doesn't install anything into. Worse, the uninstall target removes things from /usr rather than what was installed by "make install".
--- Makefile | 14 -------------- 1 file changed, 14 deletions(-)
Makefile +0 -14
@@ -15,9 +15,6 @@ XMLRPCDIR := server DESTDIR := PREFIX := /usr DATADIR := $(DESTDIR)/$(PREFIX)/share -CONFDIR := $(DESTDIR)/etc -MANDIR := $(DESTDIR)/$(PREFIX)/share/man -PYLIB := $(DESTDIR)$(shell $(PYTHON) -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()') LOADDIR := loadsource KLOAD := $(LOADDIR)/linux-5.1.tar.xz
@@ -60,17 +57,6 @@ install_loads: $(LOADS) installdirs: [ -d $(DATADIR)/rteval ] || mkdir -p $(DATADIR)/rteval - [ -d $(CONFDIR) ] || mkdir -p $(CONFDIR) - [ -d $(MANDIR)/man8 ] || mkdir -p $(MANDIR)/man8 - [ -d $(PYLIB) ] || mkdir -p $(PYLIB) - [ -d $(DESTDIR)/usr/bin ] || mkdir -p $(DESTDIR)/usr/bin - -uninstall: - rm -f /usr/bin/rteval - rm -f $(CONFDIR)/rteval.conf - rm -f $(MANDIR)/man8/rteval.8.gz - rm -rf $(PYLIB)/rteval - rm -rf $(DATADIR)/rteval tarfile: rteval-$(VERSION).tar.bz2
Signature · 1 line
2.18.2
PATCH 2/3 Makefile: Use parentheses around print args
Otherwise, this fails on python3.
--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
@@ -5,7 +5,7 @@ else PYTHON = python2 endif PACKAGE := rteval -VERSION := $(shell $(PYTHON) -c "from rteval import RTEVAL_VERSION; print RTEVAL_VERSION") +VERSION := $(shell $(PYTHON) -c "from rteval import RTEVAL_VERSION; print(RTEVAL_VERSION)") D := 10 # XML-RPC related files
Signature · 1 line
2.18.2
Re: [RTEVAL PATCH 2/3] Makefile: Use parentheses around print args
Quoted 24 lines · Scott Wood
Otherwise, this fails on python3.
Signed-off-by Scott Wood <[email protected]>--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Makefile +1
-1@@ -5,7 +5,7 @@ else PYTHON = python2 endif PACKAGE := rteval -VERSION := $(shell $(PYTHON) -c "from rteval import RTEVAL_VERSION; print RTEVAL_VERSION") +VERSION := $(shell $(PYTHON) -c "from rteval import RTEVAL_VERSION; print(RTEVAL_VERSION)") D := 10 # XML-RPC related filesSignature · 1 line
2.18.2
Tested by running the default target (runit)
Thanks for fixing
PATCH 3/3 modules: Don't abort if a workload isn't running
In reply to Scott WoodEach module is responsible for respawning the load when it finishes. The only thing that the additional check at the rtevalModulePrototype level accomplishes is introducing a race condition that will kill rteval if a load ends after _WorkloadTask() checks, but before the check in the caller.
--- rteval/modules/__init__.py | 3 --- 1 file changed, 3 deletions(-)
rteval/modules/__init__.py +0 -3
@@ -189,9 +189,6 @@ class rtevalModulePrototype(threading.Thread): if self.shouldStop(): break - if not self.WorkloadAlive(): - self._log(Log.DEBUG, "%s workload stopped running." % self._module_type) - break time.sleep(self.__sleeptime) self.__timestamps["runloop_stop"] = datetime.now()
Signature · 1 line
2.18.2
Re: [RTEVAL PATCH 3/3] modules: Don't abort if a workload isn't running
Quoted 29 lines · Scott Wood
Each module is responsible for respawning the load when it finishes. The only thing that the additional check at the rtevalModulePrototype level accomplishes is introducing a race condition that will kill rteval if a load ends after
_WorkloadTask()checks, but before the check in the caller.Signed-off-by Scott Wood <[email protected]>--- rteval/modules/__init__.py | 3 --- 1 file changed, 3 deletions(-)rteval/modules/__init__.py +0
-3@@ -189,9 +189,6 @@ class rtevalModulePrototype(threading.Thread): if self.shouldStop(): break - if not self.WorkloadAlive(): - self._log(Log.DEBUG, "%s workload stopped running." % self._module_type) - break time.sleep(self.__sleeptime) self.__timestamps["runloop_stop"] = datetime.now()Signature · 1 line
2.18.2
Quoted 46 lines · Scott Wood
setup.pyinstalls into/usr/localby default, but the makefile is still creating directories in /usr that it doesn't install anything into. Worse, the uninstall target removes things from /usr rather than what was installed by "make install".Signed-off-by Scott Wood <[email protected]>--- Makefile | 14 -------------- 1 file changed, 14 deletions(-)Makefile +0
-14@@ -15,9 +15,6 @@ XMLRPCDIR := server DESTDIR := PREFIX := /usr DATADIR := $(DESTDIR)/$(PREFIX)/share -CONFDIR := $(DESTDIR)/etc -MANDIR := $(DESTDIR)/$(PREFIX)/share/man -PYLIB := $(DESTDIR)$(shell $(PYTHON) -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()') LOADDIR := loadsource KLOAD := $(LOADDIR)/linux-5.1.tar.xz@@ -60,17 +57,6 @@ install_loads: $(LOADS) installdirs: [ -d $(DATADIR)/rteval ] || mkdir -p $(DATADIR)/rteval - [ -d $(CONFDIR) ] || mkdir -p $(CONFDIR) - [ -d $(MANDIR)/man8 ] || mkdir -p $(MANDIR)/man8 - [ -d $(PYLIB) ] || mkdir -p $(PYLIB) - [ -d $(DESTDIR)/usr/bin ] || mkdir -p $(DESTDIR)/usr/bin - -uninstall: - rm -f /usr/bin/rteval - rm -f $(CONFDIR)/rteval.conf - rm -f $(MANDIR)/man8/rteval.8.gz - rm -rf $(PYLIB)/rteval - rm -rf $(DATADIR)/rteval tarfile: rteval-$(VERSION).tar.bz2Signature · 1 line
2.18.2
As you've probably guessed, the distribution spec file doesn't use the Makefile at all when installing, just setup.py
This is left over from when Clark and David were first writing this.
The default target in the Makefile is runit
Which is a great way to do sanity check after creating patches, so I would like that to work - which your next patch does do. This stuff should be cleaned-up though, so
For people who are reading this and don't know what rteval is, it's a program that runs cyclictest as a measurement thread on various cpus while running various programs a loads at the same time.
Mostly it works quite well, but in some spots the code is pretty rough. Not all of the upstream code is packaged for distributing, so if you see code that doesn't work in python3, that's probably why, it's not currently shipped.
This is all open source, so anyone is welcome to look at it and send us patches. It's available at
git://git.kernel.org/pub/scm/utils/rteval/rteval