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 _begin_fstest auto quick snapshot attr
13 # Import common functions.
17 # real QA test starts here
23 _scratch_mkfs >/dev/null 2>&1
26 $BTRFS_UTIL_PROG subvolume create "$SCRATCH_MNT/parent" >>$seqres.full
27 $BTRFS_UTIL_PROG subvolume create "$SCRATCH_MNT/parent/child" >>$seqres.full
28 $BTRFS_UTIL_PROG subvolume snapshot "$SCRATCH_MNT/parent" "$SCRATCH_MNT/snapshot" >>$seqres.full
30 $SETFATTR_PROG -n user.test -v foo "$SCRATCH_MNT/snapshot/child" |& _filter_scratch
32 # The original bug resulted in bogus delayed inodes being inserted, so run the
33 # delayed inodes by doing a commit.
34 $BTRFS_UTIL_PROG filesystem sync "$SCRATCH_MNT" >>$seqres.full