[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Mon Dec 5 08:23:01 UTC 2022
The branch, master has been updated
via 5f2565f0a8e testprogs: Do not run tests if undump.sh is not available
via 7d8347e8900 testprogs: If built against system db use the system tools in ldapcmp_restoredc.sh
via 9a97e54f35a testprogs: If built against system db use the system tools in test_net_ads_dns.sh
via 4b9d1b36424 testprogs: If built against system db use the system tools in test_trust_token.sh
via c0d7642a372 testprogs: If built against system db use the system tools in test_primary_group.sh
from a451fa5ef93 lib:compression: Initialize variables
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 5f2565f0a8e57d7afb3cc84157c9ed9c55e66e01
Author: Andreas Schneider <asn at samba.org>
Date: Sat Dec 3 18:06:43 2022 +0100
testprogs: Do not run tests if undump.sh is not available
We don't include source4/selftest/provisions/ in source tarballs!
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
Autobuild-User(master): Volker Lendecke <vl at samba.org>
Autobuild-Date(master): Mon Dec 5 08:22:29 UTC 2022 on sn-devel-184
commit 7d8347e8900ae01fc7073a8b9647c37959dfbe7c
Author: Andreas Schneider <asn at samba.org>
Date: Sun Dec 4 19:46:36 2022 +0100
testprogs: If built against system db use the system tools in ldapcmp_restoredc.sh
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
commit 9a97e54f35af800c5ccb15e54399d8935bf4f70d
Author: Andreas Schneider <asn at samba.org>
Date: Sun Dec 4 19:44:52 2022 +0100
testprogs: If built against system db use the system tools in test_net_ads_dns.sh
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
commit 4b9d1b3642428d8445ddfb46b47de394e80d5857
Author: Andreas Schneider <asn at samba.org>
Date: Sun Dec 4 19:34:35 2022 +0100
testprogs: If built against system db use the system tools in test_trust_token.sh
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
commit c0d7642a372de20aed498d4830a59a9a5af57020
Author: Andreas Schneider <asn at samba.org>
Date: Sat Dec 3 17:48:33 2022 +0100
testprogs: If built against system db use the system tools in test_primary_group.sh
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
-----------------------------------------------------------------------
Summary of changes:
testprogs/blackbox/ldapcmp_restoredc.sh | 7 ++++++-
testprogs/blackbox/test_net_ads_dns.sh | 13 +++++++++++--
testprogs/blackbox/test_primary_group.sh | 22 ++++++++++++++++------
testprogs/blackbox/test_special_group.sh | 7 +++++++
testprogs/blackbox/test_trust_token.sh | 7 ++++---
5 files changed, 44 insertions(+), 12 deletions(-)
Changeset truncated at 500 lines:
diff --git a/testprogs/blackbox/ldapcmp_restoredc.sh b/testprogs/blackbox/ldapcmp_restoredc.sh
index 831b992e960..bf3ba321d8f 100755
--- a/testprogs/blackbox/ldapcmp_restoredc.sh
+++ b/testprogs/blackbox/ldapcmp_restoredc.sh
@@ -15,10 +15,15 @@ shift 2
. $(dirname $0)/subunit.sh
+ldbsearch="${VALGRIND} ldbsearch"
+if [ -x "${BINDIR}/ldbsearch" ]; then
+ ldbsearch="${VALGRIND} ${BINDIR}/ldbsearch"
+fi
+
basedn()
{
SAMDB_PATH=$1
- $BINDIR/ldbsearch -H $SAMDB_PATH --basedn='' --scope=base defaultNamingContext | grep defaultNamingContext | awk '{print $2}'
+ ${ldbsearch} -H $SAMDB_PATH --basedn='' --scope=base defaultNamingContext | grep defaultNamingContext | awk '{print $2}'
}
ldapcmp_with_orig()
diff --git a/testprogs/blackbox/test_net_ads_dns.sh b/testprogs/blackbox/test_net_ads_dns.sh
index 2409420f785..feb731ca1fe 100755
--- a/testprogs/blackbox/test_net_ads_dns.sh
+++ b/testprogs/blackbox/test_net_ads_dns.sh
@@ -25,8 +25,17 @@ samba_tool="$samba4bindir/samba-tool"
net_tool="$samba4bindir/net"
smbpasswd="$samba4bindir/smbpasswd"
texpect="$samba4bindir/texpect"
-ldbsearch="$samba4bindir/ldbsearch"
-ldbmodify="$samba4bindir/ldbmodify"
+
+ldbsearch="${VALGRIND} ldbsearch"
+if [ -x "${BINDIR}/ldbsearch" ]; then
+ ldbsearch="${VALGRIND} ${BINDIR}/ldbsearch"
+fi
+
+ldbmodify="${VALGRIND} ldbmodify"
+if [ -x "${BINDIR}/ldbmodify" ]; then
+ ldbmodify="${VALGRIND} ${BINDIR}/ldbmodify"
+fi
+
newuser="$samba_tool user create"
groupaddmem="$samba_tool group addmembers"
diff --git a/testprogs/blackbox/test_primary_group.sh b/testprogs/blackbox/test_primary_group.sh
index cd2d61495f2..e71504338e5 100755
--- a/testprogs/blackbox/test_primary_group.sh
+++ b/testprogs/blackbox/test_primary_group.sh
@@ -21,6 +21,16 @@ failed=0
. $(dirname $0)/subunit.sh
. $(dirname $0)/common_test_fns.inc
+ldbsearch="${VALGRIND} ldbsearch"
+if [ -x "${BINDIR}/ldbsearch" ]; then
+ ldbsearch="${VALGRIND} ${BINDIR}/ldbsearch"
+fi
+
+ldbmodify="${VALGRIND} ldbmodify"
+if [ -x "${BINDIR}/ldbmodify" ]; then
+ ldbmodify="${VALGRIND} ${BINDIR}/ldbmodify"
+fi
+
TZ=UTC
export TZ
@@ -38,14 +48,14 @@ testit "create '$testuser'" $VALGRIND $PYTHON $BINDIR/samba-tool user create "$t
testit "add '$testgroup'" $VALGRIND $PYTHON $BINDIR/samba-tool group add "$testgroup" || failed=$(expr $failed + 1)
testit "addmembers '$testgroup' '$testuser'" $VALGRIND $PYTHON $BINDIR/samba-tool group addmembers "$testgroup" "$testuser" || failed=$(expr $failed + 1)
-testit "search1" $VALGRIND $BINDIR/ldbsearch -H ldap://$SERVER_IP -U$USERNAME%$PASSWORD -d0 sAMAccountName="$testgroup" objectSid || failed=$(expr $failed + 1)
+testit "search1" ${ldbsearch} -H ldap://$SERVER_IP -U$USERNAME%$PASSWORD -d0 sAMAccountName="$testgroup" objectSid || failed=$(expr $failed + 1)
ldif="${TMPDIR}/search1.ldif"
-$VALGRIND $BINDIR/ldbsearch -H ldap://$SERVER_IP -U$USERNAME%$PASSWORD -d0 sAMAccountName=$testgroup objectSid >$ldif
+${ldbsearch} -H ldap://$SERVER_IP -U$USERNAME%$PASSWORD -d0 sAMAccountName=$testgroup objectSid >$ldif
rid=$(cat $ldif | sed -n 's/^objectSid: S-1-5-21-.*-.*-.*-//p')
-testit "search2" $VALGRIND $BINDIR/ldbsearch -H ldap://$SERVER_IP -U$USERNAME%$PASSWORD -d0 sAMAccountName="$testuser" dn || failed=$(expr $failed + 1)
+testit "search2" ${ldbsearch} -H ldap://$SERVER_IP -U$USERNAME%$PASSWORD -d0 sAMAccountName="$testuser" dn || failed=$(expr $failed + 1)
ldif="${TMPDIR}/search2.ldif"
-$VALGRIND $BINDIR/ldbsearch -H ldap://$SERVER_IP -U$USERNAME%$PASSWORD -d0 sAMAccountName=$testuser dn >$ldif
+${ldbsearch} -H ldap://$SERVER_IP -U$USERNAME%$PASSWORD -d0 sAMAccountName=$testuser dn >$ldif
user_dn=$(cat $ldif | sed -n 's/^dn: //p')
ldif="${TMPDIR}/modify1.ldif"
@@ -55,7 +65,7 @@ changetype: modify
replace: primaryGroupID
primaryGroupID: $rid
EOF
-testit "Change primaryGroupID to $rid" $VALGRIND $BINDIR/ldbmodify -H ldap://$SERVER_IP -U$USERNAME%$PASSWORD -d0 --verbose <$ldif || failed=$(expr $failed + 1)
+testit "Change primaryGroupID to $rid" ${ldbmodify} -H ldap://$SERVER_IP -U$USERNAME%$PASSWORD -d0 --verbose <$ldif || failed=$(expr $failed + 1)
testit "dbcheck run1" $VALGRIND $PYTHON $BINDIR/samba-tool dbcheck --attrs=member || failed=$(expr $failed + 1)
@@ -66,7 +76,7 @@ changetype: modify
replace: primaryGroupID
primaryGroupID: 513
EOF
-testit "Change primaryGroupID to 513" $VALGRIND $BINDIR/ldbmodify -H ldap://$SERVER_IP -U$USERNAME%$PASSWORD -d0 <$ldif || failed=$(expr $failed + 1)
+testit "Change primaryGroupID to 513" ${ldbmodify} -H ldap://$SERVER_IP -U$USERNAME%$PASSWORD -d0 <$ldif || failed=$(expr $failed + 1)
testit "dbcheck run2" $VALGRIND $PYTHON $BINDIR/samba-tool dbcheck --attrs=member || failed=$(expr $failed + 1)
diff --git a/testprogs/blackbox/test_special_group.sh b/testprogs/blackbox/test_special_group.sh
index 00b5dde5670..e2a6aae16db 100755
--- a/testprogs/blackbox/test_special_group.sh
+++ b/testprogs/blackbox/test_special_group.sh
@@ -24,6 +24,13 @@ if [ -x "$BINDIR/tdbrestore" ]; then
fi
samba_undump="$SRCDIR_ABS/source4/selftest/provisions/undump.sh"
+if [ ! -x "${samba_undump}" ]; then
+ subunit_start_test "special group"
+ subunit_skip_test "special group" <<EOF
+Skipping tests - undump.sh is not available in release tarballs
+EOF
+ exit 0
+fi
cleanup_output_directories()
{
diff --git a/testprogs/blackbox/test_trust_token.sh b/testprogs/blackbox/test_trust_token.sh
index 7a41f11faaa..bca1df0ba7c 100755
--- a/testprogs/blackbox/test_trust_token.sh
+++ b/testprogs/blackbox/test_trust_token.sh
@@ -26,9 +26,10 @@ TYPE=$1
shift 1
failed=0
-samba4bindir="$BINDIR"
-
-ldbsearch="$samba4bindir/ldbsearch"
+ldbsearch="${VALGRIND} ldbsearch"
+if [ -x "${BINDIR}/ldbsearch" ]; then
+ ldbsearch="${VALGRIND} ${BINDIR}/ldbsearch"
+fi
. $(dirname $0)/subunit.sh
. $(dirname $0)/common_test_fns.inc
--
Samba Shared Repository
More information about the samba-cvs
mailing list