fsx: Replace use of bcmp() with memcmp()
[xfstests-dev.git] / 202
1 #! /bin/sh
2 # FS QA Test No. 202
3 #
4 # Test out the xfs_repair -o force_geometry option on single-AG filesystems.
5 #
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2009 Christoph Hellwig.
8 #-----------------------------------------------------------------------
9 #
10 # creator
11 owner=hch@lst.de
12
13 seq=`basename $0`
14 echo "QA output created by $seq"
15
16 here=`pwd`
17 tmp=/tmp/$$
18 status=1        # failure is the default!
19
20 # get standard environment, filters and checks
21 . ./common.rc
22 . ./common.filter
23 . ./common.repair
24
25 # real QA test starts here
26 _supported_fs xfs
27 _supported_os Linux
28
29 _require_scratch
30
31 echo "== Creating single-AG filesystem =="
32 _scratch_mkfs_xfs -d agcount=1 >/dev/null 2>&1
33
34 echo "== Trying to repair it (should fail) =="
35 _scratch_xfs_repair
36
37 echo "== Trying to repair it with -o force_geometry =="
38 _scratch_xfs_repair -o force_geometry 2>&1 | _filter_repair
39
40 # success, all done
41 echo "*** done"
42 rm -f $seq.full
43 status=0