{"action":"created","comment":{"url":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/comments/137927757","pull_request_review_id":61663837,"id":137927757,"diff_hunk":"@@ -0,0 +1,413 @@\n+#line 2 \"suites/target_test.function\"\n+\n+#include \"greentea-client/test_env.h\"\n+\n+/**\n+ * \\brief       Increments pointer and asserts that it does not overflow.\n+ *\n+ * \\param p     Pointer to byte array\n+ * \\param start Pointer to start of byte array\n+ * \\param len   Length of byte array\n+ * \\param step  Increment size\n+ *\n+ */\n+#define INCR_ASSERT(p, start, len, step) do                     \\\n+{                                                               \\\n+    assert( ( p ) >= ( start ) );                               \\\n+    assert( sizeof( *( p ) ) == sizeof( *( start ) ) );         \\\n+    /* <= is checked to support use inside a loop where         \\\n+       pointer is incremented after reading data.       */      \\\n+    assert( (uint32_t)( ( ( p ) - ( start ) ) + ( step ) ) <= ( len ) );\\\n+    ( p ) += step;                                              \\","path":"tests/suites/target_test.function","position":21,"original_position":21,"commit_id":"eceb1f7e3180ce66611093e0e39380f4029a459a","original_commit_id":"eceb1f7e3180ce66611093e0e39380f4029a459a","user":{"login":"gilles-peskine-arm","id":26596258,"avatar_url":"https://avatars3.githubusercontent.com/u/26596258?v=4","gravatar_id":"","url":"https://api.github.com/users/gilles-peskine-arm","html_url":"https://github.com/gilles-peskine-arm","followers_url":"https://api.github.com/users/gilles-peskine-arm/followers","following_url":"https://api.github.com/users/gilles-peskine-arm/following{/other_user}","gists_url":"https://api.github.com/users/gilles-peskine-arm/gists{/gist_id}","starred_url":"https://api.github.com/users/gilles-peskine-arm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gilles-peskine-arm/subscriptions","organizations_url":"https://api.github.com/users/gilles-peskine-arm/orgs","repos_url":"https://api.github.com/users/gilles-peskine-arm/repos","events_url":"https://api.github.com/users/gilles-peskine-arm/events{/privacy}","received_events_url":"https://api.github.com/users/gilles-peskine-arm/received_events","type":"User","site_admin":false},"body":"Missing parentheses around `step`","created_at":"2017-09-09T14:33:18Z","updated_at":"2017-09-09T14:34:04Z","html_url":"https://github.com/ARMmbed/mbedtls/pull/930#discussion_r137927757","pull_request_url":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/930","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/comments/137927757"},"html":{"href":"https://github.com/ARMmbed/mbedtls/pull/930#discussion_r137927757"},"pull_request":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/930"}}},"pull_request":{"url":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/930","id":121733032,"html_url":"https://github.com/ARMmbed/mbedtls/pull/930","diff_url":"https://github.com/ARMmbed/mbedtls/pull/930.diff","patch_url":"https://github.com/ARMmbed/mbedtls/pull/930.patch","issue_url":"https://api.github.com/repos/ARMmbed/mbedtls/issues/930","number":930,"state":"open","locked":false,"title":"Enable on-target execution of mbed TLS unit tests","user":{"login":"mazimkhan","id":13520658,"avatar_url":"https://avatars0.githubusercontent.com/u/13520658?v=4","gravatar_id":"","url":"https://api.github.com/users/mazimkhan","html_url":"https://github.com/mazimkhan","followers_url":"https://api.github.com/users/mazimkhan/followers","following_url":"https://api.github.com/users/mazimkhan/following{/other_user}","gists_url":"https://api.github.com/users/mazimkhan/gists{/gist_id}","starred_url":"https://api.github.com/users/mazimkhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mazimkhan/subscriptions","organizations_url":"https://api.github.com/users/mazimkhan/orgs","repos_url":"https://api.github.com/users/mazimkhan/repos","events_url":"https://api.github.com/users/mazimkhan/events{/privacy}","received_events_url":"https://api.github.com/users/mazimkhan/received_events","type":"User","site_admin":false},"body":"This PR enhances the existing unit test framework for execution on target. Requirements and design details can be found here:\r\nhttp://teamsites.arm.com/sites/IOTBU/Engineering/Shared Documents/mbed TLS/Test/mbed-tls On Target Testing.docx\r\n\r\n## Steps to test:\r\n### Desktop\r\nSteps to test on desktop are not changed. Hence:\r\n- mingw32-make test\r\n\r\n### mbed-os\r\n- Checkout mbed-os\r\n- cd mbed-os\\features\\mbedtls\\importer\\TARGET_IGNORE\\\r\n- checkout mbedtls and merge this PR\r\n- cd mbedtls\\tests\r\n- mingw32-make gen-mbed-test\r\n- mkdir TESTS\\host_tests\r\n- copy scripts\\mbedtls_test.py TESTS\\host_tests\\\r\n- copy the TESTS directory in mbed-os/features/mbedtls/\r\n- cd back to mbed-os/\r\n- mbed test --compile -m K64F -t GCC_ARM\r\n- See mbedtls tests with command mbedgt -V -l\r\n- Run aes tests\r\nmbedgt -V -n features-mbedtls-tests-mbedtls-test_suite_aes*\r\n\r\nBuild requires greentea client changes submitted in PR https://github.com/ARMmbed/mbed-os/issues/4364.","created_at":"2017-05-22T09:23:08Z","updated_at":"2017-09-09T14:34:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e489a9e67819fd67be00e2025eb6e654b172dfae","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/930/commits","review_comments_url":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/930/comments","review_comment_url":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ARMmbed/mbedtls/issues/930/comments","statuses_url":"https://api.github.com/repos/ARMmbed/mbedtls/statuses/eceb1f7e3180ce66611093e0e39380f4029a459a","head":{"label":"mazimkhan:on-target-test","ref":"on-target-test","sha":"eceb1f7e3180ce66611093e0e39380f4029a459a","user":{"login":"mazimkhan","id":13520658,"avatar_url":"https://avatars0.githubusercontent.com/u/13520658?v=4","gravatar_id":"","url":"https://api.github.com/users/mazimkhan","html_url":"https://github.com/mazimkhan","followers_url":"https://api.github.com/users/mazimkhan/followers","following_url":"https://api.github.com/users/mazimkhan/following{/other_user}","gists_url":"https://api.github.com/users/mazimkhan/gists{/gist_id}","starred_url":"https://api.github.com/users/mazimkhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mazimkhan/subscriptions","organizations_url":"https://api.github.com/users/mazimkhan/orgs","repos_url":"https://api.github.com/users/mazimkhan/repos","events_url":"https://api.github.com/users/mazimkhan/events{/privacy}","received_events_url":"https://api.github.com/users/mazimkhan/received_events","type":"User","site_admin":false},"repo":{"id":85199903,"name":"mbedtls","full_name":"mazimkhan/mbedtls","owner":{"login":"mazimkhan","id":13520658,"avatar_url":"https://avatars0.githubusercontent.com/u/13520658?v=4","gravatar_id":"","url":"https://api.github.com/users/mazimkhan","html_url":"https://github.com/mazimkhan","followers_url":"https://api.github.com/users/mazimkhan/followers","following_url":"https://api.github.com/users/mazimkhan/following{/other_user}","gists_url":"https://api.github.com/users/mazimkhan/gists{/gist_id}","starred_url":"https://api.github.com/users/mazimkhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mazimkhan/subscriptions","organizations_url":"https://api.github.com/users/mazimkhan/orgs","repos_url":"https://api.github.com/users/mazimkhan/repos","events_url":"https://api.github.com/users/mazimkhan/events{/privacy}","received_events_url":"https://api.github.com/users/mazimkhan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mazimkhan/mbedtls","description":"An open source, portable, easy to use, readable and flexible SSL library","fork":true,"url":"https://api.github.com/repos/mazimkhan/mbedtls","forks_url":"https://api.github.com/repos/mazimkhan/mbedtls/forks","keys_url":"https://api.github.com/repos/mazimkhan/mbedtls/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mazimkhan/mbedtls/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mazimkhan/mbedtls/teams","hooks_url":"https://api.github.com/repos/mazimkhan/mbedtls/hooks","issue_events_url":"https://api.github.com/repos/mazimkhan/mbedtls/issues/events{/number}","events_url":"https://api.github.com/repos/mazimkhan/mbedtls/events","assignees_url":"https://api.github.com/repos/mazimkhan/mbedtls/assignees{/user}","branches_url":"https://api.github.com/repos/mazimkhan/mbedtls/branches{/branch}","tags_url":"https://api.github.com/repos/mazimkhan/mbedtls/tags","blobs_url":"https://api.github.com/repos/mazimkhan/mbedtls/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mazimkhan/mbedtls/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mazimkhan/mbedtls/git/refs{/sha}","trees_url":"https://api.github.com/repos/mazimkhan/mbedtls/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mazimkhan/mbedtls/statuses/{sha}","languages_url":"https://api.github.com/repos/mazimkhan/mbedtls/languages","stargazers_url":"https://api.github.com/repos/mazimkhan/mbedtls/stargazers","contributors_url":"https://api.github.com/repos/mazimkhan/mbedtls/contributors","subscribers_url":"https://api.github.com/repos/mazimkhan/mbedtls/subscribers","subscription_url":"https://api.github.com/repos/mazimkhan/mbedtls/subscription","commits_url":"https://api.github.com/repos/mazimkhan/mbedtls/commits{/sha}","git_commits_url":"https://api.github.com/repos/mazimkhan/mbedtls/git/commits{/sha}","comments_url":"https://api.github.com/repos/mazimkhan/mbedtls/comments{/number}","issue_comment_url":"https://api.github.com/repos/mazimkhan/mbedtls/issues/comments{/number}","contents_url":"https://api.github.com/repos/mazimkhan/mbedtls/contents/{+path}","compare_url":"https://api.github.com/repos/mazimkhan/mbedtls/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mazimkhan/mbedtls/merges","archive_url":"https://api.github.com/repos/mazimkhan/mbedtls/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mazimkhan/mbedtls/downloads","issues_url":"https://api.github.com/repos/mazimkhan/mbedtls/issues{/number}","pulls_url":"https://api.github.com/repos/mazimkhan/mbedtls/pulls{/number}","milestones_url":"https://api.github.com/repos/mazimkhan/mbedtls/milestones{/number}","notifications_url":"https://api.github.com/repos/mazimkhan/mbedtls/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mazimkhan/mbedtls/labels{/name}","releases_url":"https://api.github.com/repos/mazimkhan/mbedtls/releases{/id}","deployments_url":"https://api.github.com/repos/mazimkhan/mbedtls/deployments","created_at":"2017-03-16T13:37:17Z","updated_at":"2017-03-16T13:37:22Z","pushed_at":"2017-09-08T16:24:36Z","git_url":"git://github.com/mazimkhan/mbedtls.git","ssh_url":"git@github.com:mazimkhan/mbedtls.git","clone_url":"https://github.com/mazimkhan/mbedtls.git","svn_url":"https://github.com/mazimkhan/mbedtls","homepage":"https://tls.mbed.org","size":22128,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"development"}},"base":{"label":"ARMmbed:development","ref":"development","sha":"72ea31b026e1fc61b01662474aa5125817b968bc","user":{"login":"ARMmbed","id":8916057,"avatar_url":"https://avatars3.githubusercontent.com/u/8916057?v=4","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"repo":{"id":6687936,"name":"mbedtls","full_name":"ARMmbed/mbedtls","owner":{"login":"ARMmbed","id":8916057,"avatar_url":"https://avatars3.githubusercontent.com/u/8916057?v=4","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ARMmbed/mbedtls","description":"An open source, portable, easy to use, readable and flexible SSL library","fork":false,"url":"https://api.github.com/repos/ARMmbed/mbedtls","forks_url":"https://api.github.com/repos/ARMmbed/mbedtls/forks","keys_url":"https://api.github.com/repos/ARMmbed/mbedtls/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ARMmbed/mbedtls/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ARMmbed/mbedtls/teams","hooks_url":"https://api.github.com/repos/ARMmbed/mbedtls/hooks","issue_events_url":"https://api.github.com/repos/ARMmbed/mbedtls/issues/events{/number}","events_url":"https://api.github.com/repos/ARMmbed/mbedtls/events","assignees_url":"https://api.github.com/repos/ARMmbed/mbedtls/assignees{/user}","branches_url":"https://api.github.com/repos/ARMmbed/mbedtls/branches{/branch}","tags_url":"https://api.github.com/repos/ARMmbed/mbedtls/tags","blobs_url":"https://api.github.com/repos/ARMmbed/mbedtls/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ARMmbed/mbedtls/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ARMmbed/mbedtls/git/refs{/sha}","trees_url":"https://api.github.com/repos/ARMmbed/mbedtls/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ARMmbed/mbedtls/statuses/{sha}","languages_url":"https://api.github.com/repos/ARMmbed/mbedtls/languages","stargazers_url":"https://api.github.com/repos/ARMmbed/mbedtls/stargazers","contributors_url":"https://api.github.com/repos/ARMmbed/mbedtls/contributors","subscribers_url":"https://api.github.com/repos/ARMmbed/mbedtls/subscribers","subscription_url":"https://api.github.com/repos/ARMmbed/mbedtls/subscription","commits_url":"https://api.github.com/repos/ARMmbed/mbedtls/commits{/sha}","git_commits_url":"https://api.github.com/repos/ARMmbed/mbedtls/git/commits{/sha}","comments_url":"https://api.github.com/repos/ARMmbed/mbedtls/comments{/number}","issue_comment_url":"https://api.github.com/repos/ARMmbed/mbedtls/issues/comments{/number}","contents_url":"https://api.github.com/repos/ARMmbed/mbedtls/contents/{+path}","compare_url":"https://api.github.com/repos/ARMmbed/mbedtls/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ARMmbed/mbedtls/merges","archive_url":"https://api.github.com/repos/ARMmbed/mbedtls/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ARMmbed/mbedtls/downloads","issues_url":"https://api.github.com/repos/ARMmbed/mbedtls/issues{/number}","pulls_url":"https://api.github.com/repos/ARMmbed/mbedtls/pulls{/number}","milestones_url":"https://api.github.com/repos/ARMmbed/mbedtls/milestones{/number}","notifications_url":"https://api.github.com/repos/ARMmbed/mbedtls/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ARMmbed/mbedtls/labels{/name}","releases_url":"https://api.github.com/repos/ARMmbed/mbedtls/releases{/id}","deployments_url":"https://api.github.com/repos/ARMmbed/mbedtls/deployments","created_at":"2012-11-14T13:13:13Z","updated_at":"2017-09-08T07:34:18Z","pushed_at":"2017-09-08T16:24:37Z","git_url":"git://github.com/ARMmbed/mbedtls.git","ssh_url":"git@github.com:ARMmbed/mbedtls.git","clone_url":"https://github.com/ARMmbed/mbedtls.git","svn_url":"https://github.com/ARMmbed/mbedtls","homepage":"https://tls.mbed.org","size":22188,"stargazers_count":1077,"watchers_count":1077,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":645,"mirror_url":null,"open_issues_count":361,"forks":645,"open_issues":361,"watchers":1077,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/930"},"html":{"href":"https://github.com/ARMmbed/mbedtls/pull/930"},"issue":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/issues/930"},"comments":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/issues/930/comments"},"review_comments":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/930/comments"},"review_comment":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/930/commits"},"statuses":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/statuses/eceb1f7e3180ce66611093e0e39380f4029a459a"}},"author_association":"NONE"}}
{"actor":{"display_login":"gilles-peskine-arm"}}