Re: [PATCH -perfbook 1/2] CodeSamples/formal/rcutorture.sh: Don't bother with stable tags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Sep 28, 2024 at 08:31:55AM +0900, Akira Yokosawa wrote:
> When run under a kernel repository which has a stable repository in
> remote, data for stable tags such as v6.6.1, v6.6.2, v6.6.3, etc. are
> collected as well as those for mainline releases.
> 
> Refactor the grep pattern so that only v2.6.m and v3.n, v4.n, and
> later are listed in $tags.
> Use the nice -V option of sort instead of hard-to-parse -k options.
> 
> Factor out starting point version to SINCE, which can be overridden
> by setting it as an env or shell variable.
> 
> This should continue to work with v10.0 and beyond as long as
> mainline sticks with current scheme of release numbering.
> 
> Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>

Queued and pushed, thank you!

							Thanx, Paul

> ---
>  CodeSamples/formal/rcutorture.sh | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/CodeSamples/formal/rcutorture.sh b/CodeSamples/formal/rcutorture.sh
> index 23686805..5e568e24 100644
> --- a/CodeSamples/formal/rcutorture.sh
> +++ b/CodeSamples/formal/rcutorture.sh
> @@ -20,10 +20,18 @@
>  #
>  # Copyright (c) 2019 Paul E. McKenney, Facebook.
>  
> -tags="`git tag -l | grep '^v' | grep -v -e - | grep -v '\..*\..*\.' | grep -v '2.6.11' | sort -k1.2,1.2n -k1.4n`"
> +# Override by saying, e.g.:
> +#     "SINCE=v6 sh <path of this script>"
> +: ${SINCE:=v2.6.12}
> +
> +tags="`git tag -l | grep -E -e '^v(2\.6|[3-9]|[1-9][0-9]+)\.[0-9]+$' | sort -V`"
>  
>  for t in $tags
>  do
> +	tagsince=`echo "$SINCE\n$t" | sort -V | head -n 1`
> +	if [ $tagsince != $SINCE ] ; then
> +		continue
> +	fi
>  	git reset --hard $t > /dev/null 2>&1
>  	nontorture="`ls kernel/*rcu*.* kernel/rcu/* include/linux/*rcu* 2> /dev/null | grep -v torture | grep -v rcuperf | grep -v refperf | grep -v rcuscale | grep -v refscale | grep -v Makefile | grep -v Kconfig`"
>  	ntn="`wc -l $nontorture 2> /dev/null | tail -1 | awk '{ print $1 }'`"
> 
> base-commit: 2eb3375d38e20694912f3f5fdbb744a7079c62e6
> -- 
> 2.34.1
> 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux