xfs: convert tests to SPDX license tags
[xfstests-dev.git] / tests / xfs / 119
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2005 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 119
6 #
7 # Leaking reservation space in the GRH
8 # Test out pv#942130
9 # This can hang when things aren't working
10 #
11 seq=`basename $0`
12 seqres=$RESULT_DIR/$seq
13 echo "QA output created by $seq"
14
15 here=`pwd`
16 tmp=/tmp/$$
17 status=1        # failure is the default!
18 trap "_cleanup; exit \$status" 0 1 2 3 15
19
20 _cleanup()
21 {
22     cd /
23     rm -f $tmp.*
24 }
25
26 # get standard environment, filters and checks
27 . ./common/rc
28 . ./common/filter
29
30 # real QA test starts here
31
32 # Modify as appropriate.
33 _supported_fs xfs
34 _supported_os Linux
35
36 _require_scratch
37
38 # this may hang
39 sync
40
41 export MKFS_OPTIONS="-l version=2,size=2560b,su=64k" 
42 export MOUNT_OPTIONS="-o logbsize=64k"
43 _scratch_mkfs_xfs >/dev/null
44
45 _scratch_mount
46
47 max=99
48 i=0
49 echo "start freezing and unfreezing"
50 while [ $i -lt $max ]; do
51         xfs_freeze -f $SCRATCH_MNT
52         xfs_freeze -u $SCRATCH_MNT
53         echo -n .
54         let i=$i+1
55 done
56 echo "done"
57
58 # success, all done
59 status=0
60 exit