fsx/fsstress: round blocksize properly
[xfstests-dev.git] / tests / xfs / 159
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. 159
6 #
7 # Check that the xfs_db timelimit command prints the ranges that we expect.
8 # This in combination with an xfs_ondisk.h build time check in the kernel
9 # ensures that the kernel agrees with userspace.
10
11 seq=`basename $0`
12 seqres=$RESULT_DIR/$seq
13 echo "QA output created by $seq"
14
15 here=`pwd`
16 tmp=/tmp/$$
17 status=1    # failure is the default!
18 trap "_cleanup; exit \$status" 0 1 2 3 15
19
20 _cleanup()
21 {
22         cd /
23 }
24
25 # get standard environment, filters and checks
26 . ./common/rc
27
28 # real QA test starts here
29 _supported_fs xfs
30 _require_scratch
31 _require_xfs_db_command timelimit
32
33 rm -f $seqres.full
34
35 # Format filesystem without bigtime support and populate it
36 _scratch_mkfs > $seqres.full
37 echo classic xfs timelimits
38 _scratch_xfs_db -c 'timelimit --classic'
39 echo bigtime xfs timelimits
40 _scratch_xfs_db -c 'timelimit --bigtime'
41
42 # success, all done
43 status=0
44 exit