]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:tests: Use bash and disable history expansion for test_wbinfo_lookuprids_cache.sh
authorAndreas Schneider <asn@samba.org>
Tue, 5 Aug 2025 09:31:59 +0000 (11:31 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 5 Aug 2025 12:50:07 +0000 (12:50 +0000)
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

source3/script/tests/test_wbinfo_lookuprids_cache.sh

index 2f441d21af3dcb7bfd59d56f59d1bf9187fae43b..31dad5c3f14da9514f97205d63d689b4f7eb2b04 100755 (executable)
@@ -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