Skip to content

Commit b380b10

Browse files
committed
torture: Make torture.sh print the number of files to be compressed
Compressing gigabyte vmlinux files can take some time, and it can be a bit annoying to not know many more batches of compression there will be. This commit therefore makes torture.sh print the number of files to be compressed just before starting compression and just after compression completes. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 11e46f0 commit b380b10

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,12 @@ then
434434
batchno=1
435435
if test -s $T/xz-todo
436436
then
437-
echo Size before compressing: `du -sh $tdir | awk '{ print $1 }'` `date` 2>&1 | tee -a "$tdir/log-xz" | tee -a $T/log
437+
for i in `cat $T/xz-todo`
438+
do
439+
find $i -name 'vmlinux*' -print
440+
done | wc -l | awk '{ print $1 }' > $T/xz-todo-count
441+
n2compress="`cat $T/xz-todo-count`"
442+
echo Size before compressing $n2compress files: `du -sh $tdir | awk '{ print $1 }'` `date` 2>&1 | tee -a "$tdir/log-xz" | tee -a $T/log
438443
for i in `cat $T/xz-todo`
439444
do
440445
echo Compressing vmlinux files in ${i}: `date` >> "$tdir/log-xz" 2>&1
@@ -456,7 +461,7 @@ then
456461
echo Waiting for final batch $batchno of $ncompresses compressions `date` | tee -a "$tdir/log-xz" | tee -a $T/log
457462
fi
458463
wait
459-
echo Size after compressing: `du -sh $tdir | awk '{ print $1 }'` `date` 2>&1 | tee -a "$tdir/log-xz" | tee -a $T/log
464+
echo Size after compressing $n2compress files: `du -sh $tdir | awk '{ print $1 }'` `date` 2>&1 | tee -a "$tdir/log-xz" | tee -a $T/log
460465
echo Total duration `get_starttime_duration $starttime`. | tee -a $T/log
461466
else
462467
echo No compression needed: `date` >> "$tdir/log-xz" 2>&1

0 commit comments

Comments
 (0)