diff mbox series

[v1] ptest-perl: fix overly greedy SKIP detection in run-ptest

Message ID 20260825123609.31426-1-pratik.farkase@est.tech
State Under Review
Headers show
Series [v1] ptest-perl: fix overly greedy SKIP detection in run-ptest | expand

Commit Message

Pratik Farkase Aug. 25, 2026, 12:36 p.m. UTC
The run-ptest script uses 'grep -i SKIP' to detect skipped tests, which
incorrectly marks entire test files as SKIP when they merely contain the
word 'skip' in their output. This happens with:

- TAP subtest skip directives: 'ok 3 # skip PadWalker required'
- Test descriptions containing 'skip': 'ok 84 - attributes successfully skipped'

Per the TAP specification, a test file is fully skipped only when its
plan line reads '1..0' (zero tests planned). Change the detection to
match only this pattern.

Tested across all 12 recipes that use the default ptest-perl run-ptest.
The fix corrects 19 false SKIPs to PASS across 5 recipes.

[YOCTO #13411]

AI-Generated: Assisted by Claude Sonnet 4

Signed-off-by: Pratik Farkase <pratik.farkase@est.tech>
---
 meta/files/ptest-perl/run-ptest | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/files/ptest-perl/run-ptest b/meta/files/ptest-perl/run-ptest
index 51e467abe7..814d50ae63 100644
--- a/meta/files/ptest-perl/run-ptest
+++ b/meta/files/ptest-perl/run-ptest
@@ -8,7 +8,7 @@  for case in `find t -type f -name '*.t'`; do
     if [ $ret -ne 0 ]; then
         result=1
         echo "FAIL: ${case%.t}"
-    elif grep -i 'SKIP' $case.output; then
+    elif grep -q '^1\.\.0' $case.output; then
         echo "SKIP: ${case%.t}"
     else
         echo "PASS: ${case%.t}"