From: Andreas Schneider Date: Mon, 28 Oct 2024 14:09:44 +0000 (+0100) Subject: nsswitch:tests: Use testit_grep to get error printed if cmd fails X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=HEAD;p=thirdparty%2Fsamba.git nsswitch:tests: Use testit_grep to get error printed if cmd fails Signed-off-by: Andreas Schneider Reviewed-by: Anoop C S Autobuild-User(master): Anoop C S Autobuild-Date(master): Fri Jun 12 17:30:41 UTC 2026 on atb-devel-224 --- diff --git a/nsswitch/tests/test_wbinfo_name_lookup.sh b/nsswitch/tests/test_wbinfo_name_lookup.sh index 048fdfcf6bc..02f4fbcefb6 100755 --- a/nsswitch/tests/test_wbinfo_name_lookup.sh +++ b/nsswitch/tests/test_wbinfo_name_lookup.sh @@ -39,12 +39,12 @@ testit "name-to-sid.realm-user" \ # that this does not change subsequent sid-to-name # queries. sid=$($wbinfo -n $REALM/$DC_USERNAME | sed -e 's/ .*//') -out=$($wbinfo -s $sid | sed -e 's/ .//') # winbindd returns usernames in lowercase lcuser=$(echo $DC_USERNAME | tr A-Z a-z) -testit "Verify DOMAIN/USER output" \ - test "$out" = "$DOMAIN/$lcuser" || - failed=$(expr $failed + 1) +testit_grep "Verify DOMAIN/USER output" \ + "${DOMAIN}/${lcuser}" \ + ${wbinfo} -s "${sid}" || + failed=$((failed + 1)) # Two separator characters should fail testit_expect_failure "name-to-sid.double-separator" \