2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2018 Omar Sandoval. All Rights Reserved.
7 # Test having many file descriptors referring to deleted files open. Regression
8 # test for patch "Btrfs: fix ENOSPC caused by orphan items reservations".
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
16 status=1 # failure is the default!
17 trap "_cleanup; exit \$status" 0 1 2 3 15
32 _require_test_program "multi_open_unlink"
34 _scratch_mkfs_sized $((1024 * 1024 * 1024)) >> $seqres.full 2>&1
37 test_file="$SCRATCH_MNT/$seq"
39 ulimit -n $((16 * 1024))
40 # ~10000 files on a 1 GB filesystem should be no problem.
41 $here/src/multi_open_unlink -f $SCRATCH_MNT/$seq -n 10000 -s 0
43 echo "Silence is golden"