From 43b3ee91b29f32477e5ce65ca2b9f1fed86d39ba Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 5 Aug 2025 11:31:59 +0200 Subject: [PATCH] s3:tests: Use bash and disable history expansion for test_wbinfo_lookuprids_cache.sh Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Tue Aug 5 12:50:07 UTC 2025 on atb-devel-224 --- source3/script/tests/test_wbinfo_lookuprids_cache.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source3/script/tests/test_wbinfo_lookuprids_cache.sh b/source3/script/tests/test_wbinfo_lookuprids_cache.sh index 2f441d21af3..31dad5c3f14 100755 --- a/source3/script/tests/test_wbinfo_lookuprids_cache.sh +++ b/source3/script/tests/test_wbinfo_lookuprids_cache.sh @@ -1,4 +1,8 @@ -#!/bin/sh +#!/bin/bash + +# Disabling history expansion temporarily +# This is needed, as the tdb key can include e.g. !6 +set +H WBINFO="$VALGRIND ${WBINFO:-$BINDIR/wbinfo}" samba_tdbtool=tdbtool @@ -26,7 +30,7 @@ testit "lookuprids1" "$WBINFO" "-R" "512,12345" || failed=$(expr $failed + 1) opnum=$($PYTHON -c'from samba.dcerpc.winbind import wbint_LookupRids; print(wbint_LookupRids.opnum())') key=$("$TDBDUMP" "$cache" | awk -F'"' -v opnum="${opnum}" '/key.*NDR/ { regex = "NDR/[^/]+/" opnum "/.*$"; if (match($2, regex)) print substr($2, RSTART, RLENGTH) }') -testit "delete" "$TDBTOOL" "$cache" delete "$key" +testit "delete key" "$TDBTOOL" "$cache" delete "$key" || failed=$((failed + 1)) testit "lookuprids2" "$WBINFO" "-R" "512,12345" || failed=$(expr $failed + 1) testok $0 $failed -- 2.47.3