]> Gentwo Git Trees - linux/.git/commitdiff
rtla/tests: Don't rely on matching ^1ALL
authorCrystal Wood <crwood@redhat.com>
Wed, 12 Nov 2025 15:25:25 +0000 (09:25 -0600)
committerTomas Glozar <tglozar@redhat.com>
Fri, 21 Nov 2025 09:30:27 +0000 (10:30 +0100)
The timerlat "top stop at failed action" test was relying on "ALL" being
printed immediately after the "1" from the threshold action.  Besides being
fragile, this depends on stdbuf behavior, which is easy to miss when
recreating the test outside of the framework for debugging purposes.

Instead, use the expected/unexpected text mechanism from the
corresponding osnoise test.

Signed-off-by: Crystal Wood <crwood@redhat.com>
Link: https://lore.kernel.org/r/20251112152529.956778-2-crwood@redhat.com
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
tools/tracing/rtla/tests/timerlat.t

index b550a6ae24456fc83f8ccf6d558966873af4930e..bbaa1897d8a85cc099165bd58e1c59d863970596 100644 (file)
@@ -58,7 +58,7 @@ check "multiple actions" \
 check "hist stop at failed action" \
        "timerlat hist -T 2 --on-threshold shell,command='echo -n 1; false' --on-threshold shell,command='echo -n 2'" 2 "^1# RTLA timerlat histogram$"
 check "top stop at failed action" \
-       "timerlat top -T 2 --on-threshold shell,command='echo -n 1; false' --on-threshold shell,command='echo -n 2'" 2 "^1ALL"
+       "timerlat top -T 2 --on-threshold shell,command='echo -n abc; false' --on-threshold shell,command='echo -n defgh'" 2 "^abc" "defgh"
 check "hist with continue" \
        "timerlat hist -T 2 -d 5s --on-threshold shell,command='echo TestOutput' --on-threshold continue" 0 "^TestOutput$"
 check "top with continue" \