overlay: run unionmount testsuite test cases
[xfstests-dev.git] / tests / generic / 094
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2015 Facebook.  All Rights Reserved.
4 #
5 # FS QA Test No. 094
6 #
7 # Run the fiemap (file extent mapping) tester with preallocation enabled
8 #
9 seq=`basename $0`
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
12
13 here=`pwd`
14 tmp=/tmp/$$
15 status=1  # failure is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
17
18 _cleanup()
19 {
20         cd /
21         rm -f $tmp.*
22 }
23
24 # get standard environment, filters and checks
25 . ./common/rc
26 . ./common/filter
27
28 # real QA test starts here
29 _supported_fs generic
30 _supported_os Linux
31 _require_scratch
32 _require_odirect
33 _require_xfs_io_command "fiemap"
34 _require_xfs_io_command "falloc"
35
36 _scratch_mkfs > /dev/null 2>&1
37 _scratch_mount > /dev/null 2>&1
38
39 rm -f $seqres.full
40 fiemapfile=$SCRATCH_MNT/$seq.fiemap
41
42 _require_test_program "fiemap-tester"
43
44 seed=`date +%s`
45
46 echo "using seed $seed" >> $seqres.full
47
48 echo "fiemap run with sync"
49 $here/src/fiemap-tester -q -S -s $seed -r 200 $fiemapfile 2>&1 | \
50         tee -a $seqres.full
51
52 echo "fiemap run without sync"
53 $here/src/fiemap-tester -q -s $seed -r 200 $fiemapfile 2>&1 | \
54         tee -a $seqres.full
55
56 status=0
57 exit