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
45 [ ! -d $filler ] && _notrun "No directory at least 256MB to source files from"
52 echo "*** create filesystem"
55 _scratch_unmount >/dev/null 2>&1
56 echo "*** MKFS ***" >>$seqres.full
57 echo "" >>$seqres.full
58 fs_size=$((256 * 1024 * 1024))
59 _scratch_mkfs_sized $fs_size >> $seqres.full 2>&1 || _fail "mkfs failed"
61 mkdir $SCRATCH_MNT/subdir
63 echo "*** set default ACL"
64 setfacl -R -dm u:fsgqa:rwx,g::rwx,o::r-x,m::rwx $SCRATCH_MNT/subdir
66 echo "*** populate filesystem, pass #1" | tee -a $seqres.full
67 cp -rf $filler $SCRATCH_MNT/subdir >$seqres.full 2>&1
69 echo "*** populate filesystem, pass #2" | tee -a $seqres.full
70 cp -rf $filler $SCRATCH_MNT/subdir >$seqres.full 2>&1