btrfs/012: check free size of scratch device before copying files
[xfstests-dev.git] / tests / xfs / 056
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 056
6 #
7 # Test xfsdump/xfsrestore to a dump file (as opposed to a tape)
8 # and test restoring various permissions/modes
9 #
10 seq=`basename $0`
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
13
14 here=`pwd`
15 tmp=/tmp/$$
16 status=0        # success is the default!
17 trap "_cleanup; exit \$status" 0 1 2 3 15
18
19 _cleanup()
20 {
21         _cleanup_dump
22         cd /
23         rm -f $tmp.*
24 }
25
26 # get standard environment, filters and checks
27 . ./common/rc
28 . ./common/dump
29
30 # real QA test starts here
31 _supported_fs xfs
32
33 _create_dumpdir_fill_perm
34 _do_dump_file
35 _do_restore_file
36 _ls_compare_sub
37
38 # success, all done
39 exit