generic: test MADV_POPULATE_READ with IO errors
[xfstests-dev.git] / tests / generic / 339
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2014 Hannes Frederic Sowa.  All Rights Reserved.
4 #
5 # FS QA Test No. 339
6 #
7 # Test that directory hash entries are place in the correct order.
8 # commit f5ea110 ("xfs: add CRCs to dir2/da node blocks") left the
9 # directory with incorrect hash ordering.
10 #
11 . ./common/preamble
12 _begin_fstest auto dir
13
14 # Import common functions.
15 . ./common/filter
16
17 # real QA test starts here
18 _supported_fs generic
19 _require_scratch
20 _require_test_program "dirhash_collide"
21
22 _scratch_mkfs >>$seqres.full 2>&1
23 _scratch_mount
24
25 echo "Silence is golden"
26
27 testdir=$SCRATCH_MNT/$seq.$$
28 mkdir -p $testdir
29 $here/src/dirhash_collide -d -n 10000 $testdir >>$seqres.full 2>&1
30
31 # check the scratch device
32 _scratch_unmount
33 _check_scratch_fs
34
35 # remove all test dirs and let test harness check scratch fs again
36 _scratch_mount
37 rm -rf $testdir
38
39 # success, all done
40 status=0
41 exit