On Wed, Jun 11, 2025 at 03:04:50PM +0530, Ojaswin Mujoo wrote: > Stress file with atomic writes to ensure we excercise codepaths > where we are mixing different FS operations with atomic writes > > Suggested-by: Ritesh Harjani (IBM) <ritesh.list@xxxxxxxxx> > Signed-off-by: Ojaswin Mujoo <ojaswin@xxxxxxxxxxxxx> > --- > tests/generic/771 | 49 +++++++++++++++++++++++++++++++++++++++++++ > tests/generic/771.out | 2 ++ > 2 files changed, 51 insertions(+) > create mode 100755 tests/generic/771 > create mode 100644 tests/generic/771.out > > diff --git a/tests/generic/771 b/tests/generic/771 > new file mode 100755 > index 00000000..690dfa0a > --- /dev/null > +++ b/tests/generic/771 > @@ -0,0 +1,49 @@ > +#! /bin/bash > +# SPDX-License-Identifier: GPL-2.0 > +# Copyright (c) 2025 IBM Corporation. All Rights Reserved. > +# > +# FS QA Test 771 > +# > +# fuzz fsx with atomic writes > +# > +. ./common/preamble > +. ./common/atomicwrites > +_begin_fstest rw auto quick atomicwrites > + > +# Import common functions. > +. ./common/filter > + > +_require_test > +_require_odirect > +_require_scratch_write_atomic > + > +_scratch_mkfs >> $seqres.full 2>&1 > +_scratch_mount >> $seqres.full 2>&1 > + > +testfile=$SCRATCH_MNT/testfile > +touch $testfile > + > +awu_max=$(_get_atomic_write_unit_max $testfile) > +blksz=$(_get_block_size $SCRATCH_MNT) > +bsize=`$here/src/min_dio_alignment $SCRATCH_MNT $SCRATCH_DEV` > + > +# fsx usage: > +# > +# -N numops: total # operations to do > +# -l flen: the upper bound on file size > +# -o oplen: the upper bound on operation size (64k default) > +# -w writebdy: $psize would make writes page aligned (on i386) > +# -Z: O_DIRECT (use -R, -W, -r and -w too) > +# -W: mapped write operations DISabled > + > +_run_fsx_on_file $testfile -N 10000 -a -o $awu_max -l 500000 -r $bsize -w $bsize -Z -W $FSX_AVOID >> $seqres.full Don't we already get fsx stress testing RWF_ATOMIC through generic/521 and generic/522? Also why is mmap write disabled? --D > +status=$? > + > +if [[ "$status" != "0" ]] > +then > + echo "Somthing went wrong, check $seqres.full" > +fi > + > +echo "Silence is golden" > +status=0 > +exit > diff --git a/tests/generic/771.out b/tests/generic/771.out > new file mode 100644 > index 00000000..c2345c7b > --- /dev/null > +++ b/tests/generic/771.out > @@ -0,0 +1,2 @@ > +QA output created by 771 > +Silence is golden > -- > 2.49.0 > >