On Fri, Jan 04, 2019 at 03:14:48PM -0800, Darrick J. Wong wrote: > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > > Eric Sandeen recently found a bug in xfs_repair that flagged extended > attribute names containing "/" as corrupt and purged them. There's > nothing in the IRIX or Linux manuals that say anything about slashes not > being allowed (and Linux certainly allows this) so let's make sure this > continues to work. > > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx> > --- > tests/generic/708 | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ > tests/generic/708.out | 6 ++++++ > tests/generic/group | 1 + > 3 files changed, 57 insertions(+) > create mode 100755 tests/generic/708 > create mode 100644 tests/generic/708.out > > diff --git a/tests/generic/708 b/tests/generic/708 > new file mode 100755 > index 00000000..c32f966c > --- /dev/null > +++ b/tests/generic/708 > @@ -0,0 +1,50 @@ > +#! /bin/bash > +# SPDX-License-Identifier: GPL-2.0+ > +# Copyright (c) 2019 Oracle, Inc. All Rights Reserved. > +# > +# FS QA Test No. 708 > +# > +# Check that xattrs can have slashes in their name. > +# > +seq=`basename $0` > +seqres=$RESULT_DIR/$seq > +echo "QA output created by $seq" > +tmp=/tmp/$$ > +status=1 # failure is the default! > +trap "_cleanup; exit \$status" 0 1 2 3 15 > + > +_cleanup() > +{ > + cd / > + rm -f $tmp.* > +} > + > +# get standard environment, filters and checks > +. ./common/rc > +. ./common/attr > +. ./common/filter > + > +# real QA test starts here > +_supported_fs generic > +_supported_os Linux > +_require_scratch > +_require_attrs > + > +rm -f $seqres.full > + > +_scratch_mkfs >> $seqres.full 2>&1 > +_scratch_mount > + > +echo "set attr" > +file=$SCRATCH_MNT/moofile > +touch $file > +setfattr -n "user.boo/hoo" -v "woof" $file [off-topic] I love your creativity for naming :D > + > +echo "check attr" > +getfattr -d --absolute-names $file | _filter_scratch > + > +# Now we let the fsck tool check the filesystem, because xfs_repair had a > +# regression where it would flag and erase any xattr with a '/' in it. > + I'd prefer this to be in the beginning of the test description instead of 'hidden' in the middle of the code, so, it's easily accessible via 'grep'. But the test itself looks good, and I don't think this change is worth a V3, so if you want, you could move it to the test description before merging, or ignore my suggestion completely :P But anyway, you can add: Reviewed-by: Carlos Maiolino <cmaiolino@xxxxxxxxxx> Cheers -- Carlos