summaryrefslogtreecommitdiff
path: root/source3/script/tests
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2018-08-30 19:15:19 +0200
committerStefan Metzmacher <metze@samba.org>2018-09-05 13:31:44 +0200
commite667b1771584b37b59ceab20cddced3615cf7b8f (patch)
tree0330e19dc28538e8f271961a5af3e15f83ae36a3 /source3/script/tests
parent34eeed27d1293d9fc2c0dd5067a542ceb0797540 (diff)
downloadsamba-e667b1771584b37b59ceab20cddced3615cf7b8f.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> (cherry picked from commit 5508024a861e7c85e6c837552ad142aa1d5e8eca)
Diffstat (limited to 'source3/script/tests')
-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