summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-01-10 03:26:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:49:59 -0500
commitd0a851e889b26fb9cd85e7fbcf085a575058e0c0 (patch)
treef91f00fab733d798a023d8f530fe0228cf2df904
parentdf53401d0c9b2d2f73af281046f6592a31e52c3b (diff)
downloadsamba-d0a851e889b26fb9cd85e7fbcf085a575058e0c0.tar.gz
samba-d0a851e889b26fb9cd85e7fbcf085a575058e0c0.tar.bz2
samba-d0a851e889b26fb9cd85e7fbcf085a575058e0c0.zip
r12812: speed up RPC-ECHO with validate some more, and re-enable it under
valgrind in 'make valgrindtest' (This used to be commit b2030d527a75fecd907148d13860b4ba5193f218)
-rwxr-xr-xsource4/script/tests/test_rpc_quick.sh13
-rw-r--r--source4/torture/rpc/echo.c11
2 files changed, 12 insertions, 12 deletions
diff --git a/source4/script/tests/test_rpc_quick.sh b/source4/script/tests/test_rpc_quick.sh
index 63ff419b99..fe3fad73ea 100755
--- a/source4/script/tests/test_rpc_quick.sh
+++ b/source4/script/tests/test_rpc_quick.sh
@@ -2,16 +2,9 @@
# add tests to this list as they start passing, so we test
# that they stay passing
-ncacn_np_tests="RPC-ALTERCONTEXT RPC-JOIN"
-ncalrpc_tests="RPC-ALTERCONTEXT RPC-JOIN"
-ncacn_ip_tcp_tests="RPC-ALTERCONTEXT RPC-JOIN"
-
-# if we're not running under valgrind test some more tests
-if [ -z "$VALGRIND" ]; then
- ncacn_np_tests="$ncacn_np_tests RPC-ECHO"
- ncalrpc_tests="$ncalrpc_tests RPC-ECHO"
- ncacn_ip_tcp_tests="$ncacn_ip_tcp_tests RPC-ECHO"
-fi
+ncacn_np_tests="RPC-ALTERCONTEXT RPC-JOIN RPC-ECHO"
+ncalrpc_tests="RPC-ALTERCONTEXT RPC-JOIN RPC-ECHO"
+ncacn_ip_tcp_tests="RPC-ALTERCONTEXT RPC-JOIN RPC-ECHO"
if [ $# -lt 4 ]; then
cat <<EOF
diff --git a/source4/torture/rpc/echo.c b/source4/torture/rpc/echo.c
index 6da9cc523c..02631d0b44 100644
--- a/source4/torture/rpc/echo.c
+++ b/source4/torture/rpc/echo.c
@@ -77,9 +77,16 @@ static BOOL test_echodata(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
int i;
NTSTATUS status;
uint8_t *data_in, *data_out;
- int len = 1 + (random() % 5000);
+ int len;
struct echo_EchoData r;
+ if (lp_parm_bool(-1, "torture", "quick", False) &&
+ (p->conn->flags & DCERPC_DEBUG_VALIDATE_BOTH)) {
+ len = 1 + (random() % 500);
+ } else {
+ len = 1 + (random() % 5000);
+ }
+
printf("\nTesting EchoData\n");
data_in = talloc_size(mem_ctx, len);
@@ -128,7 +135,7 @@ static BOOL test_sourcedata(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
if (lp_parm_bool(-1, "torture", "quick", False) &&
(p->conn->flags & DCERPC_DEBUG_VALIDATE_BOTH)) {
- len = 100 + (random() % 5000);
+ len = 100 + (random() % 500);
} else {
len = 200000 + (random() % 5000);
}