Commit 4c89d167 authored by Sergey Ulanov's avatar Sergey Ulanov Committed by Commit Bot

[Fuchsia] Enable ProcessUtilTests tests.

Enabled the following tests:
 ProcessUtilTest.CloneAlternateDir
 ProcessUtilTest.KillSlowChild
 ProcessUtilTest.SelectivelyClonedDir

The problem that broke these tests was fixed in crrev.com/556610 .

Also removed ProcessUtilTest.LaunchNamespaceMap because it overlaps
with the tests enabled in this CL.

Bug: 826018
Change-Id: I211edb31ff6482e16ebad0967a5749e1dc353327
Reviewed-on: https://chromium-review.googlesource.com/1048880
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: default avatarWez <wez@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556951}
parent fe8dfb39
......@@ -86,7 +86,7 @@ const char kTestHelper[] = "test_child_process";
const char kSignalFileTerm[] = "TerminatedChildProcess.die";
#if defined(OS_FUCHSIA)
const char kSignalFileClone[] = "/tmp/ClonedTmpDir.die";
const char kSignalFileClone[] = "ClonedTmpDir.die";
#endif
#endif // defined(OS_POSIX)
......@@ -158,13 +158,13 @@ class ProcessUtilTest : public MultiProcessTest {
};
std::string ProcessUtilTest::GetSignalFilePath(const char* filename) {
#if !defined(OS_ANDROID)
return filename;
#else
#if defined(OS_ANDROID) || defined(OS_FUCHSIA)
FilePath tmp_dir;
PathService::Get(DIR_CACHE, &tmp_dir);
PathService::Get(DIR_TEMP, &tmp_dir);
tmp_dir = tmp_dir.Append(filename);
return tmp_dir.value();
#else
return filename;
#endif
}
......@@ -932,30 +932,6 @@ TEST_F(ProcessUtilTest, LaunchWithHandleTransfer) {
EXPECT_EQ(0, exit_code);
}
MULTIPROCESS_TEST_MAIN(ProcessUtilsVerifyNamespace) {
CHECK(PathExists(FilePath("/data")));
CHECK(!PathExists(FilePath("/svc")));
return 0;
}
TEST_F(ProcessUtilTest, LaunchNamespaceMap) {
LaunchOptions options;
options.clone_flags &= ~LP_CLONE_FDIO_NAMESPACE;
options.paths_to_map.push_back("/data");
// gtest uses /tmp to pass flags to the launched process, so it needs to be
// mapped as well.
options.paths_to_map.push_back("/tmp");
Process process =
SpawnChildWithOptions("ProcessUtilsVerifyNamespace", options);
ASSERT_TRUE(process.IsValid());
int exit_code;
ASSERT_TRUE(process.WaitForExitWithTimeout(TestTimeouts::action_timeout(),
&exit_code));
EXPECT_EQ(0, exit_code);
}
#endif // defined(OS_FUCHSIA)
namespace {
......
......@@ -26,12 +26,6 @@
-SysInfoTest.AmountOfMem
-SysInfoTest.AmountOfTotalDiskSpace
# These tests are affected by an issue with cloning namespace entries from
# inside a package. See https://crbug.com/826018
-ProcessUtilTest.CloneAlternateDir
-ProcessUtilTest.KillSlowChild
-ProcessUtilTest.SelectivelyClonedDir
# These tests all rely on being able to set the exit code of an externally
# terminated process, which mx_task_kill() does not support.
# https://crbug.com/753490.
......
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