{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/openenclave/pulls/comments/231362412","pull_request_review_id":172318334,"id":231362412,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTM2MjQxMg==","diff_hunk":"@@ -245,6 +245,20 @@ OE_ECALL void LockAndUnlockMutexes(void* arg)\n     }\n }\n \n+// Keep the enclave busy until we get TCS exhaustion\n+OE_ECALL void TestTCSExhaustion(void* args_)\n+{\n+    TestTCSArgs* volatile args = (TestTCSArgs*)args_;\n+    static oe_spinlock_t _tcs_lock = OE_SPINLOCK_INITIALIZER;\n+\n+    // Increment the number of threads only on getting the _tcs_lock\n+    oe_spin_lock(&_tcs_lock);\n+    args->num_threads++;\n+    oe_spin_unlock(&_tcs_lock);\n+    while (args->num_threads + args->num_out_threads < args->tcs_count)","path":"tests/thread/oethread_enc/enc.cpp","position":null,"original_position":14,"commit_id":"3937e8096d201c6b96d0bd77ae96325d1b59c165","original_commit_id":"c3288b809c446a8f26e7dfbca181fe67eaa6ad92","user":{"login":"anitagov","id":16311437,"node_id":"MDQ6VXNlcjE2MzExNDM3","avatar_url":"https://avatars3.githubusercontent.com/u/16311437?v=4","gravatar_id":"","url":"https://api.github.com/users/anitagov","html_url":"https://github.com/anitagov","followers_url":"https://api.github.com/users/anitagov/followers","following_url":"https://api.github.com/users/anitagov/following{/other_user}","gists_url":"https://api.github.com/users/anitagov/gists{/gist_id}","starred_url":"https://api.github.com/users/anitagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anitagov/subscriptions","organizations_url":"https://api.github.com/users/anitagov/orgs","repos_url":"https://api.github.com/users/anitagov/repos","events_url":"https://api.github.com/users/anitagov/events{/privacy}","received_events_url":"https://api.github.com/users/anitagov/received_events","type":"User","site_admin":false},"body":"Changed the names of the variables to reflect the tcs bindings being used and requested. Also added comment to describe the logic of the loop. High level description is also in host.cpp before the routine.","created_at":"2018-11-07T02:21:11Z","updated_at":"2018-11-07T02:21:12Z","html_url":"https://github.com/Microsoft/openenclave/pull/1023#discussion_r231362412","pull_request_url":"https://api.github.com/repos/Microsoft/openenclave/pulls/1023","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/openenclave/pulls/comments/231362412"},"html":{"href":"https://github.com/Microsoft/openenclave/pull/1023#discussion_r231362412"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/openenclave/pulls/1023"}},"in_reply_to_id":231356803},"pull_request":{"url":"https://api.github.com/repos/Microsoft/openenclave/pulls/1023","id":228877148,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4ODc3MTQ4","html_url":"https://github.com/Microsoft/openenclave/pull/1023","diff_url":"https://github.com/Microsoft/openenclave/pull/1023.diff","patch_url":"https://github.com/Microsoft/openenclave/pull/1023.patch","issue_url":"https://api.github.com/repos/Microsoft/openenclave/issues/1023","number":1023,"state":"open","locked":false,"title":"Test to verify TCS exhaustion to address missing thread binding coverage ","user":{"login":"anitagov","id":16311437,"node_id":"MDQ6VXNlcjE2MzExNDM3","avatar_url":"https://avatars3.githubusercontent.com/u/16311437?v=4","gravatar_id":"","url":"https://api.github.com/users/anitagov","html_url":"https://github.com/anitagov","followers_url":"https://api.github.com/users/anitagov/followers","following_url":"https://api.github.com/users/anitagov/following{/other_user}","gists_url":"https://api.github.com/users/anitagov/gists{/gist_id}","starred_url":"https://api.github.com/users/anitagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anitagov/subscriptions","organizations_url":"https://api.github.com/users/anitagov/orgs","repos_url":"https://api.github.com/users/anitagov/repos","events_url":"https://api.github.com/users/anitagov/events{/privacy}","received_events_url":"https://api.github.com/users/anitagov/received_events","type":"User","site_admin":false},"body":"New thread binding test coverage to verify TCS exhaustion i.e. enter on N threads when there are M TCSes where N > M \r\noe_call should return OE_OUT_OF_THREADS when M enclaves are in use.\r\nTrick is to keep the M enclaves busy until we get TCS exhaustion and run out of all the threads.\r\nThis was mentioned in Issue #24 ","created_at":"2018-11-07T00:09:09Z","updated_at":"2018-11-07T02:21:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c5b2afee929174433d31c759714acdd1a2acaec0","assignee":null,"assignees":[],"requested_reviewers":[{"login":"mikbras","id":10839418,"node_id":"MDQ6VXNlcjEwODM5NDE4","avatar_url":"https://avatars2.githubusercontent.com/u/10839418?v=4","gravatar_id":"","url":"https://api.github.com/users/mikbras","html_url":"https://github.com/mikbras","followers_url":"https://api.github.com/users/mikbras/followers","following_url":"https://api.github.com/users/mikbras/following{/other_user}","gists_url":"https://api.github.com/users/mikbras/gists{/gist_id}","starred_url":"https://api.github.com/users/mikbras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikbras/subscriptions","organizations_url":"https://api.github.com/users/mikbras/orgs","repos_url":"https://api.github.com/users/mikbras/repos","events_url":"https://api.github.com/users/mikbras/events{/privacy}","received_events_url":"https://api.github.com/users/mikbras/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":835641969,"node_id":"MDU6TGFiZWw4MzU2NDE5Njk=","url":"https://api.github.com/repos/Microsoft/openenclave/labels/testing","name":"testing","color":"f7f760","default":false}],"milestone":{"url":"https://api.github.com/repos/Microsoft/openenclave/milestones/14","html_url":"https://github.com/Microsoft/openenclave/milestone/14","labels_url":"https://api.github.com/repos/Microsoft/openenclave/milestones/14/labels","id":3801532,"node_id":"MDk6TWlsZXN0b25lMzgwMTUzMg==","number":14,"title":"2018.11","description":"Monthly milestone for Nov 2018","creator":{"login":"CodeMonkeyLeet","id":31784195,"node_id":"MDQ6VXNlcjMxNzg0MTk1","avatar_url":"https://avatars3.githubusercontent.com/u/31784195?v=4","gravatar_id":"","url":"https://api.github.com/users/CodeMonkeyLeet","html_url":"https://github.com/CodeMonkeyLeet","followers_url":"https://api.github.com/users/CodeMonkeyLeet/followers","following_url":"https://api.github.com/users/CodeMonkeyLeet/following{/other_user}","gists_url":"https://api.github.com/users/CodeMonkeyLeet/gists{/gist_id}","starred_url":"https://api.github.com/users/CodeMonkeyLeet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodeMonkeyLeet/subscriptions","organizations_url":"https://api.github.com/users/CodeMonkeyLeet/orgs","repos_url":"https://api.github.com/users/CodeMonkeyLeet/repos","events_url":"https://api.github.com/users/CodeMonkeyLeet/events{/privacy}","received_events_url":"https://api.github.com/users/CodeMonkeyLeet/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":3,"state":"open","created_at":"2018-11-06T20:59:07Z","updated_at":"2018-11-07T00:44:09Z","due_on":"2018-11-30T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/Microsoft/openenclave/pulls/1023/commits","review_comments_url":"https://api.github.com/repos/Microsoft/openenclave/pulls/1023/comments","review_comment_url":"https://api.github.com/repos/Microsoft/openenclave/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/openenclave/issues/1023/comments","statuses_url":"https://api.github.com/repos/Microsoft/openenclave/statuses/3937e8096d201c6b96d0bd77ae96325d1b59c165","head":{"label":"Microsoft:anitagov.thread.coverage","ref":"anitagov.thread.coverage","sha":"3937e8096d201c6b96d0bd77ae96325d1b59c165","user":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":101804230,"node_id":"MDEwOlJlcG9zaXRvcnkxMDE4MDQyMzA=","name":"openenclave","full_name":"Microsoft/openenclave","private":false,"owner":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Microsoft/openenclave","description":"SDK for developing enclaves","fork":false,"url":"https://api.github.com/repos/Microsoft/openenclave","forks_url":"https://api.github.com/repos/Microsoft/openenclave/forks","keys_url":"https://api.github.com/repos/Microsoft/openenclave/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/openenclave/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/openenclave/teams","hooks_url":"https://api.github.com/repos/Microsoft/openenclave/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/openenclave/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/openenclave/events","assignees_url":"https://api.github.com/repos/Microsoft/openenclave/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/openenclave/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/openenclave/tags","blobs_url":"https://api.github.com/repos/Microsoft/openenclave/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/openenclave/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/openenclave/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/openenclave/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/openenclave/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/openenclave/languages","stargazers_url":"https://api.github.com/repos/Microsoft/openenclave/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/openenclave/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/openenclave/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/openenclave/subscription","commits_url":"https://api.github.com/repos/Microsoft/openenclave/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/openenclave/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/openenclave/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/openenclave/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/openenclave/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/openenclave/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/openenclave/merges","archive_url":"https://api.github.com/repos/Microsoft/openenclave/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/openenclave/downloads","issues_url":"https://api.github.com/repos/Microsoft/openenclave/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/openenclave/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/openenclave/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/openenclave/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/openenclave/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/openenclave/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/openenclave/deployments","created_at":"2017-08-29T20:31:38Z","updated_at":"2018-11-06T18:21:11Z","pushed_at":"2018-11-07T02:20:02Z","git_url":"git://github.com/Microsoft/openenclave.git","ssh_url":"git@github.com:Microsoft/openenclave.git","clone_url":"https://github.com/Microsoft/openenclave.git","svn_url":"https://github.com/Microsoft/openenclave","homepage":null,"size":34140,"stargazers_count":61,"watchers_count":61,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":18,"mirror_url":null,"archived":false,"open_issues_count":135,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":18,"open_issues":135,"watchers":61,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"65b5bf0d9e4903c2f2014ebf0e1979601e130610","user":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":101804230,"node_id":"MDEwOlJlcG9zaXRvcnkxMDE4MDQyMzA=","name":"openenclave","full_name":"Microsoft/openenclave","private":false,"owner":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Microsoft/openenclave","description":"SDK for developing enclaves","fork":false,"url":"https://api.github.com/repos/Microsoft/openenclave","forks_url":"https://api.github.com/repos/Microsoft/openenclave/forks","keys_url":"https://api.github.com/repos/Microsoft/openenclave/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/openenclave/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/openenclave/teams","hooks_url":"https://api.github.com/repos/Microsoft/openenclave/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/openenclave/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/openenclave/events","assignees_url":"https://api.github.com/repos/Microsoft/openenclave/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/openenclave/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/openenclave/tags","blobs_url":"https://api.github.com/repos/Microsoft/openenclave/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/openenclave/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/openenclave/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/openenclave/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/openenclave/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/openenclave/languages","stargazers_url":"https://api.github.com/repos/Microsoft/openenclave/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/openenclave/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/openenclave/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/openenclave/subscription","commits_url":"https://api.github.com/repos/Microsoft/openenclave/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/openenclave/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/openenclave/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/openenclave/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/openenclave/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/openenclave/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/openenclave/merges","archive_url":"https://api.github.com/repos/Microsoft/openenclave/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/openenclave/downloads","issues_url":"https://api.github.com/repos/Microsoft/openenclave/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/openenclave/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/openenclave/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/openenclave/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/openenclave/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/openenclave/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/openenclave/deployments","created_at":"2017-08-29T20:31:38Z","updated_at":"2018-11-06T18:21:11Z","pushed_at":"2018-11-07T02:20:02Z","git_url":"git://github.com/Microsoft/openenclave.git","ssh_url":"git@github.com:Microsoft/openenclave.git","clone_url":"https://github.com/Microsoft/openenclave.git","svn_url":"https://github.com/Microsoft/openenclave","homepage":null,"size":34140,"stargazers_count":61,"watchers_count":61,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":18,"mirror_url":null,"archived":false,"open_issues_count":135,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":18,"open_issues":135,"watchers":61,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/openenclave/pulls/1023"},"html":{"href":"https://github.com/Microsoft/openenclave/pull/1023"},"issue":{"href":"https://api.github.com/repos/Microsoft/openenclave/issues/1023"},"comments":{"href":"https://api.github.com/repos/Microsoft/openenclave/issues/1023/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/openenclave/pulls/1023/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/openenclave/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/openenclave/pulls/1023/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/openenclave/statuses/3937e8096d201c6b96d0bd77ae96325d1b59c165"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"anitagov"}}