lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 27 Sep 2012 10:19:19 +1000
From:	Dave Chinner <david@...morbit.com>
To:	Dmitry Monakhov <dmonakhov@...nvz.org>
Cc:	linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	hch@....de, xfs@....sgi.com
Subject: Re: [PATCH 3/6] xfstest: allow fsstress to use load factor where
 appropriate

On Mon, Sep 24, 2012 at 06:23:18PM +0400, Dmitry Monakhov wrote:
> 
> Signed-off-by: Dmitry Monakhov <dmonakhov@...nvz.org>
> ---
>  017 |    5 ++++-
>  068 |    4 ++--
>  070 |    4 +++-
>  076 |    5 ++++-
>  083 |    4 ++--
>  087 |   10 ++++++----
>  104 |    4 ++--
>  114 |    5 +++--
>  167 |    4 ++--
>  232 |    5 +++--
>  233 |    5 +++--
>  269 |    7 ++++---
>  270 |    7 ++++---
>  276 |   11 ++++++-----
>  14 files changed, 48 insertions(+), 32 deletions(-)
> 
> diff --git a/017 b/017
> index 9ca0e72..8d35ee8 100755
> --- a/017
> +++ b/017
> @@ -67,7 +67,10 @@ echo "*** test"
>  for l in 0 1 2 3 4
>  do
>          echo "    *** test $l"
> -        $FSSTRESS_PROG -d $SCRATCH_MNT -n 1000 $FSSTRESS_AVOID >>$seq.full
> +	NUM=$((1000 * TIME_FACTOR))

$TIME_FACTOR, perhaps?

> +	CPU=$((1 * LOAD_FACTOR))
> +        $FSSTRESS_PROG -d $SCRATCH_MNT -n $NUM -p $CPU \
> +	    $FSSTRESS_AVOID >>$seq.full

I'd much prefer a wrapper around fsstress than have to code this
into every test. Something like:

run_fstress()
{
	args=""

	while [ $# -gt 0 ]; do
		case "$1" in
		-n) args="$args $1 $(($2 * $TIME_FACTOR))"; shift ;;
		-p) args="$args $1 $(($2 * $LOAD_FACTOR))"; shift ;;
		*) args="$args $1" ;;
		esac

		shift
	done

	$FSSTRESS_PROG $args
}

And so all you need to do is something like:

$ sed -i 's/\$FSSTRESS_PROG/run_fsstress/' [0-9][0-9][0-9]

To convert all tests that use fsstress to do this.

You might also want to do this for the tests that run dirstress as
well, and create a "stress" group so that you can run just
the stress tests easily....

Cheers,

Dave.
-- 
Dave Chinner
david@...morbit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists