summaryrefslogtreecommitdiff
path: root/source4/script/tests
diff options
context:
space:
mode:
Diffstat (limited to 'source4/script/tests')
-rwxr-xr-xsource4/script/tests/test_binding_string.sh40
-rwxr-xr-xsource4/script/tests/test_echo.sh4
2 files changed, 42 insertions, 2 deletions
diff --git a/source4/script/tests/test_binding_string.sh b/source4/script/tests/test_binding_string.sh
new file mode 100755
index 0000000000..5a5e190672
--- /dev/null
+++ b/source4/script/tests/test_binding_string.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+if [ $# -lt 4 ]; then
+cat <<EOF
+Usage: test_binding_string.sh SERVER USERNAME PASSWORD DOMAIN
+EOF
+exit 1;
+fi
+
+server="$1"
+username="$2"
+password="$3"
+domain="$4"
+shift 4
+
+testit() {
+ cmdline="$*"
+ if ! $cmdline > test.$$ 2>&1; then
+ cat test.$$;
+ rm -f test.$$;
+ echo "TEST FAILED - $cmdline";
+ exit 1;
+ fi
+ rm -f test.$$;
+}
+
+for I in "ncacn_np:$server" \
+ "ncacn_ip_tcp:$server" \
+ "ncacn_np:$server[rpcecho]" \
+ "ncacn_np:$server[/pipe/rpcecho]" \
+ "ncacn_np:$server[/pipe/rpcecho,sign,seal]" \
+ "ncacn_np:$server[,sign]" \
+ "ncacn_ip_tcp:$server[,sign]" \
+ "308FB580-1EB2-11CA-923B-08002B1075A7@ncacn_np:$server" \
+ "308FB580-1EB2-11CA-923B-08002B1075A7@ncacn_ip_tcp:$server"
+do
+ testit bin/smbtorture "$I" -U"$username"%"$password" -W $domain RPC-ECHO "$*"
+done
+
+echo "ALL OK";
diff --git a/source4/script/tests/test_echo.sh b/source4/script/tests/test_echo.sh
index 724f4cff5e..3aebb11b6b 100755
--- a/source4/script/tests/test_echo.sh
+++ b/source4/script/tests/test_echo.sh
@@ -35,13 +35,13 @@ for transport in ncacn_np ncacn_ip_tcp; do
"--option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:keyexchange=no" \
; do
echo Testing $transport with $bindoptions and $ntlmoptions
- testit bin/smbtorture $transport:"$server":$bindoptions $ntlmoptions -U"$username"%"$password" -W $domain RPC-ECHO "$*"
+ testit bin/smbtorture $transport:"$server[$bindoptions]" $ntlmoptions -U"$username"%"$password" -W $domain RPC-ECHO "$*"
done
done
done
# separately test the print option - its v slow
echo Testing print option
-testit bin/smbtorture ncacn_np:"$server":print -U"$username"%"$password" -W $domain RPC-ECHO "$*"
+testit bin/smbtorture ncacn_np:"$server[print]" -U"$username"%"$password" -W $domain RPC-ECHO "$*"
echo "ALL OK";