xfs/530: skip test if user MKFS_OPTIONS screw up formatting
[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 . ./common/preamble
12 _begin_fstest auto quick bigtime
13
14 # Override the default cleanup function.
15 _cleanup()
16 {
17         cd /
18 }
19
20 # Import common functions.
21
22 # real QA test starts here
23 _supported_fs xfs
24 _require_scratch
25 _require_xfs_db_command timelimit
26
27 # Format filesystem without bigtime support and populate it
28 _scratch_mkfs > $seqres.full
29 echo classic xfs timelimits
30 _scratch_xfs_db -c 'timelimit --classic'
31 echo bigtime xfs timelimits
32 _scratch_xfs_db -c 'timelimit --bigtime'
33
34 # success, all done
35 status=0
36 exit