Lines Matching +full:stdout +full:- +full:path

2 # SPDX-License-Identifier: GPL-2.0+
6 # Usage: kvm-remote.sh "systems" [ <kvm.sh args> ]
7 # kvm-remote.sh "systems" /path/to/old/run [ <kvm-again.sh args> ]
16 if ! test -d tools/testing/selftests/rcutorture/bin
18 echo $scriptname must be run from top-level directory of kernel source tree.
23 PATH=${RCUTORTURE}/bin:$PATH; export PATH
29 if test -z "$systems"
37 # T: /tmp/kvm-remote.sh.NNNNNN where "NNNNNN" is set by mktemp
38 # resdir: /tmp/kvm-remote.sh.NNNNNN/res
39 # rundir: /tmp/kvm-remote.sh.NNNNNN/res/$ds ("-remote" suffix)
43 # TD: kvm-remote.sh.NNNNNN
44 # ds: yyyy.mm.dd-hh.mm.ss-remote
46 T="`mktemp -d ${TMPDIR-/tmp}/kvm-remote.sh.XXXXXX`"
47 trap 'rm -rf $T' 0
51 ds=`date +%Y.%m.%d-%H.%M.%S`-remote
55 if echo $1 | grep -q '^--'
58 datestamp="`echo "$@" | awk -v ds="$ds" '{
60 if ($i == "--datestamp") {
66 print "--datestamp " ds;
68 kvm.sh --remote "$@" $datestamp --buildonly > $T/kvm.sh.out 2>&1
70 if test "$ret" -ne 0
76 oldrun="`grep -m 1 "^Results directory: " $T/kvm.sh.out | awk '{ print $3 }'`"
77 touch "$oldrun/remote-log"
78 echo $scriptname $args >> "$oldrun/remote-log"
79 echo | tee -a "$oldrun/remote-log"
80 echo " ----" kvm.sh output: "(`date`)" | tee -a "$oldrun/remote-log"
81 cat $T/kvm.sh.out | tee -a "$oldrun/remote-log"
83 rm -f "$oldrun"/*/buildonly
84 kvm-again.sh $oldrun --dryrun --remote --rundir "$rundir" > $T/kvm-again.sh.out 2>&1
86 if test "$ret" -ne 0
88 echo $scriptname: kvm-again.sh failed exit code $? | tee -a "$oldrun/remote-log"
89 cat $T/kvm-again.sh.out | tee -a "$oldrun/remote-log"
93 # Re-use old run.
95 if ! echo $oldrun | grep -q '^/'
100 touch "$oldrun/remote-log"
101 echo $scriptname $args >> "$oldrun/remote-log"
102 kvm-again.sh "$oldrun" "$@" --dryrun --remote --rundir "$rundir" > $T/kvm-again.sh.out 2>&1
104 if test "$ret" -ne 0
106 echo $scriptname: kvm-again.sh failed exit code $? | tee -a "$oldrun/remote-log"
107 cat $T/kvm-again.sh.out | tee -a "$oldrun/remote-log"
110 cp -a "$rundir" "$RCUTORTURE/res/"
113 echo | tee -a "$oldrun/remote-log"
114 echo " ----" kvm-again.sh output: "(`date`)" | tee -a "$oldrun/remote-log"
115 cat $T/kvm-again.sh.out
116 echo | tee -a "$oldrun/remote-log"
117 echo Remote run directory: $rundir | tee -a "$oldrun/remote-log"
118 echo Local build-side run directory: $oldrun | tee -a "$oldrun/remote-log"
120 # Create the kvm-remote-N.sh scripts in the bin directory.
121 awk < "$rundir"/scenarios -v dest="$T/bin" -v rundir="$rundir" '
125 fn = dest "/kvm-remote-" n ".sh"
126 print "kvm-remote-noreap.sh " rundir " &" > fn;
130 print "kvm-test-1-run-batch.sh" scenarios >> fn;
134 chmod +x $T/bin/kvm-remote-*.sh
135 ( cd "`dirname $T`"; tar -chzf $T/binres.tgz "$TD/bin" "$TD/res" )
137 # Check first to avoid the need for cleanup for system-name typos
140 ssh -o BatchMode=yes $i getconf _NPROCESSORS_ONLN > $T/ssh.stdout 2> $T/ssh.stderr
142 if test "$ret" -ne 0
144 echo "System $i unreachable ($ret), giving up." | tee -a "$oldrun/remote-log"
145 echo ' --- ssh stdout: vvv' | tee -a "$oldrun/remote-log"
146 cat $T/ssh.stdout | tee -a "$oldrun/remote-log"
147 echo ' --- ssh stdout: ^^^' | tee -a "$oldrun/remote-log"
148 echo ' --- ssh stderr: vvv' | tee -a "$oldrun/remote-log"
149 cat $T/ssh.stderr | tee -a "$oldrun/remote-log"
150 echo ' --- ssh stderr: ^^^' | tee -a "$oldrun/remote-log"
153 echo $i: `cat $T/ssh.stdout` CPUs " " `date` | tee -a "$oldrun/remote-log"
157 echo Build-products tarball: `du -h $T/binres.tgz` | tee -a "$oldrun/remote-log"
160 echo Downloading tarball to $i `date` | tee -a "$oldrun/remote-log"
161 cat $T/binres.tgz | ssh -o BatchMode=yes $i "cd /tmp; tar -xzf -"
164 while test "$ret" -ne 0
166 …s.tgz to system $i, waiting and then retrying. $tries prior retries. | tee -a "$oldrun/remote-log"
168 cat $T/binres.tgz | ssh -o BatchMode=yes $i "cd /tmp; tar -xzf -"
170 if test "$ret" -ne 0
174 echo Unable to download $T/binres.tgz to system $i, giving up. | tee -a "$oldrun/remote-log"
194 ssh -o BatchMode=yes $1 "test -f \"$2\""
196 if test "$ret" -eq 255
198 …echo " ---" ssh failure to $1 checking for file $2, retry after $sleeptime seconds. `date` | tee -
204 elif test "$ret" -eq 0
207 elif test "$ret" -eq 1
209 echo " ---" File \"$2\" not found: ssh $1 test -f \"$2\" | tee -a "$oldrun/remote-log"
212 …echo " ---" Exit code $ret: ssh $1 test -f \"$2\", retry after $sleeptime seconds. `date` | tee -a…
233 if test "$curbatch" -gt "$nbatches"
242 …ssh -o BatchMode=yes "$i" "cd \"$resdir/$ds\"; touch remote.run; PATH=\"$T/bin:$PATH\" nohup kvm-r…
244 if test "$ret" -ne 0
249 echo " ----" System $i Batch `head -n $curbatch < "$rundir"/scenarios | tail -1` `date` 1>&2
256 nbatches="`wc -l "$rundir"/scenarios | awk '{ print $1 }'`"
258 while test "$curbatch" -le "$nbatches"
262 if test -s "$T/startbatches.stderr"
264 cat "$T/startbatches.stderr" | tee -a "$oldrun/remote-log"
266 if test "$curbatch" -le "$nbatches"
271 echo All batches started. `date` | tee -a "$oldrun/remote-log"
276 echo " ---" Waiting for $i `date` | tee -a "$oldrun/remote-log"
281 if test "$ret" -eq 1
283 echo " ---" Collecting results from $i `date` | tee -a "$oldrun/remote-log"
284-o BatchMode=yes $i "cd $rundir; tar -czf - kvm-remote-*.sh.out */console.log */kvm-test-1-run*.sh…
287 if test "$ret" -eq 255
289 echo System $i persistent ssh failure, lost results `date` | tee -a "$oldrun/remote-log"
296 ( kvm-end-run-stats.sh "$oldrun" "$starttime"; echo $? > $T/exitcode ) | tee -a "$oldrun/remote-log"