generic: test MADV_POPULATE_READ with IO errors
[xfstests-dev.git] / tests / btrfs / 047
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2017 Facebook.  All Rights Reserved.
4 #
5 # FS QA Test 047
6 #
7 # Test that we can't set xattrs on subvolume placeholder directories.
8 # Regression test for Btrfs: disable xattr operations on subvolume directories.
9 #
10 . ./common/preamble
11 _begin_fstest auto quick snapshot attr
12
13 # Import common functions.
14 . ./common/filter
15 . ./common/attr
16
17 # real QA test starts here
18
19 _supported_fs btrfs
20 _require_attrs
21 _require_scratch
22
23 _scratch_mkfs >/dev/null 2>&1
24 _scratch_mount
25
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
29
30 $SETFATTR_PROG -n user.test -v foo "$SCRATCH_MNT/snapshot/child" |& _filter_scratch
31
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
35
36 status=0
37 exit