[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Wed Jun 22 10:11:01 UTC 2022


The branch, master has been updated
       via  3d57bb74500 s3:tests: Reformat xattr-tdb-1/run.sh
       via  5cfd0b9fdc0 s3:tests: Reformat vfstest-catia/run.sh
       via  5467252fd40 s3:tests: Reformat vfstest-acl/run.sh
       via  e862d7e7a29 s3:tests: Reformat stream-depot/run.sh
       via  a8c6b30e723 s3:tests: Reformat full_audit_segfault/run.sh
       via  4bb7f293633 s3:tests: Reformat wb_pad.sh
       via  7677b89abcf s3:tests: Reformat test_zero_data.sh
       via  ee972c11cda s3:tests: Reformat test_winbind_ignore_domains.sh
       via  e652a764df8 s3:tests: Reformat test_wbinfo_sids2xids.sh
       via  c9f328b7186 s3:tests: Reformat test_wbinfo_lookuprids_cache.sh
       via  a73b4bf8705 s3:tests: Reformat test_virus_scanner.sh
       via  79ef1f6402c s3:tests: Reformat test_veto_rmdir.sh
       via  a8303298197 s3:tests: Reformat test_valid_users.sh
       via  a10f4dffcd1 s3:tests: Reformat test_usernamemap.sh
       via  85603a5ee00 s3:tests: Reformat test_timestamps.sh
       via  7dce28b712f s3:tests: Reformat test_tevent_glib_glue.sh
       via  a7fe9b56473 s3:tests: Reformat test_testparm_s3.sh
      from  7897bc8c792 security.idl: add missing BUILTIN SIDs

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 3d57bb74500b46c242fd0850181bcb0335268dd2
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:12 2022 +0200

    s3:tests: Reformat xattr-tdb-1/run.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>
    
    Autobuild-User(master): Günther Deschner <gd at samba.org>
    Autobuild-Date(master): Wed Jun 22 10:10:48 UTC 2022 on sn-devel-184

commit 5cfd0b9fdc0d0c83d579269123f0887925c9a554
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:12 2022 +0200

    s3:tests: Reformat vfstest-catia/run.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 5467252fd408d79718ae629c548be1c4614fe278
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:12 2022 +0200

    s3:tests: Reformat vfstest-acl/run.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit e862d7e7a2975dcfb7246a3e19fdb643c006bb0b
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:08 2022 +0200

    s3:tests: Reformat stream-depot/run.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit a8c6b30e72373e13cb64f3503ef1237cefa7e753
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:08 2022 +0200

    s3:tests: Reformat full_audit_segfault/run.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 4bb7f2936336d1c2f1a2ba75a6949d36e144cee7
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:12 2022 +0200

    s3:tests: Reformat wb_pad.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 7677b89abcf2e156f184b63be5f88bda9308a49b
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:12 2022 +0200

    s3:tests: Reformat test_zero_data.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit ee972c11cdae83d43279f7095696380f04d2da22
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:12 2022 +0200

    s3:tests: Reformat test_winbind_ignore_domains.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit e652a764df8862a3b1c208edfb86dedb63e9b361
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:12 2022 +0200

    s3:tests: Reformat test_wbinfo_sids2xids.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit c9f328b7186051b0ae7fbd1c788102c5f13f7ec5
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:11 2022 +0200

    s3:tests: Reformat test_wbinfo_lookuprids_cache.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit a73b4bf8705f98c750582dd019ac9b3fa7392f5b
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:11 2022 +0200

    s3:tests: Reformat test_virus_scanner.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 79ef1f6402c60c69c2c531ff7889fb935e2cafd3
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:11 2022 +0200

    s3:tests: Reformat test_veto_rmdir.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit a83032981971624ccb06b9eeadbf0d0b2d9ef1e2
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:11 2022 +0200

    s3:tests: Reformat test_valid_users.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit a10f4dffcd17f37fb670a1a230fab9ae391a59ac
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:11 2022 +0200

    s3:tests: Reformat test_usernamemap.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 85603a5ee006824572313bcc1dfa4b7d3b2dd50a
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:11 2022 +0200

    s3:tests: Reformat test_timestamps.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit 7dce28b712f227ed2943a2a71546307f8eeb8d23
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:11 2022 +0200

    s3:tests: Reformat test_tevent_glib_glue.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

commit a7fe9b56473561fbf9f46b77fcfd9163445b4a78
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Apr 22 15:34:11 2022 +0200

    s3:tests: Reformat test_testparm_s3.sh
    
    shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 source3/script/tests/full_audit_segfault/run.sh    |  14 +-
 source3/script/tests/stream-depot/run.sh           |  22 +-
 source3/script/tests/test_testparm_s3.sh           | 123 +++++----
 source3/script/tests/test_tevent_glib_glue.sh      |   7 +-
 source3/script/tests/test_timestamps.sh            |  67 ++---
 source3/script/tests/test_usernamemap.sh           |   6 +-
 source3/script/tests/test_valid_users.sh           |  58 ++--
 source3/script/tests/test_veto_rmdir.sh            | 300 ++++++++++-----------
 source3/script/tests/test_virus_scanner.sh         | 140 +++++-----
 .../script/tests/test_wbinfo_lookuprids_cache.sh   |  12 +-
 source3/script/tests/test_wbinfo_sids2xids.sh      |   6 +-
 .../script/tests/test_winbind_ignore_domains.sh    |  56 ++--
 source3/script/tests/test_zero_data.sh             |  16 +-
 source3/script/tests/vfstest-acl/run.sh            |  54 ++--
 source3/script/tests/vfstest-catia/run.sh          |  92 +++----
 source3/script/tests/wb_pad.sh                     |  15 +-
 source3/script/tests/xattr-tdb-1/run.sh            |  54 ++--
 17 files changed, 524 insertions(+), 518 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/script/tests/full_audit_segfault/run.sh b/source3/script/tests/full_audit_segfault/run.sh
index 752b27125c8..a2ba43f372e 100755
--- a/source3/script/tests/full_audit_segfault/run.sh
+++ b/source3/script/tests/full_audit_segfault/run.sh
@@ -1,23 +1,25 @@
 #!/bin/sh
 if [ $# -lt 1 ]; then
-cat <<EOF
+	cat <<EOF
 Usage: run.sh VFSTEST
 EOF
-exit 1;
+	exit 1
 fi
 
-TALLOC_FILL_FREE=0; export TALLOC_FILL_FREE
+TALLOC_FILL_FREE=0
+export TALLOC_FILL_FREE
 
 TESTBASE="$(dirname $0)"
-VFSTEST="$VALGRIND $1"; shift 1;
+VFSTEST="$VALGRIND $1"
+shift 1
 ADDARGS="$*"
 
-incdir=`dirname $0`/../../../../testprogs/blackbox
+incdir=$(dirname $0)/../../../../testprogs/blackbox
 . $incdir/subunit.sh
 
 failed=0
 
 testit "vfstest" "$VFSTEST" -f "$TESTBASE/vfstest.cmd" "$ADDARGS" ||
-    failed=$(expr $failed + 1)
+	failed=$(expr $failed + 1)
 
 exit $failed
diff --git a/source3/script/tests/stream-depot/run.sh b/source3/script/tests/stream-depot/run.sh
index 38ef2832948..bcc85b6d98c 100755
--- a/source3/script/tests/stream-depot/run.sh
+++ b/source3/script/tests/stream-depot/run.sh
@@ -1,12 +1,12 @@
 #!/bin/sh
 if [ $# -lt 2 ]; then
-cat <<EOF
+	cat <<EOF
 Usage: run.sh VFSTEST PREFIX
 EOF
-exit 1;
+	exit 1
 fi
 
-TESTBASE=`dirname $0`
+TESTBASE=$(dirname $0)
 VFSTEST=$1
 PREFIX=$2
 shift 2
@@ -15,22 +15,22 @@ ADDARGS="$*"
 VFSTEST_PREFIX=vfstest
 VFSTEST_TMPDIR=$(mktemp -d ${PREFIX}/${VFSTEST_PREFIX}_XXXXXX)
 
-incdir=`dirname $0`/../../../../testprogs/blackbox
+incdir=$(dirname $0)/../../../../testprogs/blackbox
 . $incdir/subunit.sh
 
 failed=0
 
 cd $VFSTEST_TMPDIR || exit 1
 
-testit "vfstest" $VFSTEST -f $TESTBASE/vfstest.cmd $ADDARGS || failed=`expr $failed + 1`
+testit "vfstest" $VFSTEST -f $TESTBASE/vfstest.cmd $ADDARGS || failed=$(expr $failed + 1)
 testname=".streams check"
 subunit_start_test $testname
-NUM=`find .streams | wc -l`
-if [ $NUM -ne 3 ] ; then
-echo "streams_depot left ${NUM} in .streams, expected 3" | subunit_fail_test $testname
-    failed=`expr $failed + 1`
-else 
-    subunit_pass_test $testname
+NUM=$(find .streams | wc -l)
+if [ $NUM -ne 3 ]; then
+	echo "streams_depot left ${NUM} in .streams, expected 3" | subunit_fail_test $testname
+	failed=$(expr $failed + 1)
+else
+	subunit_pass_test $testname
 fi
 
 exit $failed
diff --git a/source3/script/tests/test_testparm_s3.sh b/source3/script/tests/test_testparm_s3.sh
index 9ef3f7e0097..1cfd0a2e783 100755
--- a/source3/script/tests/test_testparm_s3.sh
+++ b/source3/script/tests/test_testparm_s3.sh
@@ -6,10 +6,10 @@
 # and the macro expansions.
 
 if [ $# -lt 1 ]; then
-cat <<EOF
+	cat <<EOF
 Usage: test_net_registry_roundtrip.sh LOCAL_PATH
 EOF
-exit 1;
+	exit 1
 fi
 
 LOCAL_PATH="$1"
@@ -17,7 +17,7 @@ LOCAL_PATH="$1"
 TEMP_CONFFILE=${LOCAL_PATH}/smb.conf.tmp
 TESTPARM="$VALGRIND ${TESTPARM:-$BINDIR/testparm} --suppress-prompt --skip-logic-checks"
 
-incdir=`dirname $0`/../../../testprogs/blackbox
+incdir=$(dirname $0)/../../../testprogs/blackbox
 . $incdir/subunit.sh
 
 failed=0
@@ -26,7 +26,7 @@ test_include_expand_macro()
 {
 	MACRO=$1
 	rm -f ${TEMP_CONFFILE}
-	cat >${TEMP_CONFFILE}<<EOF
+	cat >${TEMP_CONFFILE} <<EOF
 [global]
 	include = ${TEMP_CONFFILE}.%${MACRO}
 EOF
@@ -37,7 +37,7 @@ test_one_global_option()
 {
 	OPTION="$@"
 	rm -f ${TEMP_CONFFILE}
-	cat > ${TEMP_CONFFILE}<<EOF
+	cat >${TEMP_CONFFILE} <<EOF
 [global]
 	${OPTION}
 EOF
@@ -47,7 +47,7 @@ EOF
 test_copy()
 {
 	rm -f ${TEMP_CONFFILE}
-	cat > ${TEMP_CONFFILE}<<EOF
+	cat >${TEMP_CONFFILE} <<EOF
 [share1]
 	path = /tmp
 	read only = no
@@ -60,87 +60,87 @@ EOF
 
 test_testparm_deprecated()
 {
-    name=$1
-    old_SAMBA_DEPRECATED_SUPPRESS=$SAMBA_DEPRECATED_SUPPRESS
-    SAMBA_DEPRECATED_SUPPRESS=
-    export SAMBA_DEPRECATED_SUPPRESS
-    testit_grep $name 'WARNING: The "lsaovernetlogon" option is deprecated' $VALGRIND ${TESTPARM} ${TEMP_CONFFILE} --option='lsaovernetlogon=true'
-    SAMBA_DEPRECATED_SUPPRESS=$old_SAMBA_DEPRECATED_SUPPRESS
-    export SAMBA_DEPRECATED_SUPPRESS
+	name=$1
+	old_SAMBA_DEPRECATED_SUPPRESS=$SAMBA_DEPRECATED_SUPPRESS
+	SAMBA_DEPRECATED_SUPPRESS=
+	export SAMBA_DEPRECATED_SUPPRESS
+	testit_grep $name 'WARNING: The "lsaovernetlogon" option is deprecated' $VALGRIND ${TESTPARM} ${TEMP_CONFFILE} --option='lsaovernetlogon=true'
+	SAMBA_DEPRECATED_SUPPRESS=$old_SAMBA_DEPRECATED_SUPPRESS
+	export SAMBA_DEPRECATED_SUPPRESS
 }
 
 test_testparm_deprecated_suppress()
 {
-    name=$1
-    subunit_start_test "$name"
-    output=$(SAMBA_DEPRECATED_SUPPRESS=1 $VALGRIND ${TESTPARM} ${TEMP_CONFFILE} --option='lsa over netlogon = true' 2>&1)
-    status=$?
-    if [ "$status" = "0" ]; then
-       echo "$output" | grep --quiet 'WARNING: The "lsa over netlogon " option is deprecated'
-       status=$?
-       if [ "$status" = "1" ]; then
-           subunit_pass_test "$name"
-       else
-           echo $output | subunit_fail_test "$name"
-       fi
-    else
-       echo $output | subunit_fail_test "$name"
-    fi
+	name=$1
+	subunit_start_test "$name"
+	output=$(SAMBA_DEPRECATED_SUPPRESS=1 $VALGRIND ${TESTPARM} ${TEMP_CONFFILE} --option='lsa over netlogon = true' 2>&1)
+	status=$?
+	if [ "$status" = "0" ]; then
+		echo "$output" | grep --quiet 'WARNING: The "lsa over netlogon " option is deprecated'
+		status=$?
+		if [ "$status" = "1" ]; then
+			subunit_pass_test "$name"
+		else
+			echo $output | subunit_fail_test "$name"
+		fi
+	else
+		echo $output | subunit_fail_test "$name"
+	fi
 }
 
-testit "name resolve order = lmhosts wins host bcast"\
-	test_one_global_option "name resolve order = lmhosts wins host bcast" || \
-	failed=`expr ${failed} + 1`
+testit "name resolve order = lmhosts wins host bcast" \
+	test_one_global_option "name resolve order = lmhosts wins host bcast" ||
+	failed=$(expr ${failed} + 1)
 
-testit_expect_failure "name resolve order = bad wins host bcast"\
-	test_one_global_option "name resolve order = bad wins host bcast" || \
-	failed=`expr ${failed} + 1`
+testit_expect_failure "name resolve order = bad wins host bcast" \
+	test_one_global_option "name resolve order = bad wins host bcast" ||
+	failed=$(expr ${failed} + 1)
 
-testit_expect_failure "name resolve order = lmhosts bad host bcast"\
-	test_one_global_option "name resolve order = lmhosts bad host bcast" || \
-	failed=`expr ${failed} + 1`
+testit_expect_failure "name resolve order = lmhosts bad host bcast" \
+	test_one_global_option "name resolve order = lmhosts bad host bcast" ||
+	failed=$(expr ${failed} + 1)
 
-testit_expect_failure "name resolve order = lmhosts wins bad bcast"\
-	test_one_global_option "name resolve order = lmhosts wins bad bcast" || \
-	failed=`expr ${failed} + 1`
+testit_expect_failure "name resolve order = lmhosts wins bad bcast" \
+	test_one_global_option "name resolve order = lmhosts wins bad bcast" ||
+	failed=$(expr ${failed} + 1)
 
-testit_expect_failure "name resolve order = lmhosts wins host bad"\
-	test_one_global_option "name resolve order = lmhosts wins host bad" || \
-	failed=`expr ${failed} + 1`
+testit_expect_failure "name resolve order = lmhosts wins host bad" \
+	test_one_global_option "name resolve order = lmhosts wins host bad" ||
+	failed=$(expr ${failed} + 1)
 
 testit "netbios name" \
-	test_one_global_option "netbios name = funky" || \
-	failed=`expr ${failed} + 1`
+	test_one_global_option "netbios name = funky" ||
+	failed=$(expr ${failed} + 1)
 
 testit "netbios aliases" \
-	test_one_global_option "netbios aliases = funky1 funky2 funky3" || \
-	failed=`expr ${failed} + 1`
+	test_one_global_option "netbios aliases = funky1 funky2 funky3" ||
+	failed=$(expr ${failed} + 1)
 
 testit "netbios scope" \
-	test_one_global_option "netbios scope = abc" || \
-	failed=`expr ${failed} + 1`
+	test_one_global_option "netbios scope = abc" ||
+	failed=$(expr ${failed} + 1)
 
 testit "workgroup" \
-	test_one_global_option "workgroup = samba" || \
-	failed=`expr ${failed} + 1`
+	test_one_global_option "workgroup = samba" ||
+	failed=$(expr ${failed} + 1)
 
 testit "display charset" \
-	test_one_global_option "display charset = UTF8" || \
-	failed=`expr ${failed} + 1`
+	test_one_global_option "display charset = UTF8" ||
+	failed=$(expr ${failed} + 1)
 
 testit "ldap debug level" \
-	test_one_global_option "ldap debug level = 7" || \
-	failed=`expr ${failed} + 1`
+	test_one_global_option "ldap debug level = 7" ||
+	failed=$(expr ${failed} + 1)
 
-for LETTER in U G D I i L N M R T a d h m v w V ; do
-testit "include with %${LETTER} macro expansion" \
-	test_include_expand_macro "${LETTER}" || \
-	failed=`expr ${failed} + 1`
+for LETTER in U G D I i L N M R T a d h m v w V; do
+	testit "include with %${LETTER} macro expansion" \
+		test_include_expand_macro "${LETTER}" ||
+		failed=$(expr ${failed} + 1)
 done
 
 testit "copy" \
-	test_copy || \
-	failed=`expr ${failed} + 1`
+	test_copy ||
+	failed=$(expr ${failed} + 1)
 
 test_testparm_deprecated "test_deprecated_warning_printed"
 test_testparm_deprecated_suppress "test_deprecated_warning_suppressed"
@@ -148,4 +148,3 @@ test_testparm_deprecated_suppress "test_deprecated_warning_suppressed"
 rm -f ${TEMP_CONFFILE}
 
 testok $0 ${failed}
-
diff --git a/source3/script/tests/test_tevent_glib_glue.sh b/source3/script/tests/test_tevent_glib_glue.sh
index ce8cb3db0c1..fa1d1055825 100755
--- a/source3/script/tests/test_tevent_glib_glue.sh
+++ b/source3/script/tests/test_tevent_glib_glue.sh
@@ -1,12 +1,12 @@
 #!/bin/sh
 
-incdir=`dirname $0`/../../../testprogs/blackbox
+incdir=$(dirname $0)/../../../testprogs/blackbox
 . $incdir/subunit.sh
 
 failed=0
 TESTNAME="tevent_glib_glue_test"
 
-if [ ! -x $BINDIR/tevent_glib_glue_test ] ; then
+if [ ! -x $BINDIR/tevent_glib_glue_test ]; then
 	subunit_start_test "$TESTNAME"
 	subunit_skip_test "$TESTNAME" <<EOF
 Test needs glib2-devel
@@ -14,8 +14,7 @@ EOF
 	testok $0 $failed
 fi
 
-
 testit "$TESTNAME" $VALGRIND $BINDIR/tevent_glib_glue_test ||
-	failed=`expr $failed + 1`
+	failed=$(expr $failed + 1)
 
 testok $0 $failed
diff --git a/source3/script/tests/test_timestamps.sh b/source3/script/tests/test_timestamps.sh
index be8410bd641..c942ee14bcd 100755
--- a/source3/script/tests/test_timestamps.sh
+++ b/source3/script/tests/test_timestamps.sh
@@ -5,8 +5,8 @@
 #
 
 if [ $# -lt 5 ]; then
-    echo "Usage: $0 SERVER_IP USERNAME PASSWORD PREFIX SMBCLIENT"
-    exit 1
+	echo "Usage: $0 SERVER_IP USERNAME PASSWORD PREFIX SMBCLIENT"
+	exit 1
 fi
 
 SERVER_IP="$1"
@@ -18,52 +18,55 @@ SMBCLIENT="$5"
 SMBCLIENT="$VALGRIND ${SMBCLIENT}"
 failed=0
 
-incdir=`dirname $0`/../../../testprogs/blackbox
+incdir=$(dirname $0)/../../../testprogs/blackbox
 . $incdir/subunit.sh
 
 export TZ=GMT
 
-setup_testfiles() {
-    touch -d "$(date --date=@0)" $PREFIX/time_0
-    touch -d "$(date --date=@-1)" $PREFIX/time_-1
-    touch -d "$(date --date=@-2)" $PREFIX/time_-2
-    touch -t 196801010000 $PREFIX/time_1968
+setup_testfiles()
+{
+	touch -d "$(date --date=@0)" $PREFIX/time_0
+	touch -d "$(date --date=@-1)" $PREFIX/time_-1
+	touch -d "$(date --date=@-2)" $PREFIX/time_-2
+	touch -t 196801010000 $PREFIX/time_1968
 }
 
-remove_testfiles() {
-    rm $PREFIX/time_0
-    rm $PREFIX/time_-1
-    rm $PREFIX/time_-2
-    rm $PREFIX/time_1968
+remove_testfiles()
+{
+	rm $PREFIX/time_0
+	rm $PREFIX/time_-1
+	rm $PREFIX/time_-2
+	rm $PREFIX/time_1968
 }
 
-test_time() {
-    local file="$1"
-    local expected="$2"
+test_time()
+{
+	local file="$1"
+	local expected="$2"
 
-    $SMBCLIENT //$SERVER/tmp -U $USERNAME%$PASSWORD -c "allinfo $file"
-    out=$($SMBCLIENT //$SERVER/tmp -U $USERNAME%$PASSWORD -c "allinfo $file" 2>&1) || return 1
-    echo "smbclient allinfo on $fname returned: \"$out\""
+	$SMBCLIENT //$SERVER/tmp -U $USERNAME%$PASSWORD -c "allinfo $file"
+	out=$($SMBCLIENT //$SERVER/tmp -U $USERNAME%$PASSWORD -c "allinfo $file" 2>&1) || return 1
+	echo "smbclient allinfo on $fname returned: \"$out\""
 
-    # Ignore create_time as that is synthesized
-    for time in access_time write_time change_time ; do
-	echo "$out" | grep "$time" | grep "$expected" || {
-            echo "Expected \"$expected\", got: \"$(echo $out | grep $time)\""
-	    return 1
-	}
-    done
+	# Ignore create_time as that is synthesized
+	for time in access_time write_time change_time; do
+		echo "$out" | grep "$time" | grep "$expected" || {
+			echo "Expected \"$expected\", got: \"$(echo $out | grep $time)\""
+			return 1
+		}
+	done
 }
 
 #Setup
-testit "create testfiles" setup_testfiles || failed=`expr $failed + 1`
+testit "create testfiles" setup_testfiles || failed=$(expr $failed + 1)
 
 # Tests
-testit "time=0" test_time time_0 "Thu Jan  1 12:00:00 AM 1970 GMT" || failed=`expr $failed + 1`
-testit "time=-1" test_time time_-1 "Wed Dec 31 11:59:59 PM 1969 GMT" || failed=`expr $failed + 1`
-testit "time=-2" test_time time_-2 "Wed Dec 31 11:59:58 PM 1969 GMT" || failed=`expr $failed + 1`
-testit "time=1968" test_time time_1968 "Mon Jan  1 12:00:00 AM 1968 GMT" || failed=`expr $failed + 1`
+testit "time=0" test_time time_0 "Thu Jan  1 12:00:00 AM 1970 GMT" || failed=$(expr $failed + 1)
+testit "time=-1" test_time time_-1 "Wed Dec 31 11:59:59 PM 1969 GMT" || failed=$(expr $failed + 1)
+testit "time=-2" test_time time_-2 "Wed Dec 31 11:59:58 PM 1969 GMT" || failed=$(expr $failed + 1)
+testit "time=1968" test_time time_1968 "Mon Jan  1 12:00:00 AM 1968 GMT" || failed=$(expr $failed + 1)
 
 # Cleanup
-testit "delete testfile" remove_testfiles || failed=`expr $failed + 1`
+testit "delete testfile" remove_testfiles || failed=$(expr $failed + 1)
 
 exit $failed
diff --git a/source3/script/tests/test_usernamemap.sh b/source3/script/tests/test_usernamemap.sh
index 3a3344a8781..334070ec478 100755
--- a/source3/script/tests/test_usernamemap.sh
+++ b/source3/script/tests/test_usernamemap.sh
@@ -5,10 +5,10 @@
 # Tests for "username map" smb.conf parameter for UNIX groups
 
 if [ $# -lt 2 ]; then
-cat <<EOF
+	cat <<EOF
 Usage: test_usernamemap.sh SERVER SMBCLIENT
 EOF
-exit 1;
+	exit 1
 fi
 
 SERVER="$1"
@@ -23,6 +23,6 @@ failed=0
 # jackthemapper is mapped to jacknomapper, so we need jacknomapper password
 testit "jackthemapper" "${SMBCLIENT}" //"${SERVER}"/tmp -U"${SERVER}/jackthemapper%nOmApsEcrEt" -c ls || failed=$((failed + 1))
 # jacknomapper is not mapped, so we need jacknomapper password
-testit "jacknomapper"  "${SMBCLIENT}" //"${SERVER}"/tmp -U"${SERVER}/jacknomapper%nOmApsEcrEt"  -c ls || failed=$((failed + 1))
+testit "jacknomapper" "${SMBCLIENT}" //"${SERVER}"/tmp -U"${SERVER}/jacknomapper%nOmApsEcrEt" -c ls || failed=$((failed + 1))
 
 testok "$0" "${failed}"
diff --git a/source3/script/tests/test_valid_users.sh b/source3/script/tests/test_valid_users.sh
index a7f9333b243..659eb6abaa2 100755
--- a/source3/script/tests/test_valid_users.sh
+++ b/source3/script/tests/test_valid_users.sh
@@ -4,10 +4,10 @@
 #
 
 if [ $# -lt 7 ]; then
-cat <<EOF
+	cat <<EOF
 Usage: valid_users SERVER SERVER_IP DOMAIN USERNAME PASSWORD PREFIX SMBCLIENT
 EOF
-exit 1;
+	exit 1
 fi
 
 SERVER=${1}
@@ -21,7 +21,7 @@ shift 7
 SMBCLIENT="$VALGRIND ${SMBCLIENT}"
 ADDARGS="$*"
 
-incdir=`dirname $0`/../../../testprogs/blackbox
+incdir=$(dirname $0)/../../../testprogs/blackbox
 . $incdir/subunit.sh
 
 failed=0
@@ -29,42 +29,42 @@ failed=0
 # Test listing a share with valid users succeeds
 test_valid_users_access()
 {
-    tmpfile=$PREFIX/smbclient.in.$$
-    prompt="foo"
-    cat > $tmpfile <<EOF
+	tmpfile=$PREFIX/smbclient.in.$$
+	prompt="foo"
+	cat >$tmpfile <<EOF
 ls
 quit
 EOF
 
-    cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT -U$USERNAME%$PASSWORD "//$SERVER/$1" -I $SERVER_IP $ADDARGS < $tmpfile 2>&1'
-    eval echo "$cmd"
-    out=`eval $cmd`
-    ret=$?
-    rm -f $tmpfile
+	cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT -U$USERNAME%$PASSWORD "//$SERVER/$1" -I $SERVER_IP $ADDARGS < $tmpfile 2>&1'
+	eval echo "$cmd"
+	out=$(eval $cmd)
+	ret=$?
+	rm -f $tmpfile
 
-    if [ $ret != 0 ] ; then
-        echo "$out"
-        echo "failed accessing share with valid users with error $ret"
+	if [ $ret != 0 ]; then
+		echo "$out"
+		echo "failed accessing share with valid users with error $ret"


-- 
Samba Shared Repository



More information about the samba-cvs mailing list