diff --git a/rteval-Fix-missing-statistics-for-system-with-timerl.patch b/rteval-Fix-missing-statistics-for-system-with-timerl.patch new file mode 100644 index 0000000..fb9a830 --- /dev/null +++ b/rteval-Fix-missing-statistics-for-system-with-timerl.patch @@ -0,0 +1,91 @@ +From 5edb31a58bea3c2433e817439e053b79221a06df Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Fri, 13 Dec 2024 15:07:09 -0500 +Subject: [PATCH] rteval: Fix missing statistics for system with timerlat + +Fix missing statistics for the system with timerlat by fixing the test +in rteval_test.xsl for stoptrace_invoked + +In addition +- Add --no-summary to the rtla command line +- Parse out "ALL:" for good measure although this should be surpressed + with the --no-summary command line option. +- timerlat reports stop tracing when receiving a SIGINT, so also check + whether the maximum value is greater than the --timerlat-stoptrace value + +Tested the following scenarios. +- timerlat-stoptrace USEC is NOT used +- timerlat-stoptrace USEC is used AND the max value recorded is greater + than the value to trigger stop tracing +- timerlat-stoptrace USEC is used AND the max value recorded is not + greater than the value to trigger stop tracing + +Signed-off-by: John Kacur +--- + rteval/modules/measurement/timerlat.py | 14 +++++++++++--- + rteval/rteval_text.xsl | 2 +- + 2 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/rteval/modules/measurement/timerlat.py b/rteval/modules/measurement/timerlat.py +index 3fcdb5ff2819..5bfc495217ea 100644 +--- a/rteval/modules/measurement/timerlat.py ++++ b/rteval/modules/measurement/timerlat.py +@@ -230,6 +230,7 @@ class Timerlat(rtevalModulePrototype): + self.__cmd = ['rtla', 'timerlat', 'hist', self.__interval, '-P', f'f:{int(self.__priority)}', '-u'] + self.__cmd.append(f'-c{self.__cpulist}') + self.__cmd.append(f'-E{self.__buckets}') ++ self.__cmd.append('--no-summary') + + if self.__cfg.stoptrace: + self.__cmd.append(f"-T{int(self.__cfg.stoptrace)}") +@@ -392,6 +393,10 @@ class Timerlat(rtevalModulePrototype): + self.__stoptrace = True + self.__posttrace += line + continue ++ elif line.startswith('ALL:'): ++ # We should only see 'ALL:' without timerlat --no-summary ++ # print(line) ++ continue + else: + #print(line) + pass +@@ -424,17 +429,20 @@ class Timerlat(rtevalModulePrototype): + for n in list(self.__timerlatdata.keys()): + self.__timerlatdata[n].reduce() + +- self.__timerlat_out.close() +- + self._setFinished() + self.__started = False + ++ self.__timerlat_err.close() ++ self.__timerlat_out.close() ++ + def MakeReport(self): + rep_n = libxml2.newNode('timerlat') + rep_n.newProp('command_line', ' '.join(self.__cmd)) + ++ max_val = self.__timerlatdata['system'].max ++ + stoptrace_invoked_n = libxml2.newNode('stoptrace_invoked') +- if self.stcpu != -1: ++ if self.stcpu != -1 and max_val > int(self.__cfg.stoptrace): + stoptrace_invoked_n.newProp("invoked", "true") + else: + stoptrace_invoked_n.newProp("invoked", "") +diff --git a/rteval/rteval_text.xsl b/rteval/rteval_text.xsl +index 70f3e0fd4b1c..146302744f58 100644 +--- a/rteval/rteval_text.xsl ++++ b/rteval/rteval_text.xsl +@@ -342,7 +342,7 @@ + + + +- ++ + Statistics: + + +-- +2.47.1 + diff --git a/rteval.spec b/rteval.spec index e664285..116a468 100644 --- a/rteval.spec +++ b/rteval.spec @@ -1,6 +1,6 @@ Name: rteval Version: 3.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Utility to evaluate system suitability for RT Linux Group: Development/Tools @@ -34,6 +34,7 @@ Requires: rtla BuildArch: noarch # Patches +Patch1: rteval-Fix-missing-statistics-for-system-with-timerl.patch %description The rteval script is a utility for measuring various aspects of @@ -45,7 +46,7 @@ a statistical analysis of the event response times is done and printed to the screen. %prep -%autosetup -p1 +%autosetup -v -p1 %build %{__python3} setup.py build @@ -66,6 +67,10 @@ to the screen. %{_bindir}/rteval %changelog +* Fri Dec 13 2024 John Kacur - 3.9-2 +- Fix missing system statistics +Resolves: RHEL-70167 + * Fri Nov 15 2024 John Kacur - 3.9-1 - Rebase to upstream rteval-3.9 Resolves: RHEL-65483