summaryrefslogtreecommitdiff
path: root/source3/script
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2018-08-30 19:15:19 +0200
committerJeremy Allison <jra@samba.org>2018-08-31 22:22:23 +0200
commit5508024a861e7c85e6c837552ad142aa1d5e8eca (patch)
tree5b7960d7ab230c0942d51743ae4bdfe25b6fce1a /source3/script
parent3255822f75163cb38e53f634a5c6b03d46bfaff1 (diff)
downloadsamba-5508024a861e7c85e6c837552ad142aa1d5e8eca.tar.gz
selftest: add a durable handle test with delayed disconnect
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13549 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/script')
-rwxr-xr-xsource3/script/tests/test_durable_handle_reconnect.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/source3/script/tests/test_durable_handle_reconnect.sh b/source3/script/tests/test_durable_handle_reconnect.sh
new file mode 100755
index 00000000000..bca8e2def96
--- /dev/null
+++ b/source3/script/tests/test_durable_handle_reconnect.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# Test Durable Handle reconnect with injected delay in the disconnect.
+#
+# Copyright (C) 2018 Ralph Boehme
+
+. $(dirname $0)/../../../testprogs/blackbox/subunit.sh
+failed=0
+
+delay_inject_conf=$(dirname $SMB_CONF_PATH)/delay_inject.conf
+
+echo 'delay_inject:ntimes = 5000' > $delay_inject_conf
+
+testit "durable_v2_delay" $VALGRIND \
+ $BINDIR/smbtorture //$SERVER_IP/delay_inject \
+ -U$USERNAME%$PASSWORD smb2.durable-v2-delay ||
+ failed=$(expr $failed + 1)
+
+rm $delay_inject_conf
+
+testok $0 $failed