1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

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)
This commit is contained in:
Andrew Tridgell 2008-08-23 11:54:02 +10:00
parent 094895cbe1
commit 3efd7d2262

View File

@ -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) {