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 _begin_fstest auto quick rw dedupe clone
14 # Import common functions.
17 # real QA test starts here
19 _require_scratch_dedupe
20 _require_test_program "deduperace"
22 nr_ops=$((TIME_FACTOR * 10000))
25 _scratch_mkfs > $seqres.full
28 # Test once with mmap writes
29 $here/src/deduperace -c $SCRATCH_MNT -n $nr_ops
31 # Test again with pwrites for the lulz
32 $here/src/deduperace -c $SCRATCH_MNT -n $nr_ops -w
34 echo Silence is golden.