| OLD | NEW |
| 1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 CloseWritePipe(); | 210 CloseWritePipe(); |
| 211 EXPECT_DEATH(ReadPipeFD(), "fd"); | 211 EXPECT_DEATH(ReadPipeFD(), "fd"); |
| 212 EXPECT_DEATH(WritePipeFD(), "fd"); | 212 EXPECT_DEATH(WritePipeFD(), "fd"); |
| 213 break; | 213 break; |
| 214 } | 214 } |
| 215 } | 215 } |
| 216 | 216 |
| 217 // Multiprocess: | 217 // Multiprocess: |
| 218 | 218 |
| 219 virtual void MultiprocessParent() override { | 219 virtual void MultiprocessParent() override { |
| 220 VerifyInitial(); | 220 ASSERT_NO_FATAL_FAILURE(VerifyInitial()); |
| 221 if (testing::Test::HasFatalFailure()) { | |
| 222 return; | |
| 223 } | |
| 224 | 221 |
| 225 if (who_closes_ == kParentCloses) { | 222 if (who_closes_ == kParentCloses) { |
| 226 Close(); | 223 Close(); |
| 227 } else { | 224 } else { |
| 228 VerifyPartner(); | 225 VerifyPartner(); |
| 229 } | 226 } |
| 230 } | 227 } |
| 231 | 228 |
| 232 virtual void MultiprocessChild() override { | 229 virtual void MultiprocessChild() override { |
| 233 VerifyInitial(); | 230 ASSERT_NO_FATAL_FAILURE(VerifyInitial()); |
| 234 if (testing::Test::HasFatalFailure()) { | |
| 235 return; | |
| 236 } | |
| 237 | 231 |
| 238 if (who_closes_ == kChildCloses) { | 232 if (who_closes_ == kChildCloses) { |
| 239 Close(); | 233 Close(); |
| 240 } else { | 234 } else { |
| 241 VerifyPartner(); | 235 VerifyPartner(); |
| 242 } | 236 } |
| 243 } | 237 } |
| 244 | 238 |
| 245 WhoCloses who_closes_; | 239 WhoCloses who_closes_; |
| 246 WhatCloses what_closes_; | 240 WhatCloses what_closes_; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 TEST(MultiprocessDeathTest, ChildClosesReadAndWritePipe) { | 280 TEST(MultiprocessDeathTest, ChildClosesReadAndWritePipe) { |
| 287 TestMultiprocessClosePipe multiprocess( | 281 TestMultiprocessClosePipe multiprocess( |
| 288 TestMultiprocessClosePipe::kChildCloses, | 282 TestMultiprocessClosePipe::kChildCloses, |
| 289 TestMultiprocessClosePipe::kReadAndWriteClose); | 283 TestMultiprocessClosePipe::kReadAndWriteClose); |
| 290 multiprocess.Run(); | 284 multiprocess.Run(); |
| 291 } | 285 } |
| 292 | 286 |
| 293 } // namespace | 287 } // namespace |
| 294 } // namespace test | 288 } // namespace test |
| 295 } // namespace crashpad | 289 } // namespace crashpad |
| OLD | NEW |