2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2017 Facebook. All Rights Reserved.
7 # Test that we can't set xattrs on subvolume placeholder directories.
8 # Regression test for Btrfs: disable xattr operations on subvolume directories.
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
16 status=1 # failure is the default!
17 trap "_cleanup; exit \$status" 0 1 2 3 15
25 # get standard environment, filters and checks
30 # remove previous $seqres.full before test
33 # real QA test starts here
39 _scratch_mkfs >/dev/null 2>&1
42 $BTRFS_UTIL_PROG subvolume create "$SCRATCH_MNT/parent" >>$seqres.full
43 $BTRFS_UTIL_PROG subvolume create "$SCRATCH_MNT/parent/child" >>$seqres.full
44 $BTRFS_UTIL_PROG subvolume snapshot "$SCRATCH_MNT/parent" "$SCRATCH_MNT/snapshot" >>$seqres.full
46 $SETFATTR_PROG -n user.test -v foo "$SCRATCH_MNT/snapshot/child" |& _filter_scratch
48 # The original bug resulted in bogus delayed inodes being inserted, so run the
49 # delayed inodes by doing a commit.
50 $BTRFS_UTIL_PROG filesystem sync "$SCRATCH_MNT" >>$seqres.full