New issue
Advanced search Search tips

Issue 752557 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Try using CreateAndOpenTemporaryFile() in TestLauncher::DoLaunchChildTestProcess

Project Member Reported by w...@chromium.org, Aug 4 2017

Issue description

DoLaunchChildTestProcess does some hand-rolled file creation to create a target for the sub-process stdio/stderr, based on CreateTemporaryFile(&name) - it should be possible to simplify it to use CreateAndOpenTemporaryFile(), and use the returned FILE->fileno[->HANDLE] directly.

It may be that e.g. the specific combination of flags required to CreateFile() in the Windows case make that infeasible - should be easy to evaluate.
 

Comment 1 by w...@chromium.org, Aug 14 2017

Status: Started (was: Available)
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3d6de8977023ff7c941b0779417c3bd0be508ec0

commit 3d6de8977023ff7c941b0779417c3bd0be508ec0
Author: Wez <wez@chromium.org>
Date: Mon Aug 21 17:56:31 2017

Use CreateAndOpenTemporaryFile for TestLauncher sub-process output.

CreateAndOpenTemporaryFile() both allocates a temporary-file name, and
opens the file, rather than having the launcher create the file, then
close and re-open it as we were doing previously.

Bug:  752557 
Change-Id: Idd1122ae1688df4742103691176039faf6d3f136
Reviewed-on: https://chromium-review.googlesource.com/611775
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495983}
[modify] https://crrev.com/3d6de8977023ff7c941b0779417c3bd0be508ec0/base/test/launcher/test_launcher.cc

Comment 3 by w...@chromium.org, Aug 22 2017

Status: Fixed (was: Started)

Sign in to add a comment