generic: test for creating duplicate filenames in encrypted dir
[xfstests-dev.git] / tests / ext4 / 001
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright 2014 (C) Red Hat, Inc., Lukas Czerner <lczerner@redhat.com>
4 #
5 # FS QA Test No. 001
6 #
7 # Test fallocate FALLOC_FL_ZERO_RANGE
8 #
9 seqfull=$0
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
18 _cleanup()
19 {
20     rm -f $tmp.*
21 }
22
23 trap "_cleanup ; exit \$status" 0 1 2 3 15
24
25 # get standard environment, filters and checks
26 . ./common/rc
27 . ./common/filter
28 . ./common/punch
29
30 # real QA test starts here
31 _supported_fs ext4
32 _require_xfs_io_command "fzero"
33 _require_test
34
35 # Select appropriate golden output based on mount options
36 _link_out_file
37
38 testfile=$TEST_DIR/001.$$
39
40 # Standard zero range tests
41 _test_generic_punch falloc fzero fzero fiemap _filter_fiemap $testfile
42
43 # Delayed allocation zero range tests
44 _test_generic_punch -d falloc fzero fzero fiemap _filter_fiemap $testfile
45
46 # Multi zero range tests
47 _test_generic_punch -k falloc fzero fzero fiemap _filter_fiemap $testfile
48
49 # Delayed allocation multi zero range tests
50 _test_generic_punch -d -k falloc fzero fzero fiemap _filter_fiemap $testfile
51
52 status=0 ; exit