2 # SPDX-License-Identifier: GPL-2.0-or-later
3 # Copyright (c) 2021 Oracle. All Rights Reserved.
7 # Make sure that mmap and file writers racing with FIDEDUPERANGE cannot write
8 # to the file after the dedupe prep function has decided that the file contents
9 # are identical and we can therefore go ahead with the remapping.
12 seqres=$RESULT_DIR/$seq
13 echo "QA output created by $seq"
17 status=1 # failure is the default!
18 trap "_cleanup; exit \$status" 0 1 2 3 15
26 # get standard environment, filters and checks
30 # real QA test starts here
32 _require_scratch_dedupe
33 _require_test_program "deduperace"
37 nr_ops=$((TIME_FACTOR * 10000))
40 _scratch_mkfs > $seqres.full
43 # Test once with mmap writes
44 $here/src/deduperace -c $SCRATCH_MNT -n $nr_ops
46 # Test again with pwrites for the lulz
47 $here/src/deduperace -c $SCRATCH_MNT -n $nr_ops -w
49 echo Silence is golden.