OLD | NEW |
1 // Copyright 2015 The Crashpad Authors. All rights reserved. | 1 // Copyright 2015 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 .value(); | 149 .value(); |
150 | 150 |
151 std::wstring args; | 151 std::wstring args; |
152 AppendCommandLineArgument(done_uuid.ToString16(), &args); | 152 AppendCommandLineArgument(done_uuid.ToString16(), &args); |
153 | 153 |
154 ChildLauncher child(child_test_executable, args); | 154 ChildLauncher child(child_test_executable, args); |
155 child.Start(); | 155 child.Start(); |
156 | 156 |
157 // The child sends us a code address we can look up in the memory map. | 157 // The child sends us a code address we can look up in the memory map. |
158 WinVMAddress code_address; | 158 WinVMAddress code_address; |
159 CheckedReadFile( | 159 CheckedReadFileExactly( |
160 child.stdout_read_handle(), &code_address, sizeof(code_address)); | 160 child.stdout_read_handle(), &code_address, sizeof(code_address)); |
161 | 161 |
162 ASSERT_TRUE(process_info.Initialize(child.process_handle())); | 162 ASSERT_TRUE(process_info.Initialize(child.process_handle())); |
163 | 163 |
164 // Tell the test it's OK to shut down now that we've read our data. | 164 // Tell the test it's OK to shut down now that we've read our data. |
165 EXPECT_TRUE(SetEvent(done.get())); | 165 EXPECT_TRUE(SetEvent(done.get())); |
166 | 166 |
167 std::vector<ProcessInfo::Module> modules; | 167 std::vector<ProcessInfo::Module> modules; |
168 EXPECT_TRUE(process_info.Modules(&modules)); | 168 EXPECT_TRUE(process_info.Modules(&modules)); |
169 ASSERT_GE(modules.size(), 3u); | 169 ASSERT_GE(modules.size(), 3u); |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 EXPECT_TRUE( | 641 EXPECT_TRUE( |
642 info.LoggingRangeIsFullyReadable(CheckedRange<WinVMAddress, WinVMSize>( | 642 info.LoggingRangeIsFullyReadable(CheckedRange<WinVMAddress, WinVMSize>( |
643 reinterpret_cast<WinVMAddress>(safe_memory.get()), kAllocationSize))); | 643 reinterpret_cast<WinVMAddress>(safe_memory.get()), kAllocationSize))); |
644 EXPECT_FALSE(info.LoggingRangeIsFullyReadable( | 644 EXPECT_FALSE(info.LoggingRangeIsFullyReadable( |
645 CheckedRange<WinVMAddress, WinVMSize>(0, 1024))); | 645 CheckedRange<WinVMAddress, WinVMSize>(0, 1024))); |
646 } | 646 } |
647 | 647 |
648 } // namespace | 648 } // namespace |
649 } // namespace test | 649 } // namespace test |
650 } // namespace crashpad | 650 } // namespace crashpad |
OLD | NEW |