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
34 _require_test_program "t_immutable"
37 # real QA test starts here
38 _scratch_mkfs >/dev/null 2>&1 || _fail "mkfs failed"
41 echo "*** starting up"
42 $timmutable -c $SCRATCH_MNT/$seq >$tmp.out 2>&1
43 if grep -q -e 'Operation not supported' -e "Inappropriate ioctl" $tmp.out; then
45 _notrun "Setting immutable/append flag not supported"