]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tests: Fix some wbinfo_lookuprids_cache flakyness
authorVolker Lendecke <vl@samba.org>
Fri, 5 Jun 2026 09:37:55 +0000 (11:37 +0200)
committerGünther Deschner <gd@samba.org>
Mon, 8 Jun 2026 14:49:01 +0000 (14:49 +0000)
If the key contains spaces, the shell qouting through "testit" does
not work properly. Avoid having to fix that quoting by replacing
spaces with '\20'.

You can force it by setting the

my $samsid = "S-1-5-21-1-32-" . int(rand(4294967295));

in selftest/target/Samba3.pm.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Mon Jun  8 14:49:01 UTC 2026 on atb-devel-224

source3/script/tests/test_wbinfo_lookuprids_cache.sh

index 7a5d0f7279ab5d44ce211d377be9fb2572148628..ce71fb549bd520ee404b79157435b25420728897 100755 (executable)
@@ -36,7 +36,7 @@ echo "$ndr_keys" | while IFS= read -r k; do
        echo "  key='${k}' (length=${#k})"
 done
 
-key=$(echo "$ndr_keys" | head -1)
+key=$(echo "$ndr_keys" | head -1 | sed 's/ /\\20/g')
 echo "DEBUG: Using key='${key}' (length=${#key})"
 
 if [ -n "$key" ]; then