summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-15 01:37:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:54 -0500
commit1edc2f95e345d7b2691fc636bd4d8e0f3e03bff2 (patch)
treecb8421948426ecba2bcaac94f510fbda48bb47f3 /source4
parent970ba3a736503d2ddecfdf27153f2d57903237bc (diff)
downloadsamba-1edc2f95e345d7b2691fc636bd4d8e0f3e03bff2.tar.gz
samba-1edc2f95e345d7b2691fc636bd4d8e0f3e03bff2.tar.bz2
samba-1edc2f95e345d7b2691fc636bd4d8e0f3e03bff2.zip
r2983: report a failure if a server doesn't update the write time at all
after 2 minutes (This used to be commit b2298a1c5f0330a262ac855479060fd677fe8059)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/raw/write.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/torture/raw/write.c b/source4/torture/raw/write.c
index 2ea4cdcadf..276e5398ac 100644
--- a/source4/torture/raw/write.c
+++ b/source4/torture/raw/write.c
@@ -690,6 +690,7 @@ static BOOL test_delayed_write_update(struct smbcli_state *cli, TALLOC_CTX *mem_
fnum1 = smbcli_open(cli->tree, fname, O_RDWR|O_CREAT, DENY_NONE);
if (fnum1 == -1) {
+ printf("Failed to open %s\n", fname);
return False;
}
@@ -708,7 +709,7 @@ static BOOL test_delayed_write_update(struct smbcli_state *cli, TALLOC_CTX *mem_
nt_time_string(mem_ctx, finfo1.basic_info.out.write_time));
/* 3 second delay to ensure we get past any 2 second time
- granularity (older systems may have that */
+ granularity (older systems may have that) */
sleep(3);
written = smbcli_write(cli->tree, fnum1, 0, "x", 0, 1);
@@ -738,6 +739,12 @@ static BOOL test_delayed_write_update(struct smbcli_state *cli, TALLOC_CTX *mem_
sleep(1);
fflush(stdout);
}
+
+ if (finfo1.basic_info.out.write_time == finfo2.basic_info.out.write_time) {
+ printf("Server did not update write time?!\n");
+ ret = False;
+ }
+
if (fnum1 != -1)
smbcli_close(cli->tree, fnum1);