Message ID | 03ba6c154c9e2cf3d68131b3af2ca12b96663d25.1736496620.git.nirjhar.roy.lists@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Add support for central fsconfig and -q <n> unconditional loop | expand |
On Fri, Jan 10, 2025 at 09:10:25AM +0000, Nirjhar Roy (IBM) wrote: > This test is to simulate the behavior of a flaky test. This will be required > when we will make some modifications to the pass/fail metric calculation of > the test infrastructure where we will need a test with non-zero pass > and non-zero failure rate. > > Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> > Signed-off-by: Nirjhar Roy (IBM) <nirjhar.roy.lists@gmail.com> > --- > tests/selftest/007 | 21 +++++++++++++++++++++ > tests/selftest/007.out | 2 ++ > 2 files changed, 23 insertions(+) > create mode 100755 tests/selftest/007 > create mode 100644 tests/selftest/007.out > > diff --git a/tests/selftest/007 b/tests/selftest/007 > new file mode 100755 > index 00000000..f100ec5f > --- /dev/null > +++ b/tests/selftest/007 > @@ -0,0 +1,21 @@ > +#! /bin/bash > +# SPDX-License-Identifier: GPL-2.0 > +# Copyright (c) 2024 IBM Corporation. All Rights Reserved. > +# Author: Nirjhar Roy (IBM) <nirjhar.roy.lists@gmail.com> > +# > +# FS QA Test 007 > +# > +# This test is to simulate the behavior of a flakey test. > +# > + > +. ./common/preamble > +_begin_fstest selftest > + > +if (($RANDOM % 2)); then > + echo "Silence is golden" > +else > + echo "Silence is flakey" Oh is it now? ;) Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> --D > +fi > + > +status=0 > +exit > diff --git a/tests/selftest/007.out b/tests/selftest/007.out > new file mode 100644 > index 00000000..fd3590e6 > --- /dev/null > +++ b/tests/selftest/007.out > @@ -0,0 +1,2 @@ > +QA output created by 007 > +Silence is golden > -- > 2.34.1 > >
diff --git a/tests/selftest/007 b/tests/selftest/007 new file mode 100755 index 00000000..f100ec5f --- /dev/null +++ b/tests/selftest/007 @@ -0,0 +1,21 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2024 IBM Corporation. All Rights Reserved. +# Author: Nirjhar Roy (IBM) <nirjhar.roy.lists@gmail.com> +# +# FS QA Test 007 +# +# This test is to simulate the behavior of a flakey test. +# + +. ./common/preamble +_begin_fstest selftest + +if (($RANDOM % 2)); then + echo "Silence is golden" +else + echo "Silence is flakey" +fi + +status=0 +exit diff --git a/tests/selftest/007.out b/tests/selftest/007.out new file mode 100644 index 00000000..fd3590e6 --- /dev/null +++ b/tests/selftest/007.out @@ -0,0 +1,2 @@ +QA output created by 007 +Silence is golden