summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-08-23 11:54:02 +1000
committerAndrew Tridgell <tridge@samba.org>2008-08-23 11:54:02 +1000
commit3efd7d22626d179b2bf28d7fb3473ed982ed7dcb (patch)
treec3b23b23bc87230ae8da1baa8f2ae4361792dc2d
parent094895cbe1cdfafc6f97f39b64db62384d187b9d (diff)
downloadsamba-3efd7d22626d179b2bf28d7fb3473ed982ed7dcb.tar.gz
samba-3efd7d22626d179b2bf28d7fb3473ed982ed7dcb.tar.bz2
samba-3efd7d22626d179b2bf28d7fb3473ed982ed7dcb.zip
don't use zero data for the first file in RAW-OFFLINE
the most likely bugs in HSM involve zero data, due to the dm_punch_hole() request (This used to be commit 330ab956ea7e0b344450eee60b1357d854fbef28)
-rw-r--r--source4/torture/raw/offline.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/torture/raw/offline.c b/source4/torture/raw/offline.c
index 9c66c3be9c..9240c76b6b 100644
--- a/source4/torture/raw/offline.c
+++ b/source4/torture/raw/offline.c
@@ -108,7 +108,7 @@ static void loadfile_callback(struct composite_context *ctx)
}
for (i=0;i<FILE_SIZE;i++) {
- if (state->loadfile->out.data[i] != state->fnumber % 256) {
+ if (state->loadfile->out.data[i] != 1+(state->fnumber % 255)) {
printf("Bad data in file %u\n", state->fnumber);
test_failed++;
return;
@@ -436,7 +436,7 @@ bool torture_test_offline(struct torture_context *torture)
char buf[FILE_SIZE];
NTSTATUS status;
- memset(buf, i % 256, sizeof(buf));
+ memset(buf, 1+(i % 255), sizeof(buf));
fnum = smbcli_open(state[0].tree, fname, O_RDWR|O_CREAT, DENY_NONE);
if (fnum == -1) {