1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-15 16:23:49 +03:00

s3:tests: Use bash and disable history expansion for test_wbinfo_lookuprids_cache.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Aug  5 12:50:07 UTC 2025 on atb-devel-224
This commit is contained in:
Andreas Schneider
2025-08-05 11:31:59 +02:00
committed by Volker Lendecke
parent df35b106c8
commit 43b3ee91b2

View File

@@ -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