fstest: fix dumping of miscompare buffer
PATCH 1/1 fstest: fix dumping of miscompare buffer
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 <[email protected]>
src/fstest.c +1 -1
@@ -73,7 +73,7 @@ static void check_buffer(uchar *buf, int loop, int child, int fnum, int ofs)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 );
Quoted 5 lines · Christoph Hellwig
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 <[email protected]>
Reviewed-by Theodore Ts'o <[email protected]>