xfs: no excessive warnings about dprecated mount options on remount
[xfstests-dev.git] / tests / xfs / 447
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2018 Red Hat, Inc.  All Rights Reserved.
4 #
5 # FS QA Test 447
6 #
7 # Exercise mount vs superblock shrinker races.
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         echo 0 > /sys/fs/xfs/debug/mount_delay
23 }
24
25 # get standard environment, filters and checks
26 . ./common/rc
27 . ./common/filter
28
29 # remove previous $seqres.full before test
30 rm -f $seqres.full
31
32 # real QA test starts here
33
34 _supported_fs xfs
35
36 _require_scratch
37 _require_xfs_sysfs debug/mount_delay
38
39 echo "Silence is golden"
40
41 _scratch_mkfs > $seqres.full 2>&1
42 _scratch_mount
43
44 $XFS_IO_PROG -fxc "pwrite 0 4k" -c fsync \
45                 -c "shutdown" $SCRATCH_MNT/foo 2>&1 > /dev/null
46
47 _scratch_unmount
48
49 echo 30 > /sys/fs/xfs/debug/mount_delay
50 _scratch_mount
51 echo 0 > /sys/fs/xfs/debug/mount_delay
52 _scratch_unmount
53
54 # success, all done
55 status=0
56 exit