2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
7 # Check use of ACLs (extended attributes) on a full filesystem
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
17 # Something w/ enough data to fill 256M of fs...
19 [ -d /lib/modules ] && \
20 [ $(( $(du -h -m /lib/modules | tail -1| cut -f1) * 2 )) -ge 256 ] && \
23 # fall back in case /lib/modules doesn't exist or smaller
26 [ $(( $(du -h -m /usr | tail -1| cut -f1) * 2 )) -ge 256 ] && \
33 _scratch_unmount 2>/dev/null
35 trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
37 # get standard environment, filters and checks
42 # real QA test starts here
46 [ ! -d $filler ] && _notrun "No directory at least 256MB to source files from"
53 echo "*** create filesystem"
56 _scratch_unmount >/dev/null 2>&1
57 echo "*** MKFS ***" >>$seqres.full
58 echo "" >>$seqres.full
59 fs_size=$((256 * 1024 * 1024))
60 _scratch_mkfs_sized $fs_size >> $seqres.full 2>&1 || _fail "mkfs failed"
62 mkdir $SCRATCH_MNT/subdir
64 echo "*** set default ACL"
65 setfacl -R -dm u:fsgqa:rwx,g::rwx,o::r-x,m::rwx $SCRATCH_MNT/subdir
67 echo "*** populate filesystem, pass #1" | tee -a $seqres.full
68 cp -rf $filler $SCRATCH_MNT/subdir >$seqres.full 2>&1
70 echo "*** populate filesystem, pass #2" | tee -a $seqres.full
71 cp -rf $filler $SCRATCH_MNT/subdir >$seqres.full 2>&1