xfs: force file creation to the data device for certain layout tests
[xfstests-dev.git] / tests / xfs / 510
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0+
3 # Copyright (c) 2019 Oracle, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 510
6 #
7 # Regression test for a long-standing bug in BULKSTAT and INUMBERS where
8 # the kernel fails to write thew new @lastip value back to userspace if
9 # @ocount is NULL.
10 #
11 # This is a regression test for commit f16fe3ecde62 ("xfs: bulkstat should copy
12 # lastip whenever userspace supplies one")
13 #
14 seq=`basename $0`
15 seqres=$RESULT_DIR/$seq
16 echo "QA output created by $seq"
17
18 here=`pwd`
19 tmp=/tmp/$$
20 status=1        # failure is the default!
21 trap "_cleanup; exit \$status" 0 1 2 3 15
22
23 _cleanup()
24 {
25     cd /
26     rm -f $tmp.*
27 }
28
29 # get standard environment, filters and checks
30 . ./common/rc
31 . ./common/filter
32
33 _require_test_program "bulkstat_null_ocount"
34
35 # real QA test starts here
36
37 _supported_fs xfs
38
39 rm -f $seqres.full
40
41 echo "Silence is golden."
42 $here/src/bulkstat_null_ocount $TEST_DIR
43
44 # success, all done
45 status=0
46 exit