fstests: move test group info to test files
[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 . ./common/preamble
10 _begin_fstest auto quick ioctl metadata
11
12 timmutable=$here/src/t_immutable
13
14 # Override the default cleanup function.
15 _cleanup()
16 {
17     cd /
18     echo "*** cleaning up"
19     $timmutable -r $SCRATCH_MNT/$seq
20 }
21
22 # Import common functions.
23 . ./common/filter
24 . ./common/attr
25
26 _supported_fs generic
27
28 _require_chattr ia
29 _require_test_program "t_immutable"
30 _require_scratch
31
32 # real QA test starts here
33 _scratch_mkfs >/dev/null 2>&1 || _fail "mkfs failed"
34 _scratch_mount
35
36 echo "*** starting up"
37 $timmutable -c $SCRATCH_MNT/$seq >$tmp.out 2>&1
38 if grep -q -e 'Operation not supported' -e "Inappropriate ioctl" $tmp.out; then
39     rm -f $tmp.out
40     _notrun "Setting immutable/append flag not supported"
41 fi
42 cat $tmp.out
43 rm -f $tmp.out
44 status=$?
45 exit