{"action":"created","issue":{"url":"https://api.github.com/repos/Bareflank/hypervisor/issues/209","repository_url":"https://api.github.com/repos/Bareflank/hypervisor","labels_url":"https://api.github.com/repos/Bareflank/hypervisor/issues/209/labels{/name}","comments_url":"https://api.github.com/repos/Bareflank/hypervisor/issues/209/comments","events_url":"https://api.github.com/repos/Bareflank/hypervisor/issues/209/events","html_url":"https://github.com/Bareflank/hypervisor/pull/209","id":176545905,"number":209,"title":"Add vmcs check control tests","user":{"login":"connojd","id":9279947,"avatar_url":"https://avatars.githubusercontent.com/u/9279947?v=3","gravatar_id":"","url":"https://api.github.com/users/connojd","html_url":"https://github.com/connojd","followers_url":"https://api.github.com/users/connojd/followers","following_url":"https://api.github.com/users/connojd/following{/other_user}","gists_url":"https://api.github.com/users/connojd/gists{/gist_id}","starred_url":"https://api.github.com/users/connojd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/connojd/subscriptions","organizations_url":"https://api.github.com/users/connojd/orgs","repos_url":"https://api.github.com/users/connojd/repos","events_url":"https://api.github.com/users/connojd/events{/privacy}","received_events_url":"https://api.github.com/users/connojd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2016-09-13T04:24:26Z","updated_at":"2016-09-27T02:38:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Bareflank/hypervisor/pulls/209","html_url":"https://github.com/Bareflank/hypervisor/pull/209","diff_url":"https://github.com/Bareflank/hypervisor/pull/209.diff","patch_url":"https://github.com/Bareflank/hypervisor/pull/209.patch"},"body":"This patch tests every function defined in\r\nvmcs_intel_x64_check_controls.cpp.  The way in which the tests\r\nare implemented is different from other modules.\r\n\r\nEach function-under-test's control flow graph is represented\r\nby a vector of lambdas that modify or enable/disable VMCS fields\r\nand MSRs. Each element in the function's cfg represents exactly one\r\npath from its control flow graph.  Each function-under-test corresponds\r\nto exactly one member of vmcs_ut.  This member enumerates over the\r\ncfg of the function-under-test, testing each element (i.e. path) in turn\r\nwith RUN_UNITTEST_WITH_MOCKS.\r\n\r\nThere are several advantages to testing this way.  First, all of the\r\nlogic to test a function f is contained in its corresponding\r\nsetup_f_paths function, rather than being spread out across several\r\nsetup functions that setup vmcs fields for many functions unrelated to\r\nthe one under test.  This simplifies verification and debugging of the\r\ntest itself because you only have to look at one function to see how it\r\nworks.\r\n\r\nAlso, as the underlying source changes, the test for that source need\r\nonly change in one place.  Implementors of tests don't have to worry\r\nabout the flip of a bit in one VMCS field breaking other unit tests\r\nfor unrelated functions.  The only data dependencies that need to be\r\ntracked down in the event of a change are right there in one setup\r\nfunction.  This aids comprehensibility and maintainability of the tests."},"comment":{"url":"https://api.github.com/repos/Bareflank/hypervisor/issues/comments/249751752","html_url":"https://github.com/Bareflank/hypervisor/pull/209#issuecomment-249751752","issue_url":"https://api.github.com/repos/Bareflank/hypervisor/issues/209","id":249751752,"user":{"login":"rianquinn","id":5932003,"avatar_url":"https://avatars.githubusercontent.com/u/5932003?v=3","gravatar_id":"","url":"https://api.github.com/users/rianquinn","html_url":"https://github.com/rianquinn","followers_url":"https://api.github.com/users/rianquinn/followers","following_url":"https://api.github.com/users/rianquinn/following{/other_user}","gists_url":"https://api.github.com/users/rianquinn/gists{/gist_id}","starred_url":"https://api.github.com/users/rianquinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rianquinn/subscriptions","organizations_url":"https://api.github.com/users/rianquinn/orgs","repos_url":"https://api.github.com/users/rianquinn/repos","events_url":"https://api.github.com/users/rianquinn/events{/privacy}","received_events_url":"https://api.github.com/users/rianquinn/received_events","type":"User","site_admin":false},"created_at":"2016-09-27T02:38:29Z","updated_at":"2016-09-27T02:38:29Z","body":"Sorry I have been away for so long, how are we doing on this PR?"}}
{"actor":{"display_login":"rianquinn"}}