fstests: use _require_symlinks on all necessary tests
[xfstests-dev.git] / tests / generic / 076
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 076
6 #
7 # Test blockdev reads in parallel with filesystem reads/writes
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
16
17 _lets_get_pidst()
18 {
19         if [ -n "$pid" ]; then
20                 kill -TERM $pid 2>/dev/null
21                 pid=""
22                 wait 2>/dev/null
23         fi
24 }
25
26 _cleanup()
27 {
28         echo "*** unmount"
29         _scratch_unmount 2>/dev/null
30         _lets_get_pidst
31 }
32 trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
33
34 # get standard environment, filters and checks
35 . ./common/rc
36 . ./common/filter
37
38 # real QA test starts here
39 _supported_fs generic
40 _supported_os Linux
41
42 _require_scratch
43 _require_local_device $SCRATCH_DEV
44
45 echo "*** init fs"
46
47 rm -f $seqres.full
48 _scratch_unmount >/dev/null 2>&1
49 echo "*** MKFS ***"                         >>$seqres.full
50 echo ""                                     >>$seqres.full
51 _scratch_mkfs                               >>$seqres.full 2>&1 \
52         || _fail "mkfs failed"
53 _scratch_mount
54
55 echo "*** test concurrent block/fs access"
56
57 cat $SCRATCH_DEV >/dev/null &
58 pid=$!
59
60 FSSTRESS_ARGS=`_scale_fsstress_args -d $SCRATCH_MNT -p 2 -n 2000 $FSSTRESS_AVOID`
61 echo "run fsstress with args: $FSSTRESS_ARGS" >>$seqres.full
62 $FSSTRESS_PROG $FSSTRESS_ARGS >>$seqres.full
63 _lets_get_pidst
64
65 echo "*** done"
66 status=0
67 exit