generic: test MADV_POPULATE_READ with IO errors
[xfstests-dev.git] / tests / xfs / 269
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2016, Oracle and/or its affiliates.  All Rights Reserved.
4 #
5 # FS QA Test No. 269
6 #
7 # Check that attr_list_by_handle copies the cursor back to userspace.
8 #
9 . ./common/preamble
10 _begin_fstest auto quick ioctl
11
12 # Override the default cleanup function.
13 _cleanup()
14 {
15         cd /
16         rm -rf "$tmp".* $TEST_DIR/fsmap $TEST_DIR/testout
17 }
18
19 # Import common functions.
20 . ./common/filter
21 . ./common/attr
22 . ./common/populate
23
24 # real QA test starts here
25 _require_scratch
26 _require_populate_commands
27 _require_test_program "attr-list-by-handle-cursor-test"
28
29 rm -f "$seqres.full"
30
31 echo "Format and mount"
32 _scratch_mkfs > "$seqres.full" 2>&1
33 _scratch_mount
34
35 echo "Stuff file with xattrs"
36 mkdir $SCRATCH_MNT/foo
37 __populate_create_attr $SCRATCH_MNT/foo 100
38
39 echo "Run test program"
40 $here/src/attr-list-by-handle-cursor-test $SCRATCH_MNT/foo
41
42 # success, all done
43 status=0
44 exit