Revert "[vm] Fix some Fuchsia tests"

This reverts commit 3ec7ea15ec.

Reason for revert: Causes timeouts in some Flutter Fuchsia tests

Original change's description:
> [vm] Fix some Fuchsia tests
> 
> Change-Id: I2a6bedeee059bd461cbc00cc5d13df2bdf3154a9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156702
> Commit-Queue: Liam Appelbe <liama@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=rmacnak@google.com,asiva@google.com,liama@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I156eee7eb424fcfbc5bbf1b4a11d3d9eeab920a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157441
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
This commit is contained in:
Liam Appelbe 2020-08-05 23:46:56 +00:00 committed by commit-bot@chromium.org
parent fcd88b5b6d
commit 17faf89d02
7 changed files with 21 additions and 34 deletions

View file

@ -165,27 +165,20 @@ if (is_fuchsia) {
resource_files = [
".packages",
"pkg/testing/test/hello_test.dart",
"tools/addlatexhash.dart",
]
resource_dirs = [
"tests/standalone_2",
"tests/standalone",
"tests/language_2",
"pkg/async_helper",
"pkg/expect",
"pkg/meta",
"pkg/native_stack_traces",
"pkg/smith",
"third_party/pkg/args",
"third_party/pkg/async",
"third_party/pkg/charcode",
"third_party/pkg/collection",
"third_party/pkg/convert",
"third_party/pkg/crypto",
"third_party/pkg/http",
"third_party/pkg/http_parser",
"third_party/pkg/path",
"third_party/pkg/pool",
"third_party/pkg/stack_trace",
"third_party/pkg/typed_data",
]
resources = []

View file

@ -8,8 +8,7 @@
"deprecated-ambient-replace-as-executable",
"root-ssl-certificates",
"isolated-cache-storage",
"isolated-persistent-storage",
"isolated-temp"
"isolated-persistent-storage"
],
"services": [
"fuchsia.deprecatedtimezone.Timezone",

View file

@ -28,10 +28,11 @@ class FuchsiaEmulator {
Process _server;
String _deviceName;
static Future<void> publishPackage(String buildDir, String mode) async {
static Future<void> publishPackage(
int emuCpus, String buildDir, String mode) async {
if (_inst == null) {
_inst = FuchsiaEmulator();
await _inst._start();
await _inst._start(emuCpus);
}
await _inst._publishPackage(buildDir, mode);
}
@ -47,11 +48,18 @@ class FuchsiaEmulator {
arg.replaceAll(Repository.uri.toFilePath(), '/pkg/data/')));
}
Future<void> _start() async {
Future<void> _start(int emuCpus) async {
// Start the emulator.
DebugLogger.info('Starting Fuchsia emulator');
_emu = await Process.start(
'xvfb-run', [femuTool, '--image', 'qemu-x64', '-N', '--headless']);
DebugLogger.info('Starting Fuchsia emulator with $emuCpus CPUs');
_emu = await Process.start('xvfb-run', [
femuTool,
'--image',
'qemu-x64',
'-N',
'--headless',
'-s',
'$emuCpus'
]);
// Wait until the emulator is ready and has a valid device name.
var deviceNameFuture = Completer<String>();

View file

@ -155,7 +155,7 @@ Future testConfigurations(List<TestConfiguration> configurations) async {
}
if (configuration.system == System.fuchsia) {
await FuchsiaEmulator.publishPackage(
await FuchsiaEmulator.publishPackage(configuration.taskCount,
configuration.buildDirectory, configuration.mode.name);
}
}

View file

@ -398,7 +398,7 @@ void EventHandlerImplementation::UpdatePort(intptr_t old_mask,
RemoveFromPort(port_handle_, di);
} else if ((old_mask == 0) && (new_mask != 0)) {
AddToPort(port_handle_, di);
} else if ((old_mask != 0) && (new_mask != 0) && (old_mask != new_mask)) {
} else if ((old_mask != 0) && (new_mask != 0)) {
ASSERT(!di->IsListeningSocket());
RemoveFromPort(port_handle_, di);
AddToPort(port_handle_, di);

View file

@ -9,7 +9,6 @@
#include <errno.h> // NOLINT
#include <fcntl.h> // NOLINT
#include <lib/fdio/fdio.h> // NOLINT
#include <lib/fdio/namespace.h> // NOLINT
#include <libgen.h> // NOLINT
#include <sys/mman.h> // NOLINT
@ -52,10 +51,8 @@ File::~File() {
void File::Close() {
ASSERT(handle_->fd() >= 0);
if (handle_->fd() == STDOUT_FILENO) {
// If stdout, redirect fd to Fuchsia's equivalent of /dev/null.
auto* null_fdio = fdio_null_create();
ASSERT(null_fdio != nullptr);
int null_fd = NO_RETRY_EXPECTED(fdio_bind_to_fd(null_fdio, -1, 0));
// If stdout, redirect fd to /dev/null.
int null_fd = NO_RETRY_EXPECTED(open("/dev/null", O_WRONLY));
ASSERT(null_fd >= 0);
VOID_NO_RETRY_EXPECTED(dup2(null_fd, handle_->fd()));
VOID_NO_RETRY_EXPECTED(close(null_fd));

View file

@ -98,13 +98,3 @@ io/many_directory_operations_test: SkipSlow
io/many_file_operations_test: SkipSlow
package/*: SkipByDesign # Launches VMs in interesting ways.
typed_data_isolate_test: SkipSlow
[ $system == fuchsia ]
# Fuchsia test runner doesn't support multi-tests yet.
deny_listed_test: Skip
io/dart_std_io_pipe_test: Skip
io/platform_resolved_executable_test: Skip
io/signals_exception_test: Skip
io/socket_ipv6_test: Skip
package/invalid_uri_test: Skip
regress_29350_test: Skip