rt-tests: centralize wrapper helpers and improve interrupt handling#425
Open
smuppand wants to merge 4 commits intoqualcomm-linux:mainfrom
Open
rt-tests: centralize wrapper helpers and improve interrupt handling#425smuppand wants to merge 4 commits intoqualcomm-linux:mainfrom
smuppand wants to merge 4 commits intoqualcomm-linux:mainfrom
Conversation
Add shared helpers used by RT test wrappers for command execution, JSON parsing, KPI aggregation, heartbeat handling, interrupt-aware cleanup, and PASS/FAIL/SKIP result emission. This avoids duplicating wrapper logic across individual rt-tests and provides a common path for preserving partial results during user interrupts. The helpers are kept POSIX shell compatible so they can run on minimal Yocto/rootfs environments used in CI and LAVA. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
6b7e301 to
cf055b8
Compare
Update common JSON-producing RT test wrappers to use the shared lib_rt.sh execution, parsing, KPI aggregation, and result emission helpers. This keeps per-test behavior unchanged while making the wrappers more consistent, easier to maintain, and safer for CI/LAVA use. The wrappers now share interrupt-aware handling so Ctrl-C or TERM stops the active test cleanly and preserves any collected partial results. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Update streaming RT test wrappers to use the shared FIFO, heartbeat, cleanup, JSON parsing, and interrupt-aware result helpers. These tests stream output while running, so they need stronger cleanup for child processes, pipes, heartbeat state, and background workloads. This improves reliability when tests are interrupted or fail mid-run while preserving partial logs and KPI data for debugging. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Update Hackbench and PI_Stress wrappers while preserving their test-specific behavior. Hackbench keeps its Time: log parsing flow but uses shared command execution, heartbeat, interrupt handling, and result emission helpers. PI_Stress keeps its special TERM handling and uses the validated duration flow with -D seconds, while preserving inversion count aggregation, optional baseline gating, and partial result reporting on user interrupt. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR standardizes the RT test wrappers by moving common execution, parsing, KPI aggregation, heartbeat, cleanup, and result-emission logic into
Runner/utils/[lib_rt.sh](http://lib_rt.sh/).The individual
[run.sh](http://run.sh/)wrappers are updated to reuse the shared helpers while preserving the existing test behavior and command-line flow that has already been validated.Why
The RT wrappers had repeated logic for:
.resPASS/FAIL/SKIP resultsCentralizing this makes the wrappers easier to maintain, reduces duplicated logic, and improves reliability in CI/LAVA, especially when tests are interrupted or fail mid-run.
What changed
Runner/utils/[lib_rt.sh](http://lib_rt.sh/)PI_Stressspecial TERM handling becausepi_stresscan use TERM internallyHackbenchlog-basedTime:parsing flow while using shared execution/result helpers0and write final status to<TESTNAME>.res