git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
094895c
)
don't use zero data for the first file in RAW-OFFLINE
author
Andrew Tridgell
<tridge@samba.org>
Sat, 23 Aug 2008 01:54:02 +0000
(11:54 +1000)
committer
Andrew Tridgell
<tridge@samba.org>
Sat, 23 Aug 2008 01:54:02 +0000
(11:54 +1000)
the most likely bugs in HSM involve zero data, due to the
dm_punch_hole() request
(This used to be commit
330ab956ea7e0b344450eee60b1357d854fbef28
)
source4/torture/raw/offline.c
patch
|
blob
|
history
diff --git
a/source4/torture/raw/offline.c
b/source4/torture/raw/offline.c
index 9c66c3be9c955b2b62cfc51afc99a60d619b90a5..9240c76b6b67133fb8774cd62281737ecc086225 100644
(file)
--- 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) {