From 4ae9a4fdfc825bcf881b28ee4286c05637b1d667 Mon Sep 17 00:00:00 2001 From: Tamer Tas Date: Mon, 17 Dec 2018 14:44:43 +0000 Subject: [PATCH] [test] reduce the noise in task logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See errors like: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Fuzzer/28117 The logs only shows the tail of the stderr, in order to get information, huge logs need to be downloaded. Instead of using the tail end of the stderr logs, we get the head of the stderr logs, which is the important part for us. R=machenbach@chromium.org CC=​​​​​yangguo@chromium.org,sergiyb@chromium.org gclient sync cd v8 tools/jsfunfuzz/fuzz-harness.sh out/x64.debug/d8 fuzz-results.tar.bz2 ``` Test: ``` Bug: v8:8493 Change-Id: Ia87c52f5b08ff9748cf2a81c9ca983d22fda650d Reviewed-on: https://chromium-review.googlesource.com/c/1378177 Commit-Queue: Tamer Tas Reviewed-by: Michael Achenbach Cr-Commit-Position: refs/heads/master@{#58302} --- tools/jsfunfuzz/fuzz-harness.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tools/jsfunfuzz/fuzz-harness.sh b/tools/jsfunfuzz/fuzz-harness.sh index 8d064b286e..fa4f9d9127 100755 --- a/tools/jsfunfuzz/fuzz-harness.sh +++ b/tools/jsfunfuzz/fuzz-harness.sh @@ -51,8 +51,17 @@ if [ "$3" == "--download" ]; then cat << EOF | patch -s -p0 -d "$v8_root" --- tools/jsfunfuzz/jsfunfuzz/multi_timed_run.py~ +++ tools/jsfunfuzz/jsfunfuzz/multi_timed_run.py -@@ -125,7 +125,7 @@ - +@@ -118,19 +118,19 @@ +-def showtail(logfilename): ++def showtail(logfilename, method="tail"): +- cmd = "tail -n 20 %s" % logfilename ++ cmd = "%s -n 20 %s" % (method, logfilename) + print cmd + print "" + os.system(cmd) + print "" + print "" + def many_timed_runs(): iteration = 0 - while True: @@ -60,6 +69,12 @@ if [ "$3" == "--download" ]; then iteration += 1 logfilename = "w%d" % iteration one_timed_run(logfilename) + if not succeeded(logfilename): + showtail(logfilename) +- showtail("err-" + logfilename) ++ showtail("err-" + logfilename, method="head") + + many_timed_runs() EOF fi