Skip to content

Commit ce243b7

Browse files
paulmckrcuNeeraj Upadhyay (AMD)
authored andcommitted
torture: Suppress "find" diagnostics from torture.sh --do-none run
When torture.sh is told to do nothing, it produces a couple of distracting diagnostics from the "find" command: find: ‘’: No such file or directory find: ‘’: No such file or directory This is pointless chatter and could cause confusion. This commit therefore suppresses these diagnostics when there is nothing to find. Signed-off-by: Paul E. McKenney <[email protected]> Signed-off-by: Neeraj Upadhyay (AMD) <[email protected]>
1 parent a883f27 commit ce243b7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tools/testing/selftests/rcutorture/bin/torture.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,8 +719,11 @@ fi
719719
echo Started at $startdate, ended at `date`, duration `get_starttime_duration $starttime`. | tee -a $T/log
720720
echo Summary: Successes: $nsuccesses Failures: $nfailures. | tee -a $T/log
721721
tdir="`cat $T/successes $T/failures | head -1 | awk '{ print $NF }' | sed -e 's,/[^/]\+/*$,,'`"
722-
find "$tdir" -name 'ConfigFragment.diags' -print > $T/configerrors
723-
find "$tdir" -name 'Make.out.diags' -print > $T/builderrors
722+
if test -n "$tdir"
723+
then
724+
find "$tdir" -name 'ConfigFragment.diags' -print > $T/configerrors
725+
find "$tdir" -name 'Make.out.diags' -print > $T/builderrors
726+
fi
724727
if test -s "$T/configerrors"
725728
then
726729
echo " Scenarios with .config errors: `wc -l "$T/configerrors" | awk '{ print $1 }'`"

0 commit comments

Comments
 (0)