xfs: test what happens when we reset the root dir and it has xattrs
[xfstests-dev.git] / tests / xfs / 143
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0-or-later
3 # Copyright (c) 2021 Oracle.  All Rights Reserved.
4 #
5 # FS QA Test No. 143
6 #
7 # Make sure mkfs sets up enough of the rt geometry that we can compute the
8 # correct min log size for formatting the fs.
9 #
10 # This is a regression test for the xfsprogs commit 31409f48 ("mkfs: set
11 # required parts of the realtime geometry before computing log geometry").
12
13 seq=`basename $0`
14 seqres=$RESULT_DIR/$seq
15 echo "QA output created by $seq"
16
17 here=`pwd`
18 tmp=/tmp/$$
19 status=1    # failure is the default!
20 trap "_cleanup; exit \$status" 0 1 2 3 15
21
22 _cleanup()
23 {
24         cd /
25         rm -f $tmp.*
26 }
27
28 # get standard environment, filters and checks
29 . ./common/rc
30 . ./common/filter
31
32 # real QA test starts here
33 _supported_fs xfs
34 _require_scratch
35 _require_realtime
36
37 rm -f $seqres.full
38
39 # Format a tiny filesystem to force minimum log size, then see if it mounts
40 _scratch_mkfs -r size=1m -d size=100m > $seqres.full
41 _scratch_mount >> $seqres.full
42 echo "Silence is golden"
43
44 # success, all done
45 status=0
46 exit