Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rt-tests for openSUSE:Factory 
checked in at 2026-10-21 21:02:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rt-tests (Old)
 and      /work/SRC/openSUSE:Factory/.rt-tests.new.2252680 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rt-tests"

Wed Oct 21 21:02:00 2026 rev:16 rq:1386807 version:2.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/rt-tests/rt-tests.changes        2026-06-22 
17:32:38.508478022 +0200
+++ /work/SRC/openSUSE:Factory/.rt-tests.new.2252680/rt-tests.changes   
2026-10-21 21:03:08.340269441 +0200
@@ -1,0 +2,16 @@
+Fri Oct 16 13:58:27 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to version 2.11:
+  * cyclictest: support auxiliary clocks and symbolic clock names
+  * hwlatdetect: add --time-format argument
+  * cyclictest: reworked man page with grouped options
+  * pi_stress: fix barrier-wait deadlock, validate numeric arguments
+    and improve error messages
+  * rt-migrate-test: report trace_marker write errors once and stop
+  * cyclicdeadline: fix potential path truncation in open_cpuset()
+  * cyclictest: use PI locks for trigger and break-thread locks
+  * Fix build failure with GCC older than 14
+- Spec cleanup: drop obsolete Group tag, use pkgconfig-style
+  BuildRequires
+
+-------------------------------------------------------------------

Old:
----
  rt-tests-2.10.tar.gz

New:
----
  rt-tests-2.11.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rt-tests.spec ++++++
--- /var/tmp/diff_new_pack.M12bH0/_old  2026-10-21 21:03:09.225306576 +0200
+++ /var/tmp/diff_new_pack.M12bH0/_new  2026-10-21 21:03:09.228306702 +0200
@@ -17,16 +17,16 @@
 
 
 Name:           rt-tests
-Version:        2.10
+Version:        2.11
 Release:        0
 Summary:        Realtime Kernel Testsuite
 License:        GPL-2.0-only
-Group:          System/Benchmark
 URL:            https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git
 Source0:        
https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git/snapshot/rt-tests-%{version}.tar.gz
-BuildRequires:  libnuma-devel
+BuildRequires:  pkgconfig
 BuildRequires:  python-rpm-macros
 BuildRequires:  python3-base
+BuildRequires:  pkgconfig(numa)
 Conflicts:      hackbench
 
 %description

++++++ rt-tests-2.10.tar.gz -> rt-tests-2.11.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.10/AGENTS.md new/rt-tests-2.11/AGENTS.md
--- old/rt-tests-2.10/AGENTS.md 1970-01-01 01:00:00.000000000 +0100
+++ new/rt-tests-2.11/AGENTS.md 2026-09-16 22:15:32.000000000 +0200
@@ -0,0 +1,416 @@
+SPDX-License-Identifier: GPL-2.0-only
+
+Copyright 2026 John Kacur <[email protected]>
+
+# AGENTS.md - AI Coding Assistant Guide for rt-tests
+
+This document provides guidance for AI coding assistants working with the 
rt-tests codebase.
+
+## Project Overview
+
+**rt-tests** is a collection of programs for testing real-time Linux kernel 
behavior. These tools measure scheduling latency, test priority inheritance, 
validate deadline scheduling, and stress-test various real-time features of the 
Linux kernel.
+
+- **License**: GPL-2.0-only (some files GPL-2.0-or-later)
+- **Language**: C (with some Python utilities)
+- **Maintainers**: John Kacur <[email protected]>, Clark Williams 
<[email protected]>
+- **Repository**: https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git
+- **Mailing List**: [email protected]
+
+## Architecture
+
+### Directory Structure
+
+```
+rt-tests/
+├── src/                          # Source code organized by program
+│   ├── cyclictest/              # Cyclictest program (main latency tester)
+│   ├── hackbench/               # Scheduler benchmark/stress test
+│   ├── hwlatdetect/             # Hardware latency detector (Python)
+│   ├── pi_tests/                # Priority inheritance tests
+│   ├── pmqtest/                 # POSIX message queue test
+│   ├── ptsematest/              # POSIX semaphore test
+│   ├── queuelat/                # Network queue latency detector
+│   ├── rt-migrate-test/         # RT migration test
+│   ├── sched_deadline/          # SCHED_DEADLINE tests
+│   ├── signaltest/              # Signal latency test
+│   ├── sigwaittest/             # Signal wait test
+│   ├── ssdd/                    # Stress, Strain, Duty, Duration test
+│   ├── svsematest/              # SysV semaphore test
+│   ├── oslat/                   # OS latency detector
+│   ├── backfire/                # Backfire test utility
+│   ├── lib/                     # Shared library code
+│   │   ├── rt-utils.c           # Common utilities (affinity, prio, tracing)
+│   │   ├── rt-numa.c            # NUMA support functions
+│   │   ├── rt-error.c           # Error handling
+│   │   ├── rt-sched.c           # Scheduler utilities
+│   │   ├── rt-get_cpu.c         # CPU detection
+│   │   └── histogram.c          # Histogram generation
+│   ├── include/                 # Common header files
+│   │   ├── rt-utils.h           # Utility function declarations
+│   │   ├── rt-numa.h            # NUMA declarations
+│   │   ├── rt-error.h           # Error handling declarations
+│   │   ├── rt-sched.h           # Scheduler declarations
+│   │   ├── rt-get_cpu.h         # CPU detection declarations
+│   │   ├── histogram.h          # Histogram declarations
+│   │   ├── pi_stress.h          # PI stress test definitions
+│   │   ├── pip_stress.h         # PIP stress test definitions
+│   │   └── bionic.h             # Android Bionic support
+│   └── arch/                    # Architecture-specific code
+│       └── android/             # Android-specific support
+├── Makefile                     # Build system
+├── README.markdown              # Usage documentation
+├── MAINTAINERS                  # Maintainer contact information
+├── COPYING                      # License text
+├── Dockerfile                   # Container build configuration
+├── get_pylib.py                 # Python library path helper
+├── feature/                     # Feature detection for build
+└── bld/                         # Build output directory
+```
+
+### Core Programs
+
+**cyclictest** - High-resolution timer latency tester (primary tool):
+- Measures scheduling latency and timer jitter
+- Multi-threaded with per-CPU thread support
+- Integrates with kernel tracing (ftrace)
+- Supports histogram output
+- Can trigger trace on latency threshold (`--breaktrace`)
+- Options for affinity, priority, interval, duration
+- Man page: src/cyclictest/cyclictest.8
+
+**hackbench** - Scheduler stress test and benchmark:
+- Creates groups of processes/threads exchanging messages
+- Stresses scheduler and IPC mechanisms
+- Useful for finding worst-case latencies under load
+
+**pi_stress / pip_stress** - Priority inheritance tests:
+- Tests kernel priority inheritance mechanisms
+- Validates priority ceiling protocol
+- Helps debug priority inversion issues
+
+**pmqtest / ptsematest / svsematest** - IPC latency tests:
+- Test POSIX message queues, POSIX semaphores, SysV semaphores
+- Measure wakeup latency through various IPC mechanisms
+
+**hwlatdetect** - Hardware/firmware latency detector (Python):
+- Detects System Management Interrupts (SMIs) and firmware delays
+- Uses kernel hwlat detector module
+- Runs in debugfs environment
+
+**queuelat** - Network queue latency detector:
+- Measures latency caused by network queue processing
+- Tests impact of network load on real-time performance
+
+**deadline_test / cyclicdeadline** - SCHED_DEADLINE tests:
+- Test and validate SCHED_DEADLINE scheduler
+- Deadline-based real-time scheduling
+
+**oslat** - OS latency detector:
+- Detects OS-induced latencies
+- Measures worst-case OS interference
+
+**signaltest / sigwaittest** - Signal latency tests:
+- Test signal delivery latency
+- Measure real-time signal performance
+
+**ssdd** - Stress, Strain, Duty, Duration:
+- Configurable stress test with various patterns
+- Tests system under different workloads
+
+**rt-migrate-test** - RT task migration test:
+- Tests real-time task migration behavior
+- Validates scheduler migration logic
+
+### Shared Library Components
+
+**rt-utils.c / rt-utils.h** - Common utilities:
+- `parse_cpumask()` - Parse CPU affinity masks
+- `numa_initialize()` - Initialize NUMA support
+- `enable_trace_mark()` - Enable kernel trace markers
+- `tracemark()` - Write trace markers
+- `get_tracers()` - Get available kernel tracers
+- `setkfifo()` - Set SCHED_FIFO priority
+- Priority, affinity, and tracing helpers
+
+**rt-numa.c / rt-numa.h** - NUMA support:
+- CPU topology detection
+- NUMA node management
+- Per-node thread allocation
+
+**rt-error.c / rt-error.h** - Error handling:
+- `fatal()` - Fatal error with exit
+- `err_exit()` - Error with errno
+- `warn()` - Warning messages
+- `info()` - Informational messages
+
+**histogram.c / histogram.h** - Latency histogram generation:
+- Collect latency samples into bins
+- Format histogram output
+- Calculate statistics (min, max, avg)
+
+**rt-sched.c / rt-sched.h** - Scheduler utilities:
+- Scheduler policy helpers
+- Priority validation
+
+**rt-get_cpu.c / rt-get_cpu.h** - CPU detection:
+- Get current CPU number
+- CPU affinity helpers
+
+### Python Utilities
+
+**hwlatdetect.py** - Hardware latency detector:
+- Detects SMIs and firmware-induced delays
+- Mounts/unmounts debugfs as needed
+- Uses kernel's hwlat_detector module
+- Supports duration, threshold, and window parameters
+
+**get_cyclictest_snapshot.py** - Cyclictest snapshot utility:
+- Captures cyclictest state while running
+- Reads /dev/shm/cyclictest-* files
+- Provides statistics and thread status
+
+**get_pylib.py** - Python library path helper:
+- Determines correct Python library installation path
+- Used by Makefile for Python tool installation
+
+## Development Guidelines
+
+### Code Style
+
+- Follow Linux kernel coding style (K&R style)
+- Use tabs for indentation (width 8)
+- Maximum line length: 80 characters
+- SPDX license identifier at top of each file: `// SPDX-License-Identifier: 
GPL-2.0-only`
+- Function names: lowercase with underscores (e.g., `parse_cpumask`)
+- Variable names: lowercase with underscores
+- Constants: UPPERCASE with underscores
+- **Checking code style**: Use the kernel's checkpatch.pl script to verify 
code style compliance:
+  ```bash
+  /path/to/kernel/scripts/checkpatch.pl --no-tree -f <file.c>
+  ```
+
+### C Standards and Dependencies
+
+- **C Standard**: C99 or later
+- **POSIX**: POSIX.1-2001 with real-time extensions
+- **Required Libraries**:
+  - pthread (POSIX threads)
+  - rt (POSIX real-time extensions)
+  - numa (NUMA support, optional)
+  - dl (dynamic loading)
+- **Optional Libraries**:
+  - cpupower (for deepest idle state support)
+
+### Python Code
+
+- **Python Version**: Python 3.8+
+- **Style**: PEP 8 Python style guide
+- **Shebang**: `#!/usr/bin/python3`
+- Use standard library modules when possible
+- Include docstrings for modules, classes, and functions
+
+### Error Handling
+
+- Use `err_exit()` for fatal errors with errno
+- Use `fatal()` for fatal errors without errno
+- Use `warn()` for warnings that don't stop execution
+- Check return values from all system calls
+- Handle interrupted system calls (EINTR)
+- Clean up resources (threads, memory, file descriptors) on error
+
+### Real-Time Programming Considerations
+
+1. **Memory Locking**: Lock memory with `mlockall(MCL_CURRENT | MCL_FUTURE)` 
to prevent page faults
+2. **Priority**: Use SCHED_FIFO or SCHED_DEADLINE for real-time threads
+3. **Affinity**: Pin threads to specific CPUs to avoid migration overhead
+4. **Stack Prefault**: Touch stack pages before real-time operation
+5. **Avoid Blocking**: Minimize system calls and library calls in RT critical 
sections
+6. **Signal Handling**: Use real-time signals when possible
+7. **Trace Integration**: Support ftrace integration for latency debugging
+
+## Build and Installation
+
+### Build Commands
+
+```bash
+# Install build dependencies (Debian/Ubuntu)
+sudo apt-get install build-essential libnuma-dev
+
+# Install build dependencies (Fedora/RHEL)
+sudo dnf install gcc make numactl-devel kernel-tools-libs-devel
+
+# Build all programs
+make
+
+# Build with debugging
+make DEBUG=1
+
+# Build specific program
+make cyclictest
+
+# Clean build artifacts
+make clean
+
+# Generate tags
+make tags
+```
+
+### Installation
+
+```bash
+# Install to /usr/local (default)
+sudo make install
+
+# Install to custom prefix
+sudo make prefix=/usr install
+
+# Install with compressed man pages
+sudo make MAN_COMPRESSION=gzip install
+```
+
+### Cross-Compilation
+
+```bash
+# Set cross-compiler
+make CROSS_COMPILE=aarch64-linux-gnu-
+
+# Build for Android
+make ostype=android
+```
+
+## Testing
+
+### Running cyclictest
+
+```bash
+# Basic test: one thread per CPU, SCHED_FIFO priority 99
+sudo ./cyclictest -a -t -p99
+
+# With histogram output
+sudo ./cyclictest -a -t -p99 -h 400 -q
+
+# With trace on latency spike
+sudo ./cyclictest -a -t -p99 --tracemark --breaktrace=100
+
+# Long duration test (24 hours)
+sudo ./cyclictest -a -t -p99 -D 24h -h 400 -q
+```
+
+### Running hwlatdetect
+
+```bash
+# Detect hardware latency for 60 seconds
+sudo ./hwlatdetect --duration=60
+
+# With threshold
+sudo ./hwlatdetect --duration=60 --threshold=10
+```
+
+### Testing Priority Inheritance
+
+```bash
+# Run pi_stress test
+sudo ./pi_stress
+
+# Run with specific parameters
+sudo ./pi_stress --inversions=100 --duration=60
+```
+
+## Key Files
+
+- `src/cyclictest/cyclictest.c` - Main latency testing tool
+- `src/lib/rt-utils.c` - Common utility functions
+- `src/lib/rt-numa.c` - NUMA support
+- `src/include/rt-utils.h` - Utility declarations
+- `src/hwlatdetect/hwlatdetect.py` - Hardware latency detector
+- `Makefile` - Build configuration
+- `README.markdown` - Usage documentation
+
+## Common Gotchas
+
+1. **Root Privileges**: Most tests require root to set real-time priorities 
and lock memory
+2. **Kernel Configuration**: RT tests require kernel with CONFIG_PREEMPT_RT or 
CONFIG_PREEMPT for best results
+3. **CPU Isolation**: For accurate results, isolate CPUs from scheduler 
(isolcpus kernel parameter)
+4. **Power Management**: Disable CPU frequency scaling and idle states for 
consistent results
+5. **NUMA Systems**: Be aware of memory locality on NUMA systems
+6. **Tracing Overhead**: Kernel tracing adds overhead; use only when needed
+7. **Signal Handling**: Proper cleanup on SIGINT/SIGTERM is important
+8. **Memory Locking**: Must lock memory before enabling real-time priority
+
+## Build System Notes
+
+The Makefile uses feature detection to conditionally enable features:
+
+- **libcpupower**: Detected via feature/test-feature.mak, enables 
`--deepest-idle-state` option
+- **NUMA**: Detected at build time, links with libnuma if available
+- **Python**: Detected via get_pylib.py, determines if Python utilities can be 
installed
+- **Architecture**: Detected via `$(CC) -dumpmachine` for platform-specific 
code
+
+### Makefile Variables
+
+- `VERSION`: Current version number
+- `DESTDIR`: Installation destination (for packaging)
+- `prefix`: Installation prefix (default: /usr/local)
+- `DEBUG`: Enable debug build (DEBUG=1)
+- `CROSS_COMPILE`: Cross-compiler prefix
+- `no_libcpupower`: Disable libcpupower (no_libcpupower=1)
+
+## Support and Contact
+
+- **Maintainers**:
+  - John Kacur <[email protected]>
+  - Clark Williams <[email protected]>
+- **Mailing List**: [email protected]
+- **Bug Reports**: Send to maintainers with mailing list CC'd
+- **Patch Submissions**: Send to maintainers with mailing list CC'd
+
+## Git Workflow
+
+- **Main Branch**: `master`
+- **Repository**: https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git
+- **Patch Submission**: Use standard git format-patch/send-email workflow
+- **Commit Format**: Follow kernel commit message format
+
+### Development Workflow
+
+1. Make changes to code
+2. Build and test: `make && sudo ./cyclictest -a -t -p99`
+3. Run relevant tests to verify changes
+4. Update man pages if changing command-line options
+5. Commit with descriptive message
+6. Submit patches to maintainers with mailing list CC'd
+
+## Additional Notes for AI Assistants
+
+1. **Real-Time Focus**: All programs are designed for real-time system testing 
and analysis
+2. **Kernel Integration**: Heavy integration with Linux kernel features 
(ftrace, debugfs, scheduler)
+3. **Thread Safety**: Most programs are multi-threaded; be aware of 
synchronization
+4. **Signal Handling**: Programs must handle SIGINT/SIGTERM for graceful 
shutdown
+5. **Resource Cleanup**: Always clean up threads, memory, and file descriptors
+6. **Man Page Updates**: Update man pages when changing options or behavior
+7. **Backwards Compatibility**: Maintain compatibility with existing scripts 
and tools
+8. **Performance Critical**: Some code paths are performance-critical; avoid 
adding overhead
+9. **Architecture Support**: Code should work on x86_64, aarch64, ppc64le, 
s390x, RISC-V
+10. **Android Support**: Some programs support Android via Bionic 
compatibility layer
+
+## Related Projects
+
+Projects in the RT ecosystem:
+
+- **rteval**: Real-time evaluation suite - 
https://git.kernel.org/pub/scm/utils/rteval/rteval.git
+- **tuna**: Thread and IRQ tuning tool - 
https://git.kernel.org/pub/scm/utils/tuna/tuna.git
+- **rtla**: Real-time Linux analysis tool - 
https://www.kernel.org/doc/html/latest/tools/rtla/
+- **rv**: Runtime verification tool - 
https://www.kernel.org/doc/html/latest/tools/rv/
+- **Linux RT Kernel**: PREEMPT_RT patches - 
https://kernel.org/pub/linux/kernel/projects/rt/
+
+## References
+
+- **Linux Real-Time Wiki**: https://wiki.linuxfoundation.org/realtime/start
+- **OSADL Latency Plots**: 
https://www.osadl.org/QA-Farm-Realtime.qa-farm-about.0.html
+- **RT Kernel Documentation**: 
https://www.kernel.org/doc/Documentation/scheduler/sched-rt-group.txt
+- **High-resolution timers**: 
https://www.kernel.org/doc/html/latest/timers/hrtimers.html
+
+---
+
+**Last Updated**: 2026-06-17
+**Document Version**: 1.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.10/Dockerfile new/rt-tests-2.11/Dockerfile
--- old/rt-tests-2.10/Dockerfile        2026-02-27 21:09:47.000000000 +0100
+++ new/rt-tests-2.11/Dockerfile        2026-09-16 22:15:32.000000000 +0200
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
 # Use CentOS Stream 9 as base image
 FROM centos:stream9
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.10/MAINTAINERS 
new/rt-tests-2.11/MAINTAINERS
--- old/rt-tests-2.10/MAINTAINERS       2026-02-27 21:09:47.000000000 +0100
+++ new/rt-tests-2.11/MAINTAINERS       2026-09-16 22:15:32.000000000 +0200
@@ -1,3 +1,5 @@
+SPDX-License-Identifier: GPL-2.0-or-later
+
 Please send your patches to
 
 Clark Williams <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.10/Makefile new/rt-tests-2.11/Makefile
--- old/rt-tests-2.10/Makefile  2026-02-27 21:09:47.000000000 +0100
+++ new/rt-tests-2.11/Makefile  2026-09-16 22:15:32.000000000 +0200
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-or-later
 include feature/test-feature.mak
 
-VERSION = 2.10
+VERSION = 2.11
 CC = $(CROSS_COMPILE)gcc
 AR = $(CROSS_COMPILE)ar
 
@@ -235,7 +235,7 @@
                mkdir -p "$(DESTDIR)$(bindir)" ; \
                install -D -m 755 src/hwlatdetect/hwlatdetect.py 
$(DESTDIR)$(PYLIB)/hwlatdetect.py ; \
                rm -f "$(DESTDIR)$(bindir)/hwlatdetect" ; \
-               ln -s $(PYLIB)/hwlatdetect.py "$(DESTDIR)$(bindir)/hwlatdetect" 
; \
+               ln -rs "$(DESTDIR)$(PYLIB)/hwlatdetect.py" 
"$(DESTDIR)$(bindir)/hwlatdetect" ; \
        fi
 
 .PHONY: install_get_cyclictest_snapshot
@@ -244,7 +244,7 @@
                mkdir -p "${DESTDIR}${bindir}" ; \
                install -D -m 755 src/cyclictest/get_cyclictest_snapshot.py 
${DESTDIR}${PYLIB}/get_cyclictest_snapshot.py ; \
                rm -f "${DESTDIR}${bindir}/get_cyclictest_snapshot" ; \
-               ln -s ${PYLIB}/get_cyclictest_snapshot.py 
"${DESTDIR}${bindir}/get_cyclictest_snapshot" ; \
+               ln -rs "${DESTDIR}${PYLIB}/get_cyclictest_snapshot.py" 
"${DESTDIR}${bindir}/get_cyclictest_snapshot" ; \
        fi
 
 .PHONY: install_manpages
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.10/README-Dockerfile 
new/rt-tests-2.11/README-Dockerfile
--- old/rt-tests-2.10/README-Dockerfile 2026-02-27 21:09:47.000000000 +0100
+++ new/rt-tests-2.11/README-Dockerfile 2026-09-16 22:15:32.000000000 +0200
@@ -1,8 +1,9 @@
-1
+SPDX-License-Identifier: GPL-2.0-or-later
+
 # README-Dockerfile-rt-tests
 
 ## Introduction
-This README provides detailed instructions for setting up an rt-tests 
container using Docker or Podman. This Dockerfile will pull a current copy of 
your code (plus all of your changes) and compile it into a container image for 
you to test with. This will give you an imbiguous way to test your changes, 
assuming you are running on a semi-modern host OS. The rt-tests container can 
be used to test any of the subpackages found under the rt-tests project, but is 
mainly intended for hwlatdetect and cyclictest.
+This README provides detailed instructions for setting up an rt-tests 
container using Docker or Podman. This Dockerfile will pull a current copy of 
your code (plus all of your changes) and compile it into a container image for 
you to test with. This will give you an unambiguous way to test your changes, 
assuming you are running on a semi-modern host OS. The rt-tests container can 
be used to test any of the subpackages found under the rt-tests project, but is 
mainly intended for hwlatdetect and cyclictest.
 
 ## Prerequisites
 - Docker or Podman installed on your system.
@@ -16,8 +17,8 @@
   - Alternatively, install Podman: `sudo apt-get update && sudo apt-get 
install podman -y`
 
 ### Build the Container
-- Navigate to the root directory of the 'rteval'
-- Build the container image named 'rteval-upstream':
+- Navigate to the root directory of 'rt-tests'
+- Build the container image named 'rt-tests-upstream':
   - For Podman: `sudo podman build -t rt-tests-upstream .`
   - For Docker: `sudo docker build -t rt-tests-upstream .`
 
@@ -40,7 +41,7 @@
   - For Podman: `sudo podman run -it --rm --privileged rt-tests-upstream`
   - For Docker: `sudo docker run -it --rm --privileged rt-tests-upstream`  
 
-### Test rteval Build
+### Test rt-tests Build
 - Inside the container, test one of the rt-tests packages you just built: 
   - Command: `cyclictest -D 1s`
   - Command: `hwlatdetect --duration 1`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.10/README.markdown 
new/rt-tests-2.11/README.markdown
--- old/rt-tests-2.10/README.markdown   2026-02-27 21:09:47.000000000 +0100
+++ new/rt-tests-2.11/README.markdown   2026-09-16 22:15:32.000000000 +0200
@@ -1,3 +1,5 @@
+SPDX-License-Identifier: GPL-2.0-or-later
+
 # RT-Tests
 
 This repository contains some programs that test various rt-linux features.
@@ -14,7 +16,7 @@
 To run one test thread per CPU or per CPU core, each thread on a separate
 processor, type
 
-    sudo ./cyclictest -a -t -n -p99
+    sudo ./cyclictest -a -t -p99
 
 On a non-realtime system, you may see something like
 
@@ -62,7 +64,7 @@
 `/sys/kernel/tracing/trace`, for example:
 
     echo function > /sys/kernel/tracing/current_tracer
-    cyclictest -a -t -n -p99 --tracemark --breaktrace 100
+    cyclictest -a -t -p99 --tracemark --breaktrace 100
 
 This causes the program to abort execution, if the latency value exceeds 100
 microseconds; the culprit can then be found in the trace output at
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.10/get_pylib.py 
new/rt-tests-2.11/get_pylib.py
--- old/rt-tests-2.10/get_pylib.py      2026-02-27 21:09:47.000000000 +0100
+++ new/rt-tests-2.11/get_pylib.py      2026-09-16 22:15:32.000000000 +0200
@@ -1,4 +1,5 @@
 #!/usr/bin/python3
+# SPDX-License-Identifier: GPL-2.0-or-later
 
 # This file is used during the make process
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.10/src/cyclictest/cyclictest.8 
new/rt-tests-2.11/src/cyclictest/cyclictest.8
--- old/rt-tests-2.10/src/cyclictest/cyclictest.8       2026-02-27 
21:09:47.000000000 +0100
+++ new/rt-tests-2.11/src/cyclictest/cyclictest.8       2026-09-16 
22:15:32.000000000 +0200
@@ -1,195 +1,322 @@
-.\"                                      Hey, EMACS: -*- nroff -*-
-.TH CYCLICTEST 8 "April 22, 2016"
-# SPDX-License-Identifier: GPL-2.0-only
-.\" Please adjust this date whenever revising the manpage.
-.\"
-.\" Some roff macros, for reference:
-.\" .nh        disable hyphenation
-.\" .hy        enable hyphenation
-.\" .ad l      left justify
-.\" .ad b      justify to both left and right margins
-.\" .nf        disable filling
-.\" .fi        enable filling
-.\" .br        insert line break
-.\" .sp <n>    insert n+1 empty lines
-.\" for manpage-specific macros, see man(7)
-.SH NAME
+.\" SPDX-License-Identifier: GPL-2.0-only
+.\" For a man pages tutorial, check groff_man_style(7)
+.TH Cyclictest 8 "April 22, 2016"
+.
+.SH Name
 cyclictest \- High resolution test program
-.SH SYNOPSIS
+.
+.SH Synopsis
+.
 .SY cyclictest
-.RI "[ \-hfmnqrsvMS ] [\-a " proc " ] [\-A " aligned " ] [\-b " usec " ] [\-c 
" clock " ] [\-d " dist " ] \
-[\-h " histogram " ] [\-i " intv " ] [\-\-json " filename " ] [\-l " loop " ] 
[\-o " red " ] \
-[\-p " prio " ] [\-t " num " ] [\-D " time "] [\-w] [\-W] [\-y " policy " ] [ 
\-S | \-U ]"
-
-.\" .SH DESCRIPTION
-.\" This manual page documents briefly the
-.\" .B cyclictest commands.
-.\" .PP
-.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
respectively.
-.\" \fBcyclictest\fP is a program that...
-.SH OPTIONS
-These programs follow the usual GNU command line syntax, with long
-options starting with two dashes ('\-\-').
-.br
-A summary of options is included below.
-.\" For a complete description, see the Info files.
+.RB [ \-mMNqrRsSuvx ]
+.RB [ \-\-default\-system ]
+.RB [ \-\-latency\~\c
+.IR pm\-c\-state ]
+.RB [ \-\-deepest\-idle\-state\~\c
+.IR idle-state-num ]
+.RB [ \-c\~\c
+.IR clock\-type ]
+.RB [ \-d\~\c
+.IR distance\-usec ]
+.RB [ \-i\~\c
+.IR interval\-usec ]
+.RB [ \-\-secaligned\~\c
+.IR wakeup\-usec ]
+.RB [ \-A\~\c
+.IR alignment\-usec ]
+.RB [ \-t\~\c
+.IR num\-threads ]
+.RB [ \-\-mainaffinity\~\c
+.IR proc-set ]
+.RB [ \-a\~\c
+.IR proc\-set ]
+.RB [ \-\-policy\~\c
+.IR threads\-sched\-policy ]
+.RB [ \-p\~\c
+.IR thread\-prio ]
+.RB [ \-\-priospread ]
+.RB [ \-b\~\c
+.IR break\-usec ]
+.RB [ \-\-tracemark ]
+.RB [ \-D\~\c
+.IR duration\-mhd ]
+.RB [ \-l\~\c
+.IR num\-loops ]
+.RB [ \-\-dbg_cyclictest ]
+.RB [ \-o\~\c
+.IR oscope\-red ]
+.RB [ \-f\~\c
+.IR fifo\-path ]
+.RB [ \-h\~\c
+.IR max\-latency\-usec ]
+.RB [ \-H\~\c
+.IR max\-latency\-usec ]
+.RB [ \-\-spike\~\c
+.IR trigger\-point-usec ]
+.RB [ \-\-spike\-nodes\~\c
+.IR num\-nodes ]
+.RB [ \-\-histfile\~\c
+.IR file\-path ]
+.RB [ \-\-json\~\c
+.IR file\-path ]
+.RB [ \-\-smi ]
+.YS
+.
+.SY cyclictest
+.B \-\-help
+.YS
+.
+.SH Options
+.
+.B \-\-help
+display a usage message and exit.
+.
+.SS "System-altering options"
+.
 .TP
-.B \-a, \-\-affinity[=PROC-SET]
-Run threads on the set of processors given by PROC-SET.  If PROC-SET is not
-specified, all processors will be used.  Threads will be assigned to processors
-in the set in numeric order, in a round\-robin fashion.
-.br
-The set of processors can be specified as A,B,C, or A-C, or A-B,D-F, and so 
on*.
-The ! character can be used to negate a set.  For example, !B-D means to use 
all
-available CPUs except B through D.  The cpu numbers are the same as shown in 
the 
-.I processor
-field in /proc/cpuinfo.  See numa(3) for more information on specifying CPU 
sets.
-* Support for CPU sets requires libnuma version >= 2.  For libnuma v1, 
PROC-SET,
-if specified, must be a single CPU number.
+.B \-\-default\-system
+Stop cyclictest from force-tuning the system. Without this option,
+cyclictest writes a value of 0 to /dev/cpu_dma_latency, which prevents the
+CPU from entering deep sleep states.  While such force-tuning might help at
+showing lower latency numbers, it obscures the fact that the system may
+require additional tuning.
+.
 .TP
-.B \-A, \-\-aligned=USEC
-Align thread wakeups to a specific offset in microseconds
+.B \-\-latency=PM_Q0S
+power management latency target value. This value is written to
+/dev/cpu_dma_latency and affects c-states. The default is 0
+.
 .TP
-.B \-b, \-\-breaktrace=USEC
-Send break trace command when latency > USEC
+.B \-\-deepest\-idle\-state=n
+Reduce exit from idle latency by limiting idle state up to n on used cpus
+(-1 disables all idle states). Power management is not suppresed on other
+cpus.
+.
+.TP
+.B \-\-laptop
+Obsolete option.  Please use \-\-default\-system instead.
+.
+.SS "Sleep-mechanism clock options"
+.
 .TP
 .B \-c, \-\-clock=CLOCK
-select clock
+Select the system clock to be used for calculating the measuring thread's
+latency. Allowed CLOCK values are:
 .br
 0 = CLOCK_MONOTONIC (default)
 .br
 1 = CLOCK_REALTIME
-.TP
-.B \-\-deepest\-idle\-state=n
-Reduce exit from idle latency by limiting idle state up to n on used cpus (-1 
disables all idle states). Power management is not suppresed on other cpus.
-.TP
-.B \-\-default\-system
-Don't attempt to tune the system from cyclictest. Power management is not 
suppressed. This might give poorer results, but will allow you to discover if 
you need to tune the system.
-.TP
-.B \-d, \-\-distance=DIST
-Distance of thread intervals in us, default = 500
-.TP
-.B \-D, \-\-duration=TIME
-Specify a length for the test run.
 .br
-Append 'm', 'h', or 'd' to specify minutes, hours or days.
+aux0 - aux7
+.br
+For more information on the Linux implementation of such clocks, check
+.MR clock_getres 2
+.
 .TP
-.B \-F, \-\-fifo=<path>
-Create a named pipe at path and write stats to it
+.B \-x, \-\-posix_timers
+Use POSIX timers instead of clock_nanosleep.
+.
 .TP
-.B \-h, \-\-histogram=US
-Dump latency histogram to stdout after the run. US is the max latency time to 
be be tracked in microseconds. This option runs all threads at the same 
priority.
+.B \-s, \-\-system
+Use sys_nanosleep and sys_setitimer instead of posix timers. Note, that \-s
+can only be used with one thread because itimers are per process and not
+per thread. \-s uses the nanosleep syscall and is not restricted to one
+thread.
+.
 .TP
-.B \-H, \-\-histofall=MAXLATENCYINUS
-Same as -h except that an additional histogram column is displayed at the 
right that contains summary data of all thread histograms. If cyclictest runs a 
single thread only, the -H option is equivalent to -h.
+.B \-r, \-\-relative
+Use relative timers instead of absolute. The default behaviour of the tests
+is to use absolute timers. This option is there for completeness and should
+not be used for reproducible tests.
+.
 .TP
-.B \-\-histfile=<path>
-Dump the latency histogram to <path> instead of stdout.
+.B \-R, \-\-resolution
+Check clock resolution, calling clock_gettime() many times. List of
+lock_gettime() values will be reported with -X
+.
+.SS "Thread-waekup timing options"
+.
+.TP
+.B \-d, \-\-distance=DIST
+Distance of thread intervals in us, default = 500
+.
 .TP
 .B \-i, \-\-interval=INTV
-Set the base interval of the thread(s) in microseconds (default is 1000us). 
This sets the interval of the first thread. See also \-d.
+Set the base interval of the thread(s) in microseconds (default is
+1000us). This sets the interval of the first thread. See also \-d.
+.
 .TP
-.B \-\-json=FILENAME
-Write final results into FILENAME, JSON formatted.
+.B \-\-secaligned [USEC]
+align thread wakeups to the next full second and apply the optional offset.
+.
 .TP
-.B \-\-laptop
-Save battery when running cyclictest. This will give you poorer realtime 
results, but will not drain your battery so quickly.
+.B \-A, \-\-align=USEC
+Align thread wakeups to a specific offset in microseconds
+.
+.SS "SMP-related options"
+.
 .TP
-.B \-\-latency=PM_Q0S
-power management latency target value. This value is written to 
/dev/cpu_dma_latency and affects c-states. The default is 0
+.B \\-S, \-\-smp
+Set options for standard testing on SMP systems. Equivalent to using the
+options: "\-t \-a" as well keeping any specified priority equal across all
+threads
+.
 .TP
-.B \-l, \-\-loops=LOOPS
-Set the number of loops. The default is 0 (endless). This option is useful for 
automated tests with a given number of test cycles. Cyclictest is stopped once 
the number of timer intervals has been reached.
+.B \-t, \-\-threads[=NUM]
+Set the number of test threads (default is 1). Create NUM test threads. If
+NUM is not specified, NUM is set to the number of available CPUs. See \-d,
+\-i and \-p for further information.
+.
 .TP
 .B \-\-mainaffinity=CPUSET
-Run the main thread on CPU #N. This only affects the main thread and not the 
measurement threads
+Run the main thread on CPU #N. This only affects the main thread and not
+the measurement threads
+.
+.TP
+.B \-a, \-\-affinity[=PROC-SET]
+Run threads on the set of processors given by PROC-SET.  If PROC-SET is not
+specified, all processors will be used.  Threads will be assigned to
+processors in the set in numeric order, in a round\-robin fashion.
+.br
+The set of processors can be specified as A,B,C, or A-C, or A-B,D-F, and so
+on*.  The ! character can be used to negate a set.  For example, !B-D means
+to use all available CPUs except B through D.  The cpu numbers are the same
+as shown in the
+.I processor
+field in /proc/cpuinfo.  See numa(3) for more information on specifying CPU
+sets.  * Support for CPU sets requires libnuma version >= 2.  For libnuma
+v1, PROC-SET, if specified, must be a single CPU number.
+.
+.SS "Memory options"
+.
 .TP
 .B \-m, \-\-mlockall
 Lock current and future memory allocations to prevent being paged out
+.
+.SS "Tracing options"
+.
 .TP
-.B \\-M, \-\-refresh_on_max
-Delay updating the screen until a new max latency is hit. (useful for
-running cyclictest on low-bandwidth connections)
-.TP
-.B \-N, \-\-nsecs
-Show results in nanoseconds instead of microseconds, which is the default unit.
-.TP
-.B \-o, \-\-oscope=RED
-Oscilloscope mode, reduce verbose output by RED.
+.B \-b, \-\-breaktrace=USEC
+Send break trace command when latency > USEC
+.
 .TP
-.B \-p, \-\-prio=PRIO
-Set the priority of the first thread. The given priority is set to the first 
test thread. Each further thread gets a lower priority:
-Priority(Thread N) = max(Priority(Thread N\-1) \- 1, 0)
-.TP
-.B \-\-policy=NAME
-set the scheduler policy of the measurement threads
-where NAME is one of: other, normal, batch, idle, fifo, rr
+.B \-\-tracemark
+write a trace mark when \-b latency is exceeded.
+.
+.SS "Test-duration options"
+.
 .TP
-.B \-\-priospread
-spread priority levels starting at a specified value
+.B \-D, \-\-duration=TIME
+Specify a length for the test run.
+.br
+Append 'm', 'h', or 'd' to specify minutes, hours or days.
+.
 .TP
-.B \-q, \-\-quiet
-Print a summary only on exit. Useful for automated tests, where only the 
summary output needs to be captured.
+.B \-l, \-\-loops=LOOPS
+Set the number of loops. The default is 0 (endless). This option is useful
+for automated tests with a given number of test cycles. Cyclictest is
+stopped once the number of timer intervals has been reached.
+.
+.SS "Output options"
+.
 .TP
-.B \-r, \-\-relative
-Use relative timers instead of absolute. The default behaviour of the tests is 
to use absolute timers. This option is there for completeness and should not be 
used for reproducible tests.
+.B \-\-dbg_cyclictest
+Print info userful for debugging cyclictest
+.
 .TP
-.B \-R, \-\-resolution
-Check clock resolution, calling clock_gettime() many times. List of 
lock_gettime() values will be reported with -X
+.B \-o, \-\-oscope=RED
+Oscilloscope mode, reduce verbose output by RED.
+.
 .TP
-.B \-\-secaligned [USEC]
-align thread wakeups to the next full second and apply the optional offset.
+.B \-F, \-\-fifo=<path>
+Create a named pipe at path and write stats to it
+.
 .TP
-.B \-s, \-\-system
-Use sys_nanosleep and sys_setitimer instead of posix timers. Note, that \-s 
can only be used with one thread because itimers are per process and not per 
thread. \-s uses the nanosleep syscall and is not restricted to one thread.
+.B \-h, \-\-histogram=US
+Dump latency histogram to stdout after the run. US is the max latency time
+to be be tracked in microseconds. This option runs all threads at the same
+priority.
+.
 .TP
-.B \\-S, \-\-smp
-Set options for standard testing on SMP systems. Equivalent to using
-the options: "\-t \-a" as well keeping any specified priority
-equal across all threads
+.B \-H, \-\-histofall=MAXLATENCYINUS
+Same as -h except that an additional histogram column is displayed at the
+right that contains summary data of all thread histograms. If cyclictest
+runs a single thread only, the -H option is equivalent to -h.
+.
 .TP
 .B \-\-spike=<trigger>
 record all spikes > trigger
+.
 .TP
 .B \-\-spike-nodes=[num of nodes]
 These are the maximum number of spikes we can record.
 .br
 The default is 1024 if not specified.
+.
 .TP
-.B \\-\-smi
-Enable SMI count/detection on processors with SMI count support.
+.B \-\-histfile=<path>
+Dump the latency histogram to <path> instead of stdout.
+.
 .TP
-.B \-t, \-\-threads[=NUM]
-Set the number of test threads (default is 1). Create NUM test threads. If NUM 
is not specified, NUM is set to
-the number of available CPUs. See \-d, \-i and \-p for further information.
+.B \-\-json=FILENAME
+Write final results into FILENAME, JSON formatted.
+.
 .TP
-.B \-\-tracemark
-write a trace mark when \-b latency is exceeded.
+.B \\-M, \-\-refresh_on_max
+Delay updating the screen until a new max latency is hit. (useful for
+running cyclictest on low-bandwidth connections)
+.
+.TP
+.B \-N, \-\-nsecs
+Show results in nanoseconds instead of microseconds, which is the default
+unit.
+.
+.TP
+.B \-q, \-\-quiet
+Print a summary only on exit. Useful for automated tests, where only the
+summary output needs to be captured.
+.
 .TP
 .B \-u, \-\-unbuffered
 force unbuffered output for live processing
+.
 .TP
 .B \-v, \-\-verbose
-Output values on stdout for statistics. This option is used to gather 
statistical information about the latency distribution. The output is sent to 
stdout. The output format is:
-
-n:c:v
-
-where n=task number c=count v=latency value in us.
+Output values on stdout for statistics. This option is used to gather
+statistical information about the latency distribution. The output is sent
+to stdout. The output format is: "n:c:v", where n is the task number, c is
+the count, and v is the latency value in microseconds.
+.
+.SS "X86 options"
+.
 .TP
-.B \-\-dbg_cyclictest
-Print info userful for debugging cyclictest
-.TP
-.B \-x, \-\-posix_timers
-Use POSIX timers instead of clock_nanosleep.
-
-.SH SEE ALSO
-.BR numa (3),
-.BR numactl (8),
-.\" .br
-.\" The programs are documented fully by
-.\" .IR "The Rise and Fall of a Fooish Bar" ,
-.\" available via the Info system.
-.SH AUTHOR
+.B \\-\-smi
+Enable SMI count/detection on processors with SMI count support.
+.
+.SH "Example invocation"
+.
+Testing a realtime system is hardware and workload dependent.  With that
+in mind, below cyclictest example invocation can provide a good start:
+.PP
+.nf
+.B cyclictest
+   --default-system
+   --secaligned
+   --interval=250
+   --distance=0
+   --mlockall
+   --smp
+   --priority=98
+   --histogram=1000
+   --histfile=output.txt
+.fi
+.
+.SH "See also"
+.MR numa 3 ,
+.MR numactl 8 ,
+.MR rtla-timerlat 1
+.
+.SH Authors
 cyclictest was written by Thomas Gleixner <[email protected]>.
 .PP
 This manual page was written by Alessio Igor Bogani <[email protected]>,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.10/src/cyclictest/cyclictest.c 
new/rt-tests-2.11/src/cyclictest/cyclictest.c
--- old/rt-tests-2.10/src/cyclictest/cyclictest.c       2026-02-27 
21:09:47.000000000 +0100
+++ new/rt-tests-2.11/src/cyclictest/cyclictest.c       2026-09-16 
22:15:32.000000000 +0200
@@ -15,6 +15,7 @@
 #include <stdlib.h>
 #include <stdint.h>
 #include <stdarg.h>
+#include <stdbool.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <getopt.h>
@@ -52,6 +53,10 @@
 #define SCHED_NORMAL SCHED_OTHER
 #endif
 
+#ifndef CLOCK_AUX
+#define CLOCK_AUX 16
+#endif
+
 #define sigev_notify_thread_id _sigev_un._tid
 
 #ifdef __UCLIBC__
@@ -62,12 +67,18 @@
 static int clock_nanosleep(clockid_t clock_id, int flags, const struct 
timespec *req,
                           struct timespec *rem)
 {
+       int retval;
+
        if (clock_id == CLOCK_THREAD_CPUTIME_ID)
                return -EINVAL;
        if (clock_id == CLOCK_PROCESS_CPUTIME_ID)
                clock_id = MAKE_PROCESS_CPUCLOCK(0, CPUCLOCK_SCHED);
 
-       return syscall(__NR_clock_nanosleep, clock_id, flags, req, rem);
+       retval = syscall(__NR_clock_nanosleep, clock_id, flags, req, rem);
+       if (retval == 0)
+               return 0;
+
+       return errno;
 }
 
 int sched_setaffinity(__pid_t __pid, size_t __cpusetsize,
@@ -147,7 +158,7 @@
        unsigned long smi_count;
 };
 
-static pthread_mutex_t trigger_lock = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t trigger_lock;
 
 static int trigger = 0;        /* Record spikes > trigger, 0 means don't 
record */
 static int trigger_list_size = 1024;   /* Number of list nodes */
@@ -198,9 +209,9 @@
 #endif
 
 static pthread_cond_t refresh_on_max_cond = PTHREAD_COND_INITIALIZER;
-static pthread_mutex_t refresh_on_max_lock = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t refresh_on_max_lock;
 
-static pthread_mutex_t break_thread_id_lock = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t break_thread_id_lock;
 static pid_t break_thread_id = 0;
 static uint64_t break_thread_value = 0;
 
@@ -640,6 +651,7 @@
        struct itimerval itimer;
        struct itimerspec tspec;
        struct thread_stat *stat = par->stats;
+       bool need_refresh_max = false;
        int stopped = 0;
        cpu_set_t mask;
        pthread_t thread;
@@ -671,7 +683,9 @@
                sigev.sigev_notify = SIGEV_THREAD_ID | SIGEV_SIGNAL;
                sigev.sigev_signo = par->signal;
                sigev.sigev_notify_thread_id = stat->tid;
-               timer_create(par->clock, &sigev, &timer);
+               if (timer_create(par->clock, &sigev, &timer))
+                       fatal("timerthread%d: failed to create timer for clock 
%d, errno: %d\n",
+                             par->cpu, par->clock, errno);
                tspec.it_interval = interval;
        }
 
@@ -765,7 +779,7 @@
                                                      &next, NULL);
                                if (ret != 0) {
                                        if (ret != EINTR)
-                                               warn("clock_nanosleep failed. 
errno: %d\n", errno);
+                                               warn("clock_nanosleep failed. 
errno: %d\n", ret);
                                        goto out;
                                }
                        } else {
@@ -779,7 +793,7 @@
                                        TIMER_RELTIME, &interval, NULL);
                                if (ret != 0) {
                                        if (ret != EINTR)
-                                               warn("clock_nanosleep() failed. 
errno: %d\n", errno);
+                                               warn("clock_nanosleep() failed. 
errno: %d\n", ret);
                                        goto out;
                                }
                                next.tv_sec = now.tv_sec + interval.tv_sec;
@@ -834,7 +848,14 @@
                if (diff > stat->max) {
                        stat->max = diff;
                        if (refresh_on_max)
+                               need_refresh_max = true;
+               }
+               if (need_refresh_max) {
+                       if (!pthread_mutex_trylock(&refresh_on_max_lock)) {
                                pthread_cond_signal(&refresh_on_max_cond);
+                               pthread_mutex_unlock(&refresh_on_max_lock);
+                               need_refresh_max = false;
+                       }
                }
                stat->avg += (double) diff;
 
@@ -942,8 +963,9 @@
               "-A USEC  --aligned=USEC    align thread wakeups to a specific 
offset\n"
               "-b USEC  --breaktrace=USEC send break trace command when 
latency > USEC\n"
               "-c CLOCK --clock=CLOCK     select clock\n"
-              "                           0 = CLOCK_MONOTONIC (default)\n"
-              "                           1 = CLOCK_REALTIME\n"
+              "                           monotonic (default)\n"
+              "                           realtime\n"
+              "                           aux0 - aux7\n"
               "         --deepest-idle-state=n\n"
               "                           Reduce exit from idle latency by 
limiting idle state\n"
               "                           up to n on used cpus (-1 disables 
all idle states).\n"
@@ -1022,7 +1044,7 @@
 static int policy = SCHED_OTHER;       /* default policy if not specified */
 static int num_threads = 1;
 static int max_cycles;
-static int clocksel = 0;
+static clockid_t used_clock;
 static int quiet;
 static int interval = DEFAULT_INTERVAL;
 static int distance = -1;
@@ -1031,10 +1053,27 @@
 static int smp = 0;
 static int setaffinity = AFFINITY_UNSPECIFIED;
 
-static int clocksources[] = {
-       CLOCK_MONOTONIC,
-       CLOCK_REALTIME,
-};
+static int handleclock(const char *clockarg)
+{
+       if (strcmp(clockarg, "0") == 0)
+               used_clock = CLOCK_MONOTONIC;
+       else if (strcmp(clockarg, "monotonic") == 0)
+               used_clock = CLOCK_MONOTONIC;
+       else if (strcmp(clockarg, "1") == 0)
+               used_clock = CLOCK_REALTIME;
+       else if (strcmp(clockarg, "realtime") == 0)
+               used_clock = CLOCK_REALTIME;
+       else if (strncmp(clockarg, "aux", 3) == 0 && strlen(clockarg) == 4) {
+               int aux_num = clockarg[3] - '0';
+               if (aux_num >= 0 && aux_num <= 7)
+                       used_clock = CLOCK_AUX + aux_num;
+               else
+                       return 1;
+       } else
+               return 1;
+
+       return 0;
+}
 
 static void handlepolicy(char *polname)
 {
@@ -1195,7 +1234,7 @@
                        tracelimit = atoi(optarg); break;
                case 'c':
                case OPT_CLOCK:
-                       clocksel = atoi(optarg); break;
+                       error |= handleclock(optarg); break;
                case OPT_DEFAULT_SYSTEM:
                        power_management = 1; break;
                case 'd':
@@ -1377,9 +1416,6 @@
                              "on this processor\n");
        }
 
-       if (clocksel < 0 || clocksel > ARRAY_SIZE(clocksources))
-               error = 1;
-
        if (oscope_reduction < 1)
                error = 1;
 
@@ -1472,6 +1508,7 @@
                        return;
                }
                rstat_ftruncate(rstat_fd, 0);
+               lseek(rstat_fd, 0, SEEK_SET);
                quiet = 0;
                dprintf(rstat_fd, "#---------------------------\n");
                dprintf(rstat_fd, "# cyclictest current status:\n");
@@ -1909,6 +1946,7 @@
 
 int main(int argc, char **argv)
 {
+       pthread_mutexattr_t mattr;
        sigset_t sigset;
        int signum = SIGALRM;
        int mode;
@@ -1945,6 +1983,12 @@
                }
        }
 
+       pthread_mutexattr_init(&mattr);
+       pthread_mutexattr_setprotocol(&mattr, PTHREAD_PRIO_INHERIT);
+       pthread_mutex_init(&refresh_on_max_lock, &mattr);
+       pthread_mutex_init(&break_thread_id_lock, &mattr);
+       pthread_mutex_init(&trigger_lock, &mattr);
+
        /* lock all memory (prevent swapping) */
        if (lockall)
                if (mlockall(MCL_CURRENT|MCL_FUTURE) == -1) {
@@ -1982,7 +2026,6 @@
                warn("High resolution timers not available\n");
 
        if (check_clock_resolution) {
-               int clock;
                uint64_t diff;
                int k;
                uint64_t min_non_zero_diff = UINT64_MAX;
@@ -1993,9 +2036,7 @@
                struct timespec *time;
                int times;
 
-               clock = clocksources[clocksel];
-
-               if (clock_getres(clock, &res))
+               if (clock_getres(used_clock, &res))
                        warn("clock_getres failed");
                else
                        reported_resolution = (NSEC_PER_SEC * res.tv_sec) + 
res.tv_nsec;
@@ -2008,9 +2049,9 @@
                 * This will reliably capture resolution <= 500 usec.
                 */
                times = 1000;
-               clock_gettime(clock, &prev);
+               clock_gettime(used_clock, &prev);
                for (k=0; k < times; k++)
-                       clock_gettime(clock, &now);
+                       clock_gettime(used_clock, &now);
 
                diff = calcdiff_ns(now, prev);
                if (diff == 0) {
@@ -2034,7 +2075,7 @@
                time = calloc(times, sizeof(*time));
 
                for (k=0; k < times; k++)
-                       clock_gettime(clock, &time[k]);
+                       clock_gettime(used_clock, &time[k]);
 
                info(ct_debug, "For %d consecutive calls to 
clock_gettime():\n", times);
                info(ct_debug, "time, delta time (nsec)\n");
@@ -2192,7 +2233,7 @@
                }
                if (priospread)
                        priority--;
-               par->clock = clocksources[clocksel];
+               par->clock = used_clock;
                par->mode = mode;
                par->timermode = timermode;
                par->signal = signum;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.10/src/hwlatdetect/hwlatdetect.py 
new/rt-tests-2.11/src/hwlatdetect/hwlatdetect.py
--- old/rt-tests-2.10/src/hwlatdetect/hwlatdetect.py    2026-02-27 
21:09:47.000000000 +0100
+++ new/rt-tests-2.11/src/hwlatdetect/hwlatdetect.py    2026-09-16 
22:15:32.000000000 +0200
@@ -14,11 +14,13 @@
 import subprocess
 import sys
 import time
+from datetime import datetime
 
 version = "0.8"
 debugging = False
 quiet = False
 watch = False
+args = None
 
 
 def debug(dstr):
@@ -253,7 +255,8 @@
 
     class Sample:
         'private class for tracer sample data'
-        __slots__ = 'cpu', 'timestamp', 'inner', 'outer', 'count'
+        __slots__ = 'cpu', 'timestamp', 'delta', 'inner', 'outer', 'count'
+        prev = float('nan')
 
         def __init__(self, line):
             fields = line.split()
@@ -276,14 +279,26 @@
             i, o = fields[6].split('/')
             ts = fields[7][3:]
             self.timestamp = str(ts)
+            ts_float = float(ts)
+            self.delta = ts_float - self.__class__.prev
+            self.__class__.prev = ts_float
             self.inner = int(i)
             self.outer = int(o)
             self.count = int(kv["count"]) if "count" in kv else None
 
+        def format_timestamp(self):
+            """Format timestamp with %n (nanoseconds) support."""
+            if not args.time_format:
+                return self.timestamp
+            p = self.timestamp.split('.')
+            ns = p[1] if len(p) > 1 else '0' * 9
+            t = datetime.fromtimestamp(float(f"{p[0]}.{ns[:6]}"))
+            return t.strftime(args.time_format.replace('%n', ns))
+
         def __str__(self):
-            if self.count is not None:
-                return f"ts: {self.timestamp}, inner:{self.inner}, 
outer:{self.outer}, cpu:{self.cpu}, count:{self.count}"
-            return f"ts: {self.timestamp}, inner:{self.inner}, 
outer:{self.outer}, cpu:{self.cpu}"
+            s = f"ts: {self.format_timestamp()}"
+            s += f", delta:{self.delta:.6f}, inner:{self.inner}, 
outer:{self.outer}, cpu:{self.cpu}"
+            return s if self.count is None else s + f", count:{self.count}"
 
         def display(self):
             """ convert object to string and print """
@@ -469,6 +484,9 @@
                         dest="watch",
                         help="print sample data to stdout as it arrives")
 
+    parser.add_argument("--time-format",
+                        help="strftime format for timestamps (e.g. 
%%H:%%M:%%S.%%n)")
+
     args = parser.parse_args()
 
     # need these before creating detector instance
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.10/src/pi_tests/README 
new/rt-tests-2.11/src/pi_tests/README
--- old/rt-tests-2.10/src/pi_tests/README       2026-02-27 21:09:47.000000000 
+0100
+++ new/rt-tests-2.11/src/pi_tests/README       2026-09-16 22:15:32.000000000 
+0200
@@ -1,3 +1,5 @@
+SPDX-License-Identifier: GPL-2.0-or-later
+
 DESCRIPTION
 
 The pi_stress program is a stress test that is intended to exercise
@@ -22,20 +24,20 @@
 low-priority thread holds a mutex while a medium priority thread runs
 (keeping the low-priority thread from releasing the mutex). The
 high-priority thread attempts to acquire the mutex and is blocked
-because of the low-priority thread holding it. If priority inheritence
+because of the low-priority thread holding it. If priority inheritance
 is working, the low-priority thread will receive a priority boost
 (will inherit the high-priority thread's priority) and will then run
 and release the mutex, averting a deadlock.
 
 On a multi-processor system, the admin and reporter threads are run
-one one processor while the inversion groups are run on another
+on one processor while the inversion groups are run on another
 processor. 
 
 
 STEPS TO RUN
 
 Install the pi_tests rpm. If you are running Fedora Core, the simplest
-way do to that is to fetchthe rt-userspace.repo file from:
+way do to that is to fetch the rt-userspace.repo file from:
 
 http://people.redhat.com/~williams/rt-userspace.repo
 
@@ -74,7 +76,7 @@
 summary will be printed to show how many inversions were performed and
 how long the test ran.
 
-To run the test for a specifed time, use the --duraton=<seconds>
+To run the test for a specifed time, use the --duration=<seconds>
 option.
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.10/src/pi_tests/pi_stress.c 
new/rt-tests-2.11/src/pi_tests/pi_stress.c
--- old/rt-tests-2.10/src/pi_tests/pi_stress.c  2026-02-27 21:09:47.000000000 
+0100
+++ new/rt-tests-2.11/src/pi_tests/pi_stress.c  2026-09-16 22:15:32.000000000 
+0200
@@ -134,8 +134,8 @@
        status = pthread_setschedparam(pthread_self(), admin_sa.sched_policy,
                                       &thread_param);
        if (status) {
-               pi_error("%s: boosting to max priority: 0x%x\n", __func__,
-                        status);
+               pi_error("Failed to set real-time priority: %s\n", 
strerror(status));
+               pi_error("Please run with root privileges to set real-time 
priorities.\n");
                return FAILURE;
        }
        /* block unwanted signals */
@@ -209,7 +209,7 @@
                pi_info("waiting for all threads to complete\n");
                status = pthread_barrier_wait(&all_threads_done);
                if (status && status != PTHREAD_BARRIER_SERIAL_THREAD) {
-                       pi_error("%s: pthread_barrier_wait(all_threads_ready): 
0x%x\n", __func__, status);
+                       pi_error("%s: pthread_barrier_wait(all_threads_done): 
0x%x\n", __func__, status);
                        return FAILURE;
                }
                pi_info("All threads terminated!\n");
@@ -605,13 +605,16 @@
        }
        set_shutdown_flag();
        pi_debug("low_priority[%d]: entering done barrier\n", p->id);
-       /* wait for all threads to finish */
-       status = pthread_barrier_wait(&all_threads_done);
-       if (status && status != PTHREAD_BARRIER_SERIAL_THREAD) {
-               pi_error
-                   ("low_priority[%d]: pthread_barrier_wait(all_threads_done): 
%x",
-                    p->id, status);
-               return NULL;
+
+       if (have_errors == 0) {
+               /* wait for all threads to finish */
+               status = pthread_barrier_wait(&all_threads_done);
+               if (status && status != PTHREAD_BARRIER_SERIAL_THREAD) {
+                       pi_error
+                           ("low_priority[%d]: 
pthread_barrier_wait(all_threads_done): %x",
+                            p->id, status);
+                       return NULL;
+               }
        }
        pi_debug("low_priority[%d]: exiting\n", p->id);
        return NULL;
@@ -740,7 +743,7 @@
                status = sched_setaffinity(0, sizeof(cpu_set_t), &cpu_mask);
                if (status < 0) {
                        pi_error
-                           ("high_priority[%d]: set cpu affinity*dl): %x\n",
+                           ("high_priority[%d]: set cpu affinity (dl): %x\n",
                            p->id, status);
                        return NULL;
                }
@@ -802,7 +805,7 @@
                        }
                        pthread_mutex_unlock(&shutdown_mtx);
                }
-               pi_debug("high_priority[%d]: entering start state (%d)\n", 
p->id,
+               pi_debug("high_priority[%d]: entering start state (%lu)\n", 
p->id,
                      count++);
                status = pthread_barrier_wait(&p->start_barrier);
                if (status && status != PTHREAD_BARRIER_SERIAL_THREAD) {
@@ -1089,6 +1092,11 @@
                exit(EXIT_FAILURE);
        }
 
+       if (*p != '\0') {
+               pi_error("invalid number format: %s\n", str);
+               exit(EXIT_FAILURE);
+       }
+
        return n;
 }
 
@@ -1106,6 +1114,11 @@
                exit(EXIT_FAILURE);
        }
 
+       if (*p != '\0') {
+               pi_error("invalid number format: %s\n", str);
+               exit(EXIT_FAILURE);
+       }
+
        return n;
 }
 
@@ -1208,7 +1221,7 @@
                        break;
                case OPT_GROUPS:
                case 'g':
-                       ngroups = strtol(optarg, NULL, 10);
+                       ngroups = parse_signed(optarg);
                        if (ngroups > num_processors) {
                                pi_error("the number of groups cannot exceed 
the number of online processors (%ld)\n", num_processors);
                                exit(-1);
@@ -1221,11 +1234,12 @@
                        break;
                case OPT_INVERSIONS:
                case 'i':
-                       inversions = strtol(optarg, NULL, 10);
+                       inversions = parse_signed(optarg);
                        pi_info("doing %d inversion per group\n", inversions);
                        break;
                case OPT_JSON:
-                       strncpy(jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
+                       strncpy(jsonfile, optarg, MAX_PATH-1);
+               jsonfile[MAX_PATH-1] = '\0';
                        break;
                case OPT_MLOCKALL:
                case 'm':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.10/src/queuelat/README 
new/rt-tests-2.11/src/queuelat/README
--- old/rt-tests-2.10/src/queuelat/README       2026-02-27 21:09:47.000000000 
+0100
+++ new/rt-tests-2.11/src/queuelat/README       2026-09-16 22:15:32.000000000 
+0200
@@ -1,5 +1,6 @@
+SPDX-License-Identifier: GPL-2.0-or-later
 
-cyclictest does not catch all cases where packet forwarding 
+cyclictest does not catch all cases where packet forwarding
 latency can exceed a given threshold.
 
 Example: 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.10/src/queuelat/targeted-ipi/README 
new/rt-tests-2.11/src/queuelat/targeted-ipi/README
--- old/rt-tests-2.10/src/queuelat/targeted-ipi/README  2026-02-27 
21:09:47.000000000 +0100
+++ new/rt-tests-2.11/src/queuelat/targeted-ipi/README  2026-09-16 
22:15:32.000000000 +0200
@@ -1,3 +1,4 @@
+SPDX-License-Identifier: GPL-2.0-or-later
 
 To build:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.10/src/rt-migrate-test/rt-migrate-test.c 
new/rt-tests-2.11/src/rt-migrate-test/rt-migrate-test.c
--- old/rt-tests-2.10/src/rt-migrate-test/rt-migrate-test.c     2026-02-27 
21:09:47.000000000 +0100
+++ new/rt-tests-2.11/src/rt-migrate-test/rt-migrate-test.c     2026-09-16 
22:15:32.000000000 +0200
@@ -68,9 +68,27 @@
        n = vsnprintf(buff, BUFSIZ, fmt, ap);
        va_end(ap);
 
+       /*
+        * vsnprintf() returns the number of characters it would have
+        * written; clamp it so we never hand write() a length past the
+        * end of buff.
+        */
+       if (n >= BUFSIZ)
+               n = BUFSIZ - 1;
+
        ret = write(mark_fd, buff, n);
-       if (ret < 0)
-               fprintf(stderr, "%s: write failed\n", __func__);
+       if (ret < 0) {
+               /*
+                * The trace marker is a best-effort diagnostic aid. If the
+                * write fails (e.g. tracefs not writable, markers disabled),
+                * report it once and stop trying, rather than flooding stderr
+                * for every marker for the rest of the run.
+                */
+               fprintf(stderr, "%s: write to trace_marker failed: %s\n",
+                       __func__, strerror(errno));
+               close(mark_fd);
+               mark_fd = -1;
+       }
 }
 
 #define nano2sec(nan) (nan / 1000000000ULL)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-tests-2.10/src/sched_deadline/cyclicdeadline.c 
new/rt-tests-2.11/src/sched_deadline/cyclicdeadline.c
--- old/rt-tests-2.10/src/sched_deadline/cyclicdeadline.c       2026-02-27 
21:09:47.000000000 +0100
+++ new/rt-tests-2.11/src/sched_deadline/cyclicdeadline.c       2026-09-16 
22:15:32.000000000 +0200
@@ -289,8 +289,9 @@
        int ret;
        int fd;
 
-       buf[MAXPATH - 1] = 0;
-       snprintf(buf, MAXPATH - 1, "%s/%s", path, name);
+       ret = snprintf(buf, sizeof(buf), "%s/%s", path, name);
+       if (ret < 0 || ret >= (int)sizeof(buf))
+               return -1;
 
        ret = stat(buf, &st);
        if (ret < 0)
@@ -633,7 +634,7 @@
 static void print_hist(FILE *fp, struct sched_data *sd, int nthreads)
 {
        int i;
-       unsigned long maxmax, alloverflows;
+       unsigned long maxmax;
 
        fprintf(fp, "# Histogram\n");
        for (i = 0; i < histogram; i++) {
@@ -661,10 +662,8 @@
        }
        fprintf(fp, "\n");
        fprintf(fp, "# Histogram Overflows:");
-       alloverflows = 0;
        for (i = 0; i < nthreads; i++) {
                fprintf(fp, " %05lu", sd[i].stat.hist->oflow_count);
-               alloverflows += sd[i].stat.hist->oflow_count;
        }
        fprintf(fp, "\n");
 

Reply via email to