Commit ec570b8a authored by Francis McCabe's avatar Francis McCabe Committed by Commit Bot

Revert "[log][d8] Only use d8.log.getAndStop on temporary log file"

This reverts commit 21bb43cc.

Reason for revert: See broken build: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20-%20builder/49882

Original change's description:
> [log][d8] Only use d8.log.getAndStop on temporary log file
> 
> We run tests in parallel which can cause multiple tests to write to
> the shared v8.log file. This obviously breaks the simple assertions in
> mjsunit/tools/log.js.
> 
> - Use temporary files for log testing with --logfile='+'
> 
> - Change the symbol from '&' to '+' for using temporary files for
>   logging with --logfile
> 
> - Enable skipped log tests again.
> 
> Bug: v8:10937, chromium:1129854, chromium:1130196
> Change-Id: I607dc9a9ecc352e58525cdd21c1c93efebf0f09f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2421826
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Victor Gomes <victorgomes@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#70071}

TBR=cbruni@chromium.org,verwaest@chromium.org,victorgomes@chromium.org

Change-Id: I5de61792c283139b2a898334e28e1f7b2d7c08f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10937
Bug: chromium:1129854
Bug: chromium:1130196
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2424625Reviewed-by: 's avatarFrancis McCabe <fgm@chromium.org>
Commit-Queue: Francis McCabe <fgm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70072}
parent 21bb43cc
......@@ -1511,8 +1511,8 @@ void Shell::LogGetAndStop(const v8::FunctionCallbackInfo<v8::Value>& args) {
HandleScope handle_scope(isolate);
std::string file_name = i_isolate->logger()->file_name();
if (!i::Log::IsLoggingToTemporaryFile(file_name)) {
Throw(isolate, "Only capturing from temporary files is supported.");
if (i::Log::IsLoggingToConsole(file_name)) {
Throw(isolate, "Logging to console instead of file.");
return;
}
if (!i_isolate->logger()->is_logging()) {
......
......@@ -1660,9 +1660,7 @@ DEFINE_BOOL(trace_wasm_gdb_remote, false, "trace Webassembly GDB-remote server")
#define FLAG FLAG_FULL
// log.cc
DEFINE_STRING(logfile, "v8.log",
"Specify the name of the log file, use '-' for console, '+' for "
"a temporary file.")
DEFINE_STRING(logfile, "v8.log", "Specify the name of the log file.")
DEFINE_BOOL(logfile_per_isolate, true, "Separate log files for each isolate.")
DEFINE_BOOL(log, false,
......
......@@ -19,7 +19,7 @@
namespace v8 {
namespace internal {
const char* const Log::kLogToTemporaryFile = "+";
const char* const Log::kLogToTemporaryFile = "&";
const char* const Log::kLogToConsole = "-";
// static
......
......@@ -182,6 +182,10 @@
# Needs to be adapted after changes to Function constructor. chromium:1065094
'cross-realm-filtering': [SKIP],
# https://crbug.com/v8/10937
# https://crbug.com/1129854
'tools/log': [SKIP],
}], # ALWAYS
##############################################################################
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --logfile='+' --log-all --log --no-stress-opt
// Flags: --log-all --log --no-stress-opt
function testFunctionWithFunnyName(o) {
return o.a;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment