Re: [PATCH] xfstests XFS: verify extended attributes after multi-stream xfsdump/xfsrestore

Dave Chinner
2013-10-08T00:53:25Z

On Mon, Oct 07, 2013 at 02:38:35PM -0500, rjohnston@sgi.com wrote:
> Verify extended attributes are not lost after multi-stream
> xfsdump/xfsrestore of wholly-sparse files. xfsrestore did not
> recognize that if the LAST header was reached with no restoredsz set,
> (i.e the LAST header is the only header), the following warning is
> displayed:
>
> "partial_reg: Out of records. Extend attrs applied early."
>
> and the extended attributes on the current and following restored
> files are lost.
>
> Signed-off-by: Rich Johnston <rjohnston@sgi.com>
>
> ---
> tests/xfs/350 | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> tests/xfs/350.out | 2
> tests/xfs/group | 1
> 3 files changed, 137 insertions(+)
>
> Index: b/tests/xfs/350
> ===================================================================
> --- /dev/null
> +++ b/tests/xfs/350
....
> +here=`pwd`
> +tmp=/tmp/$$
> +status=0 # success is the default!

status=1

Test failure should always be the default.

> +}
> +echo "Silence is golden."
> +echo "Starting Test 1" >> $seqres.full
> +_clean_dirs
> +_create_test1_files
> +_set_attrs
> +_do_dump_restore
> +_verify_attrs
> +
> +echo "Starting Test 2" >> $seqres.full
> +_clean_dirs
> +_create_test2_files
> +_set_attrs
> +_do_dump_restore
> +_verify_attrs

Two tests, please. move all the common parts into common/dump, and
write them as two separate tests. That way we can easily track what
test is failing just by looking at what harness test is failing...

Cheers,

Dave.

--
Dave Chinner
david@fromorbit.com