From 00d49371c00a3a7286896d064d0a6ed8c06755e6 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Thu, 28 Apr 2022 17:43:09 +0200 Subject: mbuto: kselftests: Check if no collections are given after adding single tests ...and not before -- otherwise a -T option without -C will cause all collections to be enabled. Fixes: 2584ae2bd68b ("mbuto: kselftests: Fill in collections if none are given") Signed-off-by: Stefano Brivio --- mbuto | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mbuto b/mbuto index ad95efc..65a9096 100755 --- a/mbuto +++ b/mbuto @@ -216,14 +216,15 @@ profile_kselftests() { __colls="${__c} ${__colls}" done + for __t in ${SUBOPT_test}; do + __colls="${__colls} $(echo ${__t} | ${AWK} -F':' '{print $1}')" + done + if [ -z "${__colls}" ]; then __colls="$(${SED} -n 's/^TARGETS += \(.*\)$/\1/p' \ "${__makefile}")" fi - for __t in ${SUBOPT_test}; do - __colls="${__colls} $(echo ${__t} | ${AWK} -F':' '{print $1}')" - done __colls="$(echo ${__colls} | ${TR} ' ' '\n' | ${SORT} -u)" __pattern="$(list_join "${__colls}" '^' '$' '|')" -- cgit v1.2.3