{"action":"created","issue":{"url":"https://api.github.com/repos/Test-More/test-more/issues/746","repository_url":"https://api.github.com/repos/Test-More/test-more","labels_url":"https://api.github.com/repos/Test-More/test-more/issues/746/labels{/name}","comments_url":"https://api.github.com/repos/Test-More/test-more/issues/746/comments","events_url":"https://api.github.com/repos/Test-More/test-more/issues/746/events","html_url":"https://github.com/Test-More/test-more/pull/746","id":198028271,"number":746,"title":"when a subtest forks, do not finish up in both processes","user":{"login":"rjbs","id":30682,"avatar_url":"https://avatars.githubusercontent.com/u/30682?v=3","gravatar_id":"","url":"https://api.github.com/users/rjbs","html_url":"https://github.com/rjbs","followers_url":"https://api.github.com/users/rjbs/followers","following_url":"https://api.github.com/users/rjbs/following{/other_user}","gists_url":"https://api.github.com/users/rjbs/gists{/gist_id}","starred_url":"https://api.github.com/users/rjbs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjbs/subscriptions","organizations_url":"https://api.github.com/users/rjbs/orgs","repos_url":"https://api.github.com/users/rjbs/repos","events_url":"https://api.github.com/users/rjbs/events{/privacy}","received_events_url":"https://api.github.com/users/rjbs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-29T15:57:31Z","updated_at":"2016-12-30T15:33:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Test-More/test-more/pulls/746","html_url":"https://github.com/Test-More/test-more/pull/746","diff_url":"https://github.com/Test-More/test-more/pull/746.diff","patch_url":"https://github.com/Test-More/test-more/pull/746.patch"},"body":"This patch follows a very brief and inconclusive [mailing list discussion on perl-qa](http://www.nntp.perl.org/group/perl.qa/2016/12/msg13723.html).\r\n\r\nGiven this sample program:\r\n\r\n```perl\r\n  use strict;\r\n  use warnings;\r\n  use Test::More;\r\n  use Test2::API;\r\n\r\n  Test2::API::run_subtest(\"forking subtest\" => sub {\r\n    if (fork) {\r\n      wait;\r\n      cmp_ok($?, '!=', 0, \"subprocess died\");\r\n    } else {\r\n      die \"123\";\r\n    };\r\n  });\r\n\r\n  done_testing;\r\n```\r\n\r\n...we'll see the \"forking subtest\" fail in both processes.  Also, the\r\nsubprocess will now exit 0, so the cmp_ok fails.  This is not the same\r\nbehavior as Test::Builder's subtests.  Test::Builder tracks whether the\r\nprocess has forked and, if it has, dies in the child and only finalizes\r\nthe subtest in the parent.  This patch brings that behavior to\r\nTest2::API::run_subtest.\r\n\r\nNote that Test::Builder also checks whether Test::Sync::IPC has been\r\nloaded before dying in the subtest.  I have not carried that condition\r\nforward, because I can't find that module anywhere."},"comment":{"url":"https://api.github.com/repos/Test-More/test-more/issues/comments/269784645","html_url":"https://github.com/Test-More/test-more/pull/746#issuecomment-269784645","issue_url":"https://api.github.com/repos/Test-More/test-more/issues/746","id":269784645,"user":{"login":"rjbs","id":30682,"avatar_url":"https://avatars.githubusercontent.com/u/30682?v=3","gravatar_id":"","url":"https://api.github.com/users/rjbs","html_url":"https://github.com/rjbs","followers_url":"https://api.github.com/users/rjbs/followers","following_url":"https://api.github.com/users/rjbs/following{/other_user}","gists_url":"https://api.github.com/users/rjbs/gists{/gist_id}","starred_url":"https://api.github.com/users/rjbs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjbs/subscriptions","organizations_url":"https://api.github.com/users/rjbs/orgs","repos_url":"https://api.github.com/users/rjbs/repos","events_url":"https://api.github.com/users/rjbs/events{/privacy}","received_events_url":"https://api.github.com/users/rjbs/received_events","type":"User","site_admin":false},"created_at":"2016-12-30T15:33:05Z","updated_at":"2016-12-30T15:33:05Z","body":"I've pushed a test to what I *think* is the right place.  (Your suggested directory didn't exist, but I guessed at a similar one.)  This test is very similar to the one I provided initially, but now it's a real test file.\r\n\r\nYou mentioned Test2-Harness breaking.  I'll have a look."}}
{"actor":{"display_login":"rjbs"}}