summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2022-02-23 12:02:44 +0100
committerPavel Filipensky <pfilipensky@samba.org>2022-07-15 12:08:36 +0000
commitdf29b9ab16564ab94d451ae00ae6cd4def747b58 (patch)
tree35843a96eba3b675dd28a743914c8188a1e2eae0
parenta6ccceb97ebd43d453ae4f835927cbacde0fdcef (diff)
downloadsamba-df29b9ab16564ab94d451ae00ae6cd4def747b58.tar.gz
s4:selftest: Reformat shell scripts
shfmt -f source4/selftest/ | xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
-rwxr-xr-xsource4/selftest/provisions/dump.sh47
-rwxr-xr-xsource4/selftest/provisions/release-4-5-0-pre1/add-deleted-user.sh10
-rwxr-xr-xsource4/selftest/provisions/release-4-5-0-pre1/simple-dc-steps.sh24
-rwxr-xr-xsource4/selftest/provisions/undump.sh31
-rwxr-xr-xsource4/selftest/test_samba3dump.sh2
-rwxr-xr-xsource4/selftest/test_w2k3.sh26
-rwxr-xr-xsource4/selftest/test_w2k3_file.sh8
-rwxr-xr-xsource4/selftest/test_win.sh2
-rwxr-xr-xsource4/selftest/tests_win.sh38
-rwxr-xr-xsource4/selftest/win/wintest_2k3_dc.sh44
-rwxr-xr-xsource4/selftest/win/wintest_base.sh9
-rwxr-xr-xsource4/selftest/win/wintest_client.sh8
-rwxr-xr-xsource4/selftest/win/wintest_functions.sh8
-rwxr-xr-xsource4/selftest/win/wintest_net.sh15
-rwxr-xr-xsource4/selftest/win/wintest_raw.sh9
-rwxr-xr-xsource4/selftest/win/wintest_rpc.sh15
16 files changed, 152 insertions, 144 deletions
diff --git a/source4/selftest/provisions/dump.sh b/source4/selftest/provisions/dump.sh
index 1b3ec1ee497..e9467e4af06 100755
--- a/source4/selftest/provisions/dump.sh
+++ b/source4/selftest/provisions/dump.sh
@@ -2,47 +2,46 @@
# dump a provision directory
[ "$#" -gt 0 ] || {
- echo "Usage: dump.sh <DIRECTORY> [TARGETDIR] [TDBDUMP]"
- exit 1
+ echo "Usage: dump.sh <DIRECTORY> [TARGETDIR] [TDBDUMP]"
+ exit 1
}
TDBDUMP=tdbdump
[ "$#" -lt 3 ] || {
- TDBDUMP=$3
+ TDBDUMP=$3
}
-
dirbase="$1"
-TARGETDIR=`pwd`/$dirbase
+TARGETDIR=$(pwd)/$dirbase
cd $dirbase
[ "$#" -lt 2 ] || {
- TARGETDIR=$2
+ TARGETDIR=$2
}
for f in $(find . -name '*.tdb'); do
- dname=$TARGETDIR/$(dirname $f)
- mkdir -p $dname
- outname=$dname/$(basename $f).dump
- echo "Dumping $f to $outname"
- $TDBDUMP $f > $outname || {
- echo "Failed to dump to $outname"
- exit 1
- }
- rm -f $f
+ dname=$TARGETDIR/$(dirname $f)
+ mkdir -p $dname
+ outname=$dname/$(basename $f).dump
+ echo "Dumping $f to $outname"
+ $TDBDUMP $f >$outname || {
+ echo "Failed to dump to $outname"
+ exit 1
+ }
+ rm -f $f
done
for f in $(find . -name '*.ldb'); do
- dname=$TARGETDIR/$(dirname $f)
- mkdir -p $dname
- outname=$dname/$(basename $f).dump
- echo "Dumping $f to $outname"
- $TDBDUMP $f > $outname || {
- echo "Failed to dump to $outname"
- exit 1
- }
- rm -f $f
+ dname=$TARGETDIR/$(dirname $f)
+ mkdir -p $dname
+ outname=$dname/$(basename $f).dump
+ echo "Dumping $f to $outname"
+ $TDBDUMP $f >$outname || {
+ echo "Failed to dump to $outname"
+ exit 1
+ }
+ rm -f $f
done
exit 0
diff --git a/source4/selftest/provisions/release-4-5-0-pre1/add-deleted-user.sh b/source4/selftest/provisions/release-4-5-0-pre1/add-deleted-user.sh
index efee4cee718..dfe932b03a3 100755
--- a/source4/selftest/provisions/release-4-5-0-pre1/add-deleted-user.sh
+++ b/source4/selftest/provisions/release-4-5-0-pre1/add-deleted-user.sh
@@ -7,13 +7,13 @@ SAMBA_TOOL=$(pwd)/bin/samba-tool
#make test TESTS="samba4.blackbox.group.py"
-$SAMBA_TOOL user add -H $DB fred complexpassword#12
+$SAMBA_TOOL user add -H $DB fred complexpassword#12
$SAMBA_TOOL group add -H $DB swimmers
$SAMBA_TOOL group addmembers -H $DB swimmers fred
$SAMBA_TOOL user delete -H $DB fred
-bin/ldbsearch -H $DB --show-recycled --show-deleted \
- --show-deactivated-link --reveal | grep fred
-bin/ldbsearch -H $DB --show-recycled --show-deleted \
- --show-deactivated-link --reveal | grep swimmers
+bin/ldbsearch -H $DB --show-recycled --show-deleted \
+ --show-deactivated-link --reveal | grep fred
+bin/ldbsearch -H $DB --show-recycled --show-deleted \
+ --show-deactivated-link --reveal | grep swimmers
diff --git a/source4/selftest/provisions/release-4-5-0-pre1/simple-dc-steps.sh b/source4/selftest/provisions/release-4-5-0-pre1/simple-dc-steps.sh
index 4d36b06d2d5..8b87da22d12 100755
--- a/source4/selftest/provisions/release-4-5-0-pre1/simple-dc-steps.sh
+++ b/source4/selftest/provisions/release-4-5-0-pre1/simple-dc-steps.sh
@@ -5,30 +5,30 @@
make test TESTS="samba4.blackbox.group.py"
echo adding user fred
-bin/samba-tool user add -H st/provision/simple-dc/private/sam.ldb fred complexpassword#12
+bin/samba-tool user add -H st/provision/simple-dc/private/sam.ldb fred complexpassword#12
echo adding group swimmers
-bin/samba-tool group add -H st/provision/simple-dc/private/sam.ldb swimmers
+bin/samba-tool group add -H st/provision/simple-dc/private/sam.ldb swimmers
echo adding fred to swimmers
-bin/samba-tool group addmembers -H st/provision/simple-dc/private/sam.ldb swimmers fred
+bin/samba-tool group addmembers -H st/provision/simple-dc/private/sam.ldb swimmers fred
echo
for w in swimmers fred; do
- echo grepping for $w
- echo ------------------------------------
- bin/ldbsearch -H st/provision/simple-dc/private/sam.ldb --show-recycled --show-deleted --show-deactivated-link --reveal | grep $w
- echo ------------------------------------
+ echo grepping for $w
+ echo ------------------------------------
+ bin/ldbsearch -H st/provision/simple-dc/private/sam.ldb --show-recycled --show-deleted --show-deactivated-link --reveal | grep $w
+ echo ------------------------------------
done
echo
echo deleting fred
-bin/samba-tool user delete -H st/provision/simple-dc/private/sam.ldb fred
+bin/samba-tool user delete -H st/provision/simple-dc/private/sam.ldb fred
for w in swimmers fred; do
- echo grepping for $w
- echo ------------------------------------
- bin/ldbsearch -H st/provision/simple-dc/private/sam.ldb --show-recycled --show-deleted --show-deactivated-link --reveal | grep $w
- echo ------------------------------------
+ echo grepping for $w
+ echo ------------------------------------
+ bin/ldbsearch -H st/provision/simple-dc/private/sam.ldb --show-recycled --show-deleted --show-deactivated-link --reveal | grep $w
+ echo ------------------------------------
done
echo
diff --git a/source4/selftest/provisions/undump.sh b/source4/selftest/provisions/undump.sh
index 7ffea3eff70..b1ad933202b 100755
--- a/source4/selftest/provisions/undump.sh
+++ b/source4/selftest/provisions/undump.sh
@@ -2,36 +2,35 @@
# undump a provision directory
[ "$#" -gt 0 ] || {
- echo "Usage: undump.sh <DIRECTORY> [TARGETDIR] [TDBRESTORE]"
- exit 1
+ echo "Usage: undump.sh <DIRECTORY> [TARGETDIR] [TDBRESTORE]"
+ exit 1
}
TDBRESTORE=tdbrestore
[ "$#" -lt 3 ] || {
- TDBRESTORE=$3
+ TDBRESTORE=$3
}
-
dirbase="$1"
-TARGETDIR=`pwd`/$dirbase
+TARGETDIR=$(pwd)/$dirbase
cd $dirbase
[ "$#" -lt 2 ] || {
- TARGETDIR=$2
+ TARGETDIR=$2
}
for f in $(find . -name '*.dump'); do
- dname=$TARGETDIR/$(dirname $f)
- mkdir -p $dname
- bname=$(basename $f .dump)
- outname=$dname/$bname
- echo "Restoring $outname"
- rm -f $outname
- $TDBRESTORE $outname < $f || {
- echo "Failed to restore $outname"
- exit 1
- }
+ dname=$TARGETDIR/$(dirname $f)
+ mkdir -p $dname
+ bname=$(basename $f .dump)
+ outname=$dname/$bname
+ echo "Restoring $outname"
+ rm -f $outname
+ $TDBRESTORE $outname <$f || {
+ echo "Failed to restore $outname"
+ exit 1
+ }
done
exit 0
diff --git a/source4/selftest/test_samba3dump.sh b/source4/selftest/test_samba3dump.sh
index 6cde2bd07e6..f8dc850c6c8 100755
--- a/source4/selftest/test_samba3dump.sh
+++ b/source4/selftest/test_samba3dump.sh
@@ -5,7 +5,7 @@
subunit_start_test samba3dump
-SRCDIR=`dirname $0`/../..
+SRCDIR=$(dirname $0)/../..
if $PYTHON $SRCDIR/source4/scripting/bin/samba3dump $SRCDIR/testdata/samba3; then
subunit_pass_test samba3dump
diff --git a/source4/selftest/test_w2k3.sh b/source4/selftest/test_w2k3.sh
index 3cd034d0003..20d4e5dbe78 100755
--- a/source4/selftest/test_w2k3.sh
+++ b/source4/selftest/test_w2k3.sh
@@ -8,10 +8,10 @@ ncacn_np_tests="RPC-SCHANNEL RPC-DSSETUP RPC-EPMAPPER RPC-SAMR RPC-WKSSVC RPC-SR
ncacn_ip_tcp_tests="RPC-SCHANNEL RPC-EPMAPPER RPC-SAMR RPC-NETLOGON RPC-LSA RPC-SAMLOGON RPC-SAMSYNC RPC-MULTIBIND"
if [ $# -lt 4 ]; then
-cat <<EOF
+ cat <<EOF
Usage: test_w2k3.sh SERVER USERNAME PASSWORD DOMAIN REALM
EOF
-exit 1;
+ exit 1
fi
server="$1"
@@ -21,7 +21,7 @@ domain="$4"
realm="$5"
shift 5
-incdir=`dirname $0`
+incdir=$(dirname $0)
. $incdir/test_functions.sh
OPTIONS="-U$username%$password -W $domain --option realm=$realm"
@@ -30,16 +30,16 @@ name="RPC-SPOOLSS on ncacn_np"
testit "$name" rpc bin/smbtorture $TORTURE_OPTIONS ncacn_np:"$server" $OPTIONS RPC-SPOOLSS "$*"
for bindoptions in padcheck connect sign seal ntlm,sign ntlm,seal $VALIDATE bigendian; do
- for transport in ncacn_ip_tcp ncacn_np; do
- case $transport in
- ncacn_np) tests=$ncacn_np_tests ;;
- ncacn_ip_tcp) tests=$ncacn_ip_tcp_tests ;;
- esac
- for t in $tests; do
- name="$t on $transport with $bindoptions"
- testit "$name" rpc bin/smbtorture $TORTURE_OPTIONS $transport:"$server[$bindoptions]" $OPTIONS $t "$*"
- done
- done
+ for transport in ncacn_ip_tcp ncacn_np; do
+ case $transport in
+ ncacn_np) tests=$ncacn_np_tests ;;
+ ncacn_ip_tcp) tests=$ncacn_ip_tcp_tests ;;
+ esac
+ for t in $tests; do
+ name="$t on $transport with $bindoptions"
+ testit "$name" rpc bin/smbtorture $TORTURE_OPTIONS $transport:"$server[$bindoptions]" $OPTIONS $t "$*"
+ done
+ done
done
name="RPC-DRSUAPI on ncacn_ip_tcp with seal"
diff --git a/source4/selftest/test_w2k3_file.sh b/source4/selftest/test_w2k3_file.sh
index 27714c2c19f..b2f87164ce4 100755
--- a/source4/selftest/test_w2k3_file.sh
+++ b/source4/selftest/test_w2k3_file.sh
@@ -3,10 +3,10 @@
# this runs the file serving tests that are expected to pass with win2003
if [ $# -lt 3 ]; then
-cat <<EOF
+ cat <<EOF
Usage: test_w2k3_file.sh UNC USERNAME PASSWORD <first> <smbtorture args>
EOF
-exit 1;
+ exit 1
fi
unc="$1"
@@ -16,7 +16,7 @@ start="$4"
shift 4
ADDARGS="$*"
-incdir=`dirname $0`
+incdir=$(dirname $0)
. $incdir/test_functions.sh
tests="BASE-FDPASS BASE-LOCK "
@@ -40,5 +40,5 @@ fail="RAW-SEARCH RAW-ACLS RAW-QFSINFO"
echo "Skipping tests expected to fail: $fail"
for t in $tests; do
- testit "$t" smb $VALGRIND bin/smbtorture $TORTURE_OPTIONS $ADDARGS $unc -U"$username"%"$password" $t
+ testit "$t" smb $VALGRIND bin/smbtorture $TORTURE_OPTIONS $ADDARGS $unc -U"$username"%"$password" $t
done
diff --git a/source4/selftest/test_win.sh b/source4/selftest/test_win.sh
index 17c09e6b269..bf6d2e18a3b 100755
--- a/source4/selftest/test_win.sh
+++ b/source4/selftest/test_win.sh
@@ -9,7 +9,7 @@
. selftest/test_functions.sh
-export SMBTORTURE_REMOTE_HOST=`perl -I$WINTEST_DIR $WINTEST_DIR/vm_get_ip.pl VM_CFG_PATH`
+export SMBTORTURE_REMOTE_HOST=$(perl -I$WINTEST_DIR $WINTEST_DIR/vm_get_ip.pl VM_CFG_PATH)
if [ -z $SMBTORTURE_REMOTE_HOST ]; then
# Restore snapshot to ensure VM is in a known state, then exit.
restore_snapshot "Test failed to get the IP address of the windows host." "$VM_CFG_PATH"
diff --git a/source4/selftest/tests_win.sh b/source4/selftest/tests_win.sh
index 19460eee0ed..fafaef1f5a5 100755
--- a/source4/selftest/tests_win.sh
+++ b/source4/selftest/tests_win.sh
@@ -1,30 +1,30 @@
#!/bin/sh
- if [ `whoami` != "root" ]; then
- echo "Windows tests will not run without root privileges."
- exit 1
- fi
+if [ $(whoami) != "root" ]; then
+ echo "Windows tests will not run without root privileges."
+ exit 1
+fi
- if [ "$DO_SOCKET_WRAPPER" = SOCKET_WRAPPER ]; then
- echo "Windows tests will not run with socket wrapper enabled."
- exit 1
- fi
+if [ "$DO_SOCKET_WRAPPER" = SOCKET_WRAPPER ]; then
+ echo "Windows tests will not run with socket wrapper enabled."
+ exit 1
+fi
- if [ ! $WINTESTCONF ]; then
+if [ ! $WINTESTCONF ]; then
echo "Environment variable WINTESTCONF has not been defined."
echo "Windows tests will not run unconfigured."
exit 1
- fi
+fi
- if [ ! -r $WINTESTCONF ]; then
- echo "$WINTESTCONF could not be read."
- exit 1
- fi
+if [ ! -r $WINTESTCONF ]; then
+ echo "$WINTESTCONF could not be read."
+ exit 1
+fi
- export WINTEST_DIR=$SRCDIR/selftest/win
- export TMPDIR=$TMPDIR
- export NETBIOSNAME=$NETBIOSNAME
+export WINTEST_DIR=$SRCDIR/selftest/win
+export TMPDIR=$TMPDIR
+export NETBIOSNAME=$NETBIOSNAME
- . $WINTESTCONF
+. $WINTESTCONF
- $SRCDIR/selftest/test_win.sh
+$SRCDIR/selftest/test_win.sh
diff --git a/source4/selftest/win/wintest_2k3_dc.sh b/source4/selftest/win/wintest_2k3_dc.sh
index ed964a274af..4852e22a01c 100755
--- a/source4/selftest/win/wintest_2k3_dc.sh
+++ b/source4/selftest/win/wintest_2k3_dc.sh
@@ -1,34 +1,34 @@
#!/bin/sh
if [ $# -lt 1 ]; then
-cat <<EOF
+ cat <<EOF
Usage: wintest_2k3_dc.sh TESTGROUP
EOF
-exit 1;
+ exit 1
fi
TESTGROUP=$1
if [ -z $WINTEST_DIR ]; then
echo "Environment variable WINTEST_DIR not found."
- exit 1;
+ exit 1
fi
# This variable is defined in the per-hosts .fns file for build-farm hosts that run windows tests.
if [ -z $WINTESTCONF ]; then
echo "Please point environment variable WINTESTCONF to your test_win.conf file."
- exit 1;
+ exit 1
fi
. $WINTESTCONF
. $WINTEST_DIR/wintest_functions.sh
-export WIN2K3_DC_REMOTE_HOST=`perl -I$WINTEST_DIR $WINTEST_DIR/vm_get_ip.pl WIN2K3_DC_VM_CFG_PATH`
+export WIN2K3_DC_REMOTE_HOST=$(perl -I$WINTEST_DIR $WINTEST_DIR/vm_get_ip.pl WIN2K3_DC_VM_CFG_PATH)
if [ -z $WIN2K3_DC_REMOTE_HOST ]; then
# Restore snapshot to ensure VM is in a known state, then exit.
restore_snapshot "Test failed to get the IP address of the windows 2003 DC." "$WIN2K3_DC_VM_CFG_PATH"
- exit 1;
+ exit 1
fi
server=$WIN2K3_DC_REMOTE_HOST
@@ -41,14 +41,16 @@ OPTIONS="-U$username%$password -W $domain --option realm=$realm"
all_errs=0
-on_error() {
+on_error()
+{
name=$1
- all_errs=`expr $all_errs + 1`
+ all_errs=$(expr $all_errs + 1)
restore_snapshot "$name test failed." "$WIN2K3_DC_VM_CFG_PATH"
}
-drsuapi_tests() {
+drsuapi_tests()
+{
name="RPC-DRSUAPI on ncacn_ip_tcp with seal"
bin/smbtorture \
@@ -61,7 +63,8 @@ drsuapi_tests() {
RPC-DRSUAPI || on_error "$name"
}
-spoolss_tests() {
+spoolss_tests()
+{
name="RPC-SPOOLSS on ncacn_np"
bin/smbtorture \
@@ -69,7 +72,8 @@ spoolss_tests() {
RPC-SPOOLSS || on_error "$name"
}
-ncacn_ip_tcp_tests() {
+ncacn_ip_tcp_tests()
+{
bindopt=$1
transport="ncacn_ip_tcp"
tests="RPC-SCHANNEL RPC-EPMAPPER RPC-SAMR RPC-NETLOGON RPC-LSA RPC-SAMLOGON RPC-SAMSYNC RPC-MULTIBIND"
@@ -84,7 +88,8 @@ ncacn_ip_tcp_tests() {
done
}
-ncacn_np_tests() {
+ncacn_np_tests()
+{
bindopt=$1
transport="ncacn_np"
tests="RPC-SCHANNEL RPC-DSSETUP RPC-EPMAPPER RPC-SAMR RPC-WKSSVC RPC-SRVSVC RPC-EVENTLOG RPC-NETLOGON RPC-LSA RPC-SAMLOGON RPC-SAMSYNC RPC-MULTIBIND RPC-WINREG"
@@ -102,13 +107,14 @@ ncacn_np_tests() {
bindoptions="padcheck connect sign seal ntlm,sign ntml,seal $VALIDATE bigendian"
case $TESTGROUP in
- RPC-DRSUAPI) drsuapi_tests ;;
- RPC-SPOOLSS) spoolss_tests ;;
- ncacn_ip_tcp) ncacn_ip_tcp_tests $bindoptions ;;
- ncacn_np) ncacn_np_tests $bindoptions ;;
- *) echo "$TESTGROUP is not a known set of tests."
- exit 1;
- ;;
+RPC-DRSUAPI) drsuapi_tests ;;
+RPC-SPOOLSS) spoolss_tests ;;
+ncacn_ip_tcp) ncacn_ip_tcp_tests $bindoptions ;;
+ncacn_np) ncacn_np_tests $bindoptions ;;
+*)
+ echo "$TESTGROUP is not a known set of tests."
+ exit 1
+ ;;
esac
exit $all_errs
diff --git a/source4/selftest/win/wintest_base.sh b/source4/selftest/win/wintest_base.sh
index b78da4f7c95..6905b5ed38d 100755
--- a/source4/selftest/win/wintest_base.sh
+++ b/source4/selftest/win/wintest_base.sh
@@ -8,10 +8,10 @@
. $WINTESTCONF
if [ $# -lt 4 ]; then
-cat <<EOF
+ cat <<EOF
Usage: test_net.sh SERVER USERNAME PASSWORD DOMAIN
EOF
-exit 1;
+ exit 1
fi
server="$1"
@@ -27,10 +27,11 @@ base_tests="BASE-UNLINK BASE-ATTR BASE-DELETE BASE-TCON BASE-OPEN BASE-CHKPATH"
all_errs=0
err=0
-on_error() {
+on_error()
+{
errstr=$1
- all_errs=`expr $all_errs + 1`
+ all_errs=$(expr $all_errs + 1)
restore_snapshot $errstr "$VM_CFG_PATH"
}
diff --git a/source4/selftest/win/wintest_client.sh b/source4/selftest/win/wintest_client.sh
index 6b76ae36f7f..b956c711b53 100755
--- a/source4/selftest/win/wintest_client.sh
+++ b/source4/selftest/win/wintest_client.sh
@@ -11,12 +11,12 @@ export SMBTORTURE_REMOTE_HOST=$1
test_name="WINDOWS CLIENT / SAMBA SERVER SHARE"
-cat $WINTEST_DIR/common.exp > $TMPDIR/client_test.exp
-cat $WINTEST_DIR/wintest_client.exp >> $TMPDIR/client_test.exp
+cat $WINTEST_DIR/common.exp >$TMPDIR/client_test.exp
+cat $WINTEST_DIR/wintest_client.exp >>$TMPDIR/client_test.exp
-expect $TMPDIR/client_test.exp || all_errs=`expr $all_errs + 1`
+expect $TMPDIR/client_test.exp || all_errs=$(expr $all_errs + 1)
-if [ $all_errs > 0 ]; then
+if [ $all_errs ] >0; then
# Restore snapshot to ensure VM is in a known state.
restore_snapshot "\n$test_name failed." "$VM_CFG_PATH"
fi
diff --git a/source4/selftest/win/wintest_functions.sh b/source4/selftest/win/wintest_functions.sh
index 3c0a1dccac1..9b6bed98ee4 100755
--- a/source4/selftest/win/wintest_functions.sh
+++ b/source4/selftest/win/wintest_functions.sh
@@ -9,8 +9,8 @@
setup_share_test()
{
echo -e "\nSetting up windows environment."
- cat $WINTEST_DIR/common.exp > $TMPDIR/setup.exp
- cat $WINTEST_DIR/wintest_setup.exp >> $TMPDIR/setup.exp
+ cat $WINTEST_DIR/common.exp >$TMPDIR/setup.exp
+ cat $WINTEST_DIR/wintest_setup.exp >>$TMPDIR/setup.exp
expect $TMPDIR/setup.exp
err_rtn=$?
rm -f $TMPDIR/setup.exp
@@ -20,8 +20,8 @@ setup_share_test()
remove_share_test()
{
echo -e "\nCleaning up windows environment."
- cat $WINTEST_DIR/common.exp > $TMPDIR/remove.exp
- cat $WINTEST_DIR/wintest_remove.exp >> $TMPDIR/remove.exp
+ cat $WINTEST_DIR/common.exp >$TMPDIR/remove.exp
+ cat $WINTEST_DIR/wintest_remove.exp >>$TMPDIR/remove.exp
expect $TMPDIR/remove.exp
err_rtn=$?
rm -f $TMPDIR/remove.exp
diff --git a/source4/selftest/win/wintest_net.sh b/source4/selftest/win/wintest_net.sh
index 88cec1f3a79..429be6cd792 100755
--- a/source4/selftest/win/wintest_net.sh
+++ b/source4/selftest/win/wintest_net.sh
@@ -8,10 +8,10 @@
. $WINTESTCONF
if [ $# -lt 4 ]; then
-cat <<EOF
+ cat <<EOF
Usage: test_net.sh SERVER USERNAME PASSWORD DOMAIN
EOF
-exit 1;
+ exit 1
fi
server="$1"
@@ -35,19 +35,20 @@ test_type="ncalrpc ncacn_np ncacn_ip_tcp"
all_errs=0
-on_error() {
+on_error()
+{
errstr=$1
- all_errs=`expr $all_errs + 1`
+ all_errs=$(expr $all_errs + 1)
restore_snapshot "$errstr" "$VM_CFG_PATH"
}
for o in $bind_options; do
for transport in $test_type; do
case $transport in
- ncalrpc) net_test=$ncalrpc_tests ;;
- ncacn_np) net_test=$ncacn_np_tests ;;
- ncacn_ip_tcp) net_test=$ncacn_ip_tcp_tests ;;
+ ncalrpc) net_test=$ncalrpc_tests ;;
+ ncacn_np) net_test=$ncacn_np_tests ;;
+ ncacn_ip_tcp) net_test=$ncacn_ip_tcp_tests ;;
esac
for t in $net_test; do
diff --git a/source4/selftest/win/wintest_raw.sh b/source4/selftest/win/wintest_raw.sh
index d1bece26594..c22dacdc328 100755
--- a/source4/selftest/win/wintest_raw.sh
+++ b/source4/selftest/win/wintest_raw.sh
@@ -8,10 +8,10 @@
. $WINTESTCONF
if [ $# -lt 4 ]; then
-cat <<EOF
+ cat <<EOF
Usage: test_net.sh SERVER USERNAME PASSWORD DOMAIN
EOF
-exit 1;
+ exit 1
fi
server="$1"
@@ -28,9 +28,10 @@ raw_tests="RAW-QFILEINFO RAW-SFILEINFO-BASE RAW-MKDIR RAW-SEEK RAW-OPEN RAW-WRIT
all_errs=0
err=0
-on_error() {
+on_error()
+{
errstr=$1
- all_errs=`expr $all_errs + 1`
+ all_errs=$(expr $all_errs + 1)
restore_snapshot "$errstr" "$VM_CFG_PATH"
}
diff --git a/source4/selftest/win/wintest_rpc.sh b/source4/selftest/win/wintest_rpc.sh
index d0a0783c2ee..03ac6a87558 100755
--- a/source4/selftest/win/wintest_rpc.sh
+++ b/source4/selftest/win/wintest_rpc.sh
@@ -8,10 +8,10 @@
. $WINTESTCONF
if [ $# -lt 4 ]; then
-cat <<EOF
+ cat <<EOF
Usage: test_rpc.sh SERVER USERNAME PASSWORD DOMAIN
EOF
-exit 1;
+ exit 1
fi
server="$1"
@@ -38,9 +38,10 @@ test_type="ncalrpc ncacn_np ncacn_ip_tcp"
all_errs=0
-on_error() {
+on_error()
+{
errstr=$1
- all_errs=`expr $all_errs + 1`
+ all_errs=$(expr $all_errs + 1)
restore_snapshot "$errstr" "$VM_CFG_PATH"
}
@@ -48,9 +49,9 @@ on_error() {
for o in $bind_options; do
for transport in $test_type; do
case $transport in
- ncalrpc) rpc_test=$ncalrpc_tests ;;
- ncacn_np) rpc_test=$ncacn_np_tests ;;
- ncacn_ip_tcp) rpc_test=$ncacn_ip_tcp_tests ;;
+ ncalrpc) rpc_test=$ncalrpc_tests ;;
+ ncacn_np) rpc_test=$ncacn_np_tests ;;
+ ncacn_ip_tcp) rpc_test=$ncacn_ip_tcp_tests ;;
esac
for t in $rpc_test; do