common: kill _supported_os
[xfstests-dev.git] / tests / generic / 079
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 079
6 #
7 # Run the t_immutable test program for immutable/append-only files.
8 #
9 seq=`basename $0`
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
12
13 here=`pwd`
14 timmutable=$here/src/t_immutable
15 tmp=/tmp/$$
16 status=1        # failure is the default!
17 trap "_cleanup; exit \$status" 0 1 2 3 15
18
19 _cleanup()
20 {
21     cd /
22     echo "*** cleaning up"
23     $timmutable -r $SCRATCH_MNT/$seq
24 }
25
26 # get standard environment, filters and checks
27 . ./common/rc
28 . ./common/filter
29 . ./common/attr
30
31 _supported_fs generic
32
33 _require_chattr ia
34 _require_test_program "t_immutable"
35 _require_scratch
36
37 # real QA test starts here
38 _scratch_mkfs >/dev/null 2>&1 || _fail "mkfs failed"
39 _scratch_mount
40
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
44     rm -f $tmp.out
45     _notrun "Setting immutable/append flag not supported"
46 fi
47 cat $tmp.out
48 rm -f $tmp.out
49 status=$?
50 exit