Re: [PATCH 06/12] Fix btrfs/094 to work on non-4k block sized filesystems

Chandan Rajendra
2015-11-25T11:52:45Z

On Wednesday 25 Nov 2015 11:11:27 Filipe Manana wrote:
>
> Hi Chandan,
>
> I can't agree with this change. We're no longer checking that file
> data is correct after the cloning operations. The md5sum checks were
> exactly for that. So essentially the test is only verifying the clone
> operations don't fail with errors, it no longer checks for data
> corruption...
>
> Same comment applies to at least a few other patches in the series.

Hello Filipe,

All the tests where we had md5sum being echoed into output have been replaced
with code to verify the md5sum values as shown below,

if [ $foo_orig_hash != $foo_hash ]; then
echo "Read operation failed on $SCRATCH_MNT/foo: "\
"Mimatching hash values detected."
fi

This will cause a diff between the test's ideal output versus the output
obtained during the test run.

In case of btrfs/094, I have added an associative array to hold the md5sums
and
the file content verification is being performed by the following code,

for key in "${!src_fs_hash[@]}"; do
if [ ${src_fs_hash[$key]} != ${dst_fs_hash[$key]} ]; then
echo "Mimatching hash value detected against \
$(echo $key | tr _ /)"
fi
done

--
chandan