1 #!/bin/bash 1 #!/bin/bash 2 # SPDX-License-Identifier: GPL-2.0+ 2 # SPDX-License-Identifier: GPL-2.0+ 3 # 3 # 4 # Analyze a given results directory for rcutor 4 # Analyze a given results directory for rcutorture progress. 5 # 5 # 6 # Usage: kvm-recheck-rcu.sh resdir 6 # Usage: kvm-recheck-rcu.sh resdir 7 # 7 # 8 # Copyright (C) Facebook, 2020 8 # Copyright (C) Facebook, 2020 9 # 9 # 10 # Authors: Paul E. McKenney <paulmck@kernel.org 10 # Authors: Paul E. McKenney <paulmck@kernel.org> 11 11 12 i="$1" 12 i="$1" 13 if test -d "$i" -a -r "$i" 13 if test -d "$i" -a -r "$i" 14 then 14 then 15 : 15 : 16 else 16 else 17 echo Unreadable results directory: $i 17 echo Unreadable results directory: $i 18 exit 1 18 exit 1 19 fi 19 fi 20 . functions.sh 20 . functions.sh 21 21 22 configfile=`echo $i | sed -e 's/^.*\///'` 22 configfile=`echo $i | sed -e 's/^.*\///'` 23 nscfs="`grep 'scf_invoked_count ver:' $i/conso 23 nscfs="`grep 'scf_invoked_count ver:' $i/console.log 2> /dev/null | tail -1 | sed -e 's/^.* scf_invoked_count ver: //' -e 's/ .*$//' | tr -d '\015'`" 24 if test -z "$nscfs" 24 if test -z "$nscfs" 25 then 25 then 26 echo "$configfile ------- " 26 echo "$configfile ------- " 27 else 27 else 28 dur="`grep -v '^#' $i/qemu-cmd | sed - 28 dur="`grep -v '^#' $i/qemu-cmd | sed -e 's/^.* scftorture.shutdown_secs=//' -e 's/ .*$//' 2> /dev/null`" 29 if test -z "$dur" 29 if test -z "$dur" 30 then 30 then 31 rate="" 31 rate="" 32 else 32 else 33 nscfss=`awk -v nscfs=$nscfs -v 33 nscfss=`awk -v nscfs=$nscfs -v dur=$dur ' 34 BEGIN { print nscfs / 34 BEGIN { print nscfs / dur }' < /dev/null` 35 rate=" ($nscfss/s)" 35 rate=" ($nscfss/s)" 36 fi 36 fi 37 echo "${configfile} ------- ${nscfs} S 37 echo "${configfile} ------- ${nscfs} SCF handler invocations$rate" 38 fi 38 fi
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.