generic: test MADV_POPULATE_READ with IO errors
[xfstests-dev.git] / tests / xfs / 500
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. 500
6 #
7 # Make sure we can't format a filesystem with insane extent hints.
8 #
9 . ./common/preamble
10 _begin_fstest auto quick mkfs prealloc mkfs
11 testfile=$TEST_DIR/$seq.txt
12
13 # Import common functions.
14
15 # real QA test starts here
16 _supported_fs xfs
17 _require_scratch_nocheck
18
19 # Try regular extent size hint
20 echo extszinherit >> $seqres.full
21 _scratch_mkfs -d extszinherit=8388608 >> $seqres.full 2>&1
22 test $? -eq 1 || echo "should have failed extszinherit"
23
24 # Try cow extent size hint if supported
25 if _scratch_mkfs_xfs_supported -m crc=1,reflink=1 >> $seqres.full 2>&1; then
26         echo cowextsize >> $seqres.full
27         _scratch_mkfs -m reflink=1,crc=1 -d cowextsize=8388608 >> $seqres.full 2>&1
28         test $? -eq 1 || echo "should have failed cowextsize"
29 fi
30
31 echo silence is golden
32 status=0
33 exit