When fstests finds a miscompare it tries to dump the corrupted
bytes from the buffer, but due to an incorrect comparism actully
dumps the correct part of it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Dave Chinner <david@fromorbit.com>
for (j=0;j<MIN(20, block_size-i);j++) {
printf("%02x ", buf[j+i]);
}
- for (j=i;buf[j] == buf2[j] && j<block_size;j++) ;
+ for (j=i;buf[j] != buf2[j] && j<block_size;j++) ;
printf("Corruption length: %d\n", j - i);
printf("\n");
exit(1);