mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
win: crashpad_util_test ProcessInfo.Handles doesn't work with CONOUT$
In 2eeaa3ac549a, I added a check to make sure that the expected CONOUT$ handle was found. Its omission seemed to be unintentional. The tests passed for me on Windows 10, but failed on the bots. I can reproduce the failures locally on Windows 7. Doing the inheritance test with a file other than CONOUT$ fixes the immediate problem, but we should find out why this CONOUT$ handle isn't showing up in the handles list on Windows 7, fix it, and add back a test. R=scottmg@chromium.org Review URL: https://codereview.chromium.org/1428753009 .
This commit is contained in:
parent
827e045279
commit
82ffeaa0f0
@ -538,14 +538,16 @@ TEST(ProcessInfo, Handles) {
|
||||
ASSERT_TRUE(file.is_valid());
|
||||
|
||||
SECURITY_ATTRIBUTES security_attributes = {0};
|
||||
security_attributes.nLength = sizeof(security_attributes);
|
||||
security_attributes.bInheritHandle = true;
|
||||
ScopedFileHandle inherited_file(CreateFile(L"CONOUT$",
|
||||
GENERIC_WRITE,
|
||||
0,
|
||||
&security_attributes,
|
||||
OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
nullptr));
|
||||
ScopedFileHandle inherited_file(CreateFile(
|
||||
temp_dir.path().Append(FILE_PATH_LITERAL("inheritable")).value().c_str(),
|
||||
GENERIC_WRITE,
|
||||
0,
|
||||
&security_attributes,
|
||||
CREATE_NEW,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
nullptr));
|
||||
ASSERT_TRUE(inherited_file.is_valid());
|
||||
|
||||
HKEY key;
|
||||
|
Loading…
x
Reference in New Issue
Block a user