@@ -25,9 +25,16 @@ rjob() {
}
is_disallowed() {
- local key=$1
- $(echo ${test_disallowlist} | grep -w -q ${key})
- return $?
+ # grep -w treats '-' as a word boundary, so tests whose names also appear in
+ # others e.g. "mini-dtls-hello-verify" in "mini-dtls-hello-verify-48" are
+ # unintentionally skipped as well. Make it more precise by checking if
+ # test_disallowlist is in '<anything> <test_case> <anything>' for each test
+ # case, which should also be faster than running grep or another process
+ # each time.
+ case " ${test_disallowlist} " in
+ *" $1 "*) return 0 ;;
+ esac
+ return 1
}
# TODO
run-ptest is using 'grep -w' to determine disabled tests in is_disallowed(). If a disabled test's name is a subset of another, e.g. 'mini-dtls-hello-verify' is intended to be skipped but we also have 'mini-dtls-hello-verify-48', then both are disabled. This old matching mechanism was actually disabling six extra tests, which are re-enabled now. Results before change (qemuriscv64): |gnutls test summary: |-------------------- |total: 382 |pass : 367 |fail : 0 |skip : 15 | |DURATION: 227 |END: /usr/lib/gnutls/ptest |2026-12-02T15:17 |STOP: ptest-runner |TOTAL: 1 FAIL: 0 Results after change (qemuriscv64): |gnutls test summary: |-------------------- |total: 388 |pass : 372 |fail : 0 |skip : 16 | |DURATION: 224 |END: /usr/lib/gnutls/ptest |2026-12-02T14:58 |STOP: ptest-runner |TOTAL: 1 FAIL: 0 |root@qemuriscv64:~# Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> --- meta/recipes-support/gnutls/gnutls/run-ptest | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)