generic: test MADV_POPULATE_READ with IO errors
[xfstests-dev.git] / tests / generic / 389
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2016 Red Hat, Inc.  All Rights Reserved.
4 #
5 # FS QA Test 389
6 #
7 # Test if O_TMPFILE files inherit POSIX Default ACLs when they are linked into
8 # the namespace.
9 #
10 . ./common/preamble
11 _begin_fstest auto quick acl
12
13 # Import common functions.
14 . ./common/attr
15 . ./common/filter
16
17 # real QA test starts here
18 _supported_fs generic
19
20 _require_test
21 _require_xfs_io_command "-T"
22 _require_xfs_io_command "flink"
23 _require_acls
24
25 testdir="${TEST_DIR}/d.$seq"
26 testfile="${testdir}/tst-tmpfile-flink"
27
28 umask 022
29 rm -rf ${testdir}
30 mkdir -p ${testdir}
31 setfacl -d -m u::rwx,g::rwx,o::rx ${testdir}
32 $XFS_IO_PROG -T -m 0666 \
33         -c "pwrite 0 4096" \
34         -c "pread 0 4096" \
35         -c "flink ${testfile}" \
36         ${testdir} | _filter_xfs_io
37 stat -c '%a' ${testfile}
38
39 # success, all done
40 status=0
41 exit