2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
7 # Exercising the inheritable realtime inode bit.
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 status=1 # failure is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
24 # get standard environment, filters and checks
28 # real QA test starts here
33 _filter_realtime_flag()
35 _test_inode_flag realtime $SCRATCH_MNT/testdir/$1
37 echo "--r-- SCRATCH_MNT/testdir/$1"
39 echo "----- SCRATCH_MNT/testdir/$1"
43 _filter_rtinherit_flag()
45 _test_inode_flag rt-inherit $SCRATCH_MNT/testdir
47 echo "--t-- SCRATCH_MNT/testdir"
49 echo "----- SCRATCH_MNT/testdir"
56 if ! _scratch_mkfs_xfs >$tmp.out 2>&1
59 echo "failed to mkfs $SCRATCH_DEV"
64 if ! _try_scratch_mount
66 echo "failed to mount $SCRATCH_DEV"
72 mkdir $SCRATCH_MNT/testdir
74 # set inode attribute, create files below and check they're marked realtime
75 # unset inode attribute, create files below and check they're not realtime
77 echo "*** create directory with rtinherit"
78 $XFS_IO_PROG -r -c 'chattr +t' $SCRATCH_MNT/testdir
79 _filter_rtinherit_flag
81 echo "*** create child with inherited realtime"
82 touch $SCRATCH_MNT/testdir/real
83 _filter_realtime_flag real
85 echo "*** remove rtinherit from directory"
86 $XFS_IO_PROG -r -c 'chattr -t' $SCRATCH_MNT/testdir
87 _filter_rtinherit_flag
89 echo "*** create child without inherited realtime"
90 touch $SCRATCH_MNT/testdir/unreal
91 _filter_realtime_flag unreal