2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
7 # Run the t_immutable test program for immutable/append-only files.
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
14 timmutable=$here/src/t_immutable
16 status=1 # failure is the default!
17 trap "_cleanup; exit \$status" 0 1 2 3 15
22 echo "*** cleaning up"
23 $timmutable -r $SCRATCH_MNT/$seq
26 # get standard environment, filters and checks
35 _require_test_program "t_immutable"
38 # real QA test starts here
39 _scratch_mkfs >/dev/null 2>&1 || _fail "mkfs failed"
42 echo "*** starting up"
43 $timmutable -c $SCRATCH_MNT/$seq >$tmp.out 2>&1
44 if grep -q -e 'Operation not supported' -e "Inappropriate ioctl" $tmp.out; then
46 _notrun "Setting immutable/append flag not supported"