]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
torture: Suppress "find" diagnostics from torture.sh --do-none run
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 15 May 2025 23:12:00 +0000 (16:12 -0700)
committerNeeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
Wed, 16 Jul 2025 04:14:04 +0000 (09:44 +0530)
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 <paulmck@kernel.org>
Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
tools/testing/selftests/rcutorture/bin/torture.sh

index 420c551b824bf4e774ce344d481e0422edd14fd5..ed59bd43d4f889a689cf6a9868f0500d364550e2 100755 (executable)
@@ -719,8 +719,11 @@ fi
 echo Started at $startdate, ended at `date`, duration `get_starttime_duration $starttime`. | tee -a $T/log
 echo Summary: Successes: $nsuccesses Failures: $nfailures. | tee -a $T/log
 tdir="`cat $T/successes $T/failures | head -1 | awk '{ print $NF }' | sed -e 's,/[^/]\+/*$,,'`"
-find "$tdir" -name 'ConfigFragment.diags' -print > $T/configerrors
-find "$tdir" -name 'Make.out.diags' -print > $T/builderrors
+if test -n "$tdir"
+then
+       find "$tdir" -name 'ConfigFragment.diags' -print > $T/configerrors
+       find "$tdir" -name 'Make.out.diags' -print > $T/builderrors
+fi
 if test -s "$T/configerrors"
 then
        echo "  Scenarios with .config errors: `wc -l "$T/configerrors" | awk '{ print $1 }'`"