summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-08-26 10:56:16 +1000
committerAndrew Bartlett <abartlet@samba.org>2008-08-26 10:56:16 +1000
commitf7c13b1a959903f3bb64206c0335b1b3c3de3065 (patch)
treed9a54a23d4dbb3705d9a4e251858ec571a87fbfb /source4/torture
parenta85ee07046b80e9e87d2ac0cf5fe95ddaaa0f5c9 (diff)
downloadsamba-f7c13b1a959903f3bb64206c0335b1b3c3de3065.tar.gz
samba-f7c13b1a959903f3bb64206c0335b1b3c3de3065.tar.bz2
samba-f7c13b1a959903f3bb64206c0335b1b3c3de3065.zip
Make RPC-LSA test deterministic with an msleep(200).
(This used to be commit 914e1865aa9fba417f74a3abdd8b4b2659feb001)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/lsa.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 98cbf12e68..31dc38500d 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -28,7 +28,6 @@
#include "libcli/auth/libcli_auth.h"
#include "torture/rpc/rpc.h"
#include "param/param.h"
-
#define TEST_MACHINENAME "lsatestmach"
static void init_lsa_String(struct lsa_String *name, const char *s)
@@ -1162,7 +1161,7 @@ static bool test_CreateSecret(struct dcerpc_pipe *p,
&blob1, &session_key);
if (strcmp(secret1, secret2) != 0) {
- printf("Returned secret '%s' doesn't match '%s'\n",
+ printf("Returned secret (r4) '%s' doesn't match '%s'\n",
secret2, secret1);
ret = false;
}
@@ -1177,7 +1176,9 @@ static bool test_CreateSecret(struct dcerpc_pipe *p,
r5.in.new_val->data = enc_key.data;
r5.in.new_val->length = enc_key.length;
r5.in.new_val->size = enc_key.length;
-
+
+
+ msleep(200);
printf("Testing SetSecret (existing value should move to old)\n");
status = dcerpc_lsa_SetSecret(p, mem_ctx, &r5);
@@ -1241,8 +1242,10 @@ static bool test_CreateSecret(struct dcerpc_pipe *p,
}
if (*r6.out.new_mtime == *r6.out.old_mtime) {
- printf("Returned secret %s had same mtime for both secrets: %s\n",
+ printf("Returned secret (r6-%d) %s must not have same mtime for both secrets: %s != %s\n",
+ i,
secname[i],
+ nt_time_string(mem_ctx, *r6.out.old_mtime),
nt_time_string(mem_ctx, *r6.out.new_mtime));
ret = false;
}
@@ -1310,7 +1313,7 @@ static bool test_CreateSecret(struct dcerpc_pipe *p,
}
if (*r8.out.new_mtime != *r8.out.old_mtime) {
- printf("Returned secret %s should have had same mtime for both secrets: %s != %s\n",
+ printf("Returned secret (r8) %s did not had same mtime for both secrets: %s != %s\n",
secname[i],
nt_time_string(mem_ctx, *r8.out.old_mtime),
nt_time_string(mem_ctx, *r8.out.new_mtime));