From e5b4b3da35f5117de946f159c9a7739273a4783a Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Thu, 31 Jul 2025 15:35:04 +0200 Subject: [PATCH] s3-selftest: fix test_wbinfo_lookuprids_cache.sh This script is using tdbtool for deleting keys of a particular winbind NDR operation for regression testing. There are two issues here: The opnum for this winbind NDR operation has changed (as new calls have been added to the interface), it is no longer 16 but now 17. Better try to lookup the current opnum from the IDL. As tdbtool always returns with success error code regardless of the success of its command - in this case a delete key operation - the test is simply not able to fail at all (patch following to fix tdbtool itself). Guenther Signed-off-by: Guenther Deschner Reviewed-by: Douglas Bagnall --- source3/script/tests/test_wbinfo_lookuprids_cache.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/script/tests/test_wbinfo_lookuprids_cache.sh b/source3/script/tests/test_wbinfo_lookuprids_cache.sh index abb078bf7ef..fef4e04b369 100755 --- a/source3/script/tests/test_wbinfo_lookuprids_cache.sh +++ b/source3/script/tests/test_wbinfo_lookuprids_cache.sh @@ -23,7 +23,8 @@ incdir=$(dirname $0)/../../../testprogs/blackbox testit "flush" "$NET" "cache" "flush" || failed=$(expr $failed + 1) testit "lookuprids1" "$WBINFO" "-R" "512,12345" || failed=$(expr $failed + 1) -key=$("$TDBDUMP" "$cache" | grep ^key.*NDR.*/16/ | cut -d\" -f2) +opnum=$($PYTHON -c'from samba.dcerpc.winbind import wbint_LookupRids; print(wbint_LookupRids.opnum())') +key=$("$TDBDUMP" "$cache" | grep ^key.*NDR.*/"$opnum"/ | cut -d\" -f2) testit "delete" "$TDBTOOL" "$cache" delete "$key" testit "lookuprids2" "$WBINFO" "-R" "512,12345" || failed=$(expr $failed + 1) -- 2.47.2