fstests: Add path $here before src/<file>
[xfstests-dev.git] / tests / xfs / 061
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 061
6 #
7 # Test restoring a dump created in IRIX/XFS
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=0        # success is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
17
18 _cleanup()
19 {
20         _cleanup_dump
21         cd /
22         rm -f $tmp.*
23 }
24
25 # get standard environment, filters and checks
26 . ./common/rc
27 . ./common/dump
28
29 # real QA test starts here
30 _supported_fs xfs
31 _supported_os Linux
32
33 # src/dumpfile based on dumping from
34 # _create_dumpdir_fill_perm (small dump)
35
36 _create_dumpdir_fill_perm
37 # override dump_file to checked-in dumpfile
38 # we have no quotas to restore
39 # if we happen to run this on crackle then put the hostname back
40 _do_restore_file --no-check-quota -f $here/src/dumpfile -L stress_056 |
41 sed -e 's/HOSTNAME/crackle/g' -e 's#SCRATCH_DEV#/dev/dsk/dks0d2s1#'
42 _diff_compare_sub
43 _ls_nodate_compare_sub
44
45 # success, all done
46 exit