fstests: use _require_symlinks on all necessary tests
[xfstests-dev.git] / tests / generic / 488
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2018 Omar Sandoval.  All Rights Reserved.
4 #
5 # FS QA Test 488
6 #
7 # Test having many file descriptors referring to deleted files open. Regression
8 # test for patch "Btrfs: fix ENOSPC caused by orphan items reservations".
9 #
10 seq=`basename $0`
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
13
14 here=`pwd`
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         rm -f $tmp.*
23 }
24
25 . ./common/rc
26 . ./common/filter
27
28 rm -f $seqres.full
29
30 _supported_fs generic
31 _supported_os Linux
32 _require_scratch
33 _require_test_program "multi_open_unlink"
34
35 _scratch_mkfs_sized $((1024 * 1024 * 1024)) >> $seqres.full 2>&1
36 _scratch_mount
37
38 test_file="$SCRATCH_MNT/$seq"
39
40 ulimit -n $((16 * 1024))
41 # ~10000 files on a 1 GB filesystem should be no problem.
42 $here/src/multi_open_unlink -f $SCRATCH_MNT/$seq -n 10000 -s 0
43
44 echo "Silence is golden"
45
46 status=0
47 exit