{"action":"created","comment":{"url":"https://api.github.com/repos/Samsung/TizenRT/pulls/comments/158016820","pull_request_review_id":84752235,"id":158016820,"diff_hunk":"@@ -0,0 +1,290 @@\n+/****************************************************************************\n+ *\n+ * Copyright 2017 Samsung Electronics All Rights Reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing,\n+ * software distributed under the License is distributed on an\n+ * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\n+ * either express or implied. See the License for the specific\n+ * language governing permissions and limitations under the License.\n+ *\n+ ****************************************************************************/\n+\n+/// @file tc_loop.c\n+/// @brief Test Case Example for loop driver\n+#include <tinyara/config.h>\n+#include <tinyara/fs/fs.h>\n+#include <stdio.h>\n+#include <fcntl.h>\n+#include \"tc_internal.h\"\n+#include <errno.h>\n+\n+static void close_fds(FAR struct inode *pnode[255], int count)\n+{\n+\tfor (; count >= 0; count--) {\n+\t\tclose_blockdriver(pnode[count]);\n+\t}\n+}\n+\n+static void cleanup(FAR struct inode *pnode, unsigned char *buf)\n+{\n+\tfree(buf);\n+\tclose_blockdriver(pnode);\n+}\n+\n+/**\n+* @fn                   :tc_loop_geometry\n+* @brief                :Test the loop driver geometry api\n+* @scenario             :Test the loop driver geometry api\n+* API's covered         :geometry\n+* Preconditions         :none\n+* Postconditions        :none\n+* @return               :void\n+*/\n+static void tc_loop_geometry(void)\n+{\n+\tint ret = 0;\n+\tFAR struct inode *pnode;\n+\n+\t/* Positive testcases */\n+\tret = open_blockdriver(\"/dev/loop\", 0, &pnode);\n+\tTC_ASSERT_EQ(\"loop_open\", ret, OK);\n+\n+\tFAR struct geometry geo;\n+\tret = pnode->u.i_bops->geometry(pnode, &geo);\n+\tTC_ASSERT_EQ_CLEANUP(\"loop_geometry\", ret, OK, close_blockdriver(pnode));\n+\tTC_ASSERT_EQ_CLEANUP(\"loop_geometry\", geo.geo_available, true, close_blockdriver(pnode));\n+\tTC_ASSERT_EQ_CLEANUP(\"loop_geometry\", geo.geo_mediachanged, false, close_blockdriver(pnode));\n+\tTC_ASSERT_EQ_CLEANUP(\"loop_geometry\", geo.geo_sectorsize, 512, close_blockdriver(pnode));\n+\tTC_ASSERT_EQ_CLEANUP(\"loop_geometry\", geo.geo_nsectors, 2, close_blockdriver(pnode));\n+\n+\t/* Negative test cases */\n+\tret = pnode->u.i_bops->geometry(pnode, NULL);\n+\tTC_ASSERT_LT_CLEANUP(\"loop_geometry\", ret, 0, close_blockdriver(pnode));\n+\n+\tclose_blockdriver(pnode);\n+\n+\tTC_SUCCESS_RESULT();\n+}\n+\n+/**\n+* @fn                   :tc_loop_read\n+* @brief                :Test the loop driver read api\n+* @scenario             :Test the loop driver read api\n+* API's covered         :read\n+* Preconditions         :none\n+* Postconditions        :none\n+* @return               :void\n+*/\n+static void tc_loop_read(void)\n+{\n+\tint ret = 0;\n+\tFAR struct inode *pnode;\n+\tunsigned char *read_buf = malloc(1024);","path":"apps/examples/testcase/le_tc/drivers/tc_loop.c","position":89,"original_position":89,"commit_id":"97bd92b6e2cf2739c8f8e88694ab5f92280e9c8b","original_commit_id":"97bd92b6e2cf2739c8f8e88694ab5f92280e9c8b","user":{"login":"lokeshbv","id":26534978,"avatar_url":"https://avatars1.githubusercontent.com/u/26534978?v=4","gravatar_id":"","url":"https://api.github.com/users/lokeshbv","html_url":"https://github.com/lokeshbv","followers_url":"https://api.github.com/users/lokeshbv/followers","following_url":"https://api.github.com/users/lokeshbv/following{/other_user}","gists_url":"https://api.github.com/users/lokeshbv/gists{/gist_id}","starred_url":"https://api.github.com/users/lokeshbv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lokeshbv/subscriptions","organizations_url":"https://api.github.com/users/lokeshbv/orgs","repos_url":"https://api.github.com/users/lokeshbv/repos","events_url":"https://api.github.com/users/lokeshbv/events{/privacy}","received_events_url":"https://api.github.com/users/lokeshbv/received_events","type":"User","site_admin":false},"body":"`malloc ` validation","created_at":"2017-12-20T13:00:55Z","updated_at":"2017-12-20T13:04:48Z","html_url":"https://github.com/Samsung/TizenRT/pull/1126#discussion_r158016820","pull_request_url":"https://api.github.com/repos/Samsung/TizenRT/pulls/1126","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Samsung/TizenRT/pulls/comments/158016820"},"html":{"href":"https://github.com/Samsung/TizenRT/pull/1126#discussion_r158016820"},"pull_request":{"href":"https://api.github.com/repos/Samsung/TizenRT/pulls/1126"}}},"pull_request":{"url":"https://api.github.com/repos/Samsung/TizenRT/pulls/1126","id":158862955,"html_url":"https://github.com/Samsung/TizenRT/pull/1126","diff_url":"https://github.com/Samsung/TizenRT/pull/1126.diff","patch_url":"https://github.com/Samsung/TizenRT/pull/1126.patch","issue_url":"https://api.github.com/repos/Samsung/TizenRT/issues/1126","number":1126,"state":"open","locked":false,"title":"Test cases for modules in os/drivers","user":{"login":"kishore-sn","id":31479058,"avatar_url":"https://avatars2.githubusercontent.com/u/31479058?v=4","gravatar_id":"","url":"https://api.github.com/users/kishore-sn","html_url":"https://github.com/kishore-sn","followers_url":"https://api.github.com/users/kishore-sn/followers","following_url":"https://api.github.com/users/kishore-sn/following{/other_user}","gists_url":"https://api.github.com/users/kishore-sn/gists{/gist_id}","starred_url":"https://api.github.com/users/kishore-sn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kishore-sn/subscriptions","organizations_url":"https://api.github.com/users/kishore-sn/orgs","repos_url":"https://api.github.com/users/kishore-sn/repos","events_url":"https://api.github.com/users/kishore-sn/events{/privacy}","received_events_url":"https://api.github.com/users/kishore-sn/received_events","type":"User","site_admin":false},"body":"Initial set of test cases for modules in os/drivers\r\nIt covers test cases for dev_null, dev_zero, adc, loop, pwm, rtc and watchdog drivers\r\nIt also contains changes in the le_tc part, for adding new files and folders for the drivers test cases","created_at":"2017-12-18T09:18:22Z","updated_at":"2017-12-20T13:04:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f929210379a302c7f64a01fe0f162bf658ae7d2b","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Samsung/TizenRT/pulls/1126/commits","review_comments_url":"https://api.github.com/repos/Samsung/TizenRT/pulls/1126/comments","review_comment_url":"https://api.github.com/repos/Samsung/TizenRT/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Samsung/TizenRT/issues/1126/comments","statuses_url":"https://api.github.com/repos/Samsung/TizenRT/statuses/97bd92b6e2cf2739c8f8e88694ab5f92280e9c8b","head":{"label":"kishore-sn:driver_tc","ref":"driver_tc","sha":"97bd92b6e2cf2739c8f8e88694ab5f92280e9c8b","user":{"login":"kishore-sn","id":31479058,"avatar_url":"https://avatars2.githubusercontent.com/u/31479058?v=4","gravatar_id":"","url":"https://api.github.com/users/kishore-sn","html_url":"https://github.com/kishore-sn","followers_url":"https://api.github.com/users/kishore-sn/followers","following_url":"https://api.github.com/users/kishore-sn/following{/other_user}","gists_url":"https://api.github.com/users/kishore-sn/gists{/gist_id}","starred_url":"https://api.github.com/users/kishore-sn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kishore-sn/subscriptions","organizations_url":"https://api.github.com/users/kishore-sn/orgs","repos_url":"https://api.github.com/users/kishore-sn/repos","events_url":"https://api.github.com/users/kishore-sn/events{/privacy}","received_events_url":"https://api.github.com/users/kishore-sn/received_events","type":"User","site_admin":false},"repo":{"id":101886922,"name":"TizenRT","full_name":"kishore-sn/TizenRT","owner":{"login":"kishore-sn","id":31479058,"avatar_url":"https://avatars2.githubusercontent.com/u/31479058?v=4","gravatar_id":"","url":"https://api.github.com/users/kishore-sn","html_url":"https://github.com/kishore-sn","followers_url":"https://api.github.com/users/kishore-sn/followers","following_url":"https://api.github.com/users/kishore-sn/following{/other_user}","gists_url":"https://api.github.com/users/kishore-sn/gists{/gist_id}","starred_url":"https://api.github.com/users/kishore-sn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kishore-sn/subscriptions","organizations_url":"https://api.github.com/users/kishore-sn/orgs","repos_url":"https://api.github.com/users/kishore-sn/repos","events_url":"https://api.github.com/users/kishore-sn/events{/privacy}","received_events_url":"https://api.github.com/users/kishore-sn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kishore-sn/TizenRT","description":"Tizen RT is a lightweight RTOS-based platform to support low-end IoT devices","fork":true,"url":"https://api.github.com/repos/kishore-sn/TizenRT","forks_url":"https://api.github.com/repos/kishore-sn/TizenRT/forks","keys_url":"https://api.github.com/repos/kishore-sn/TizenRT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kishore-sn/TizenRT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kishore-sn/TizenRT/teams","hooks_url":"https://api.github.com/repos/kishore-sn/TizenRT/hooks","issue_events_url":"https://api.github.com/repos/kishore-sn/TizenRT/issues/events{/number}","events_url":"https://api.github.com/repos/kishore-sn/TizenRT/events","assignees_url":"https://api.github.com/repos/kishore-sn/TizenRT/assignees{/user}","branches_url":"https://api.github.com/repos/kishore-sn/TizenRT/branches{/branch}","tags_url":"https://api.github.com/repos/kishore-sn/TizenRT/tags","blobs_url":"https://api.github.com/repos/kishore-sn/TizenRT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kishore-sn/TizenRT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kishore-sn/TizenRT/git/refs{/sha}","trees_url":"https://api.github.com/repos/kishore-sn/TizenRT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kishore-sn/TizenRT/statuses/{sha}","languages_url":"https://api.github.com/repos/kishore-sn/TizenRT/languages","stargazers_url":"https://api.github.com/repos/kishore-sn/TizenRT/stargazers","contributors_url":"https://api.github.com/repos/kishore-sn/TizenRT/contributors","subscribers_url":"https://api.github.com/repos/kishore-sn/TizenRT/subscribers","subscription_url":"https://api.github.com/repos/kishore-sn/TizenRT/subscription","commits_url":"https://api.github.com/repos/kishore-sn/TizenRT/commits{/sha}","git_commits_url":"https://api.github.com/repos/kishore-sn/TizenRT/git/commits{/sha}","comments_url":"https://api.github.com/repos/kishore-sn/TizenRT/comments{/number}","issue_comment_url":"https://api.github.com/repos/kishore-sn/TizenRT/issues/comments{/number}","contents_url":"https://api.github.com/repos/kishore-sn/TizenRT/contents/{+path}","compare_url":"https://api.github.com/repos/kishore-sn/TizenRT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kishore-sn/TizenRT/merges","archive_url":"https://api.github.com/repos/kishore-sn/TizenRT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kishore-sn/TizenRT/downloads","issues_url":"https://api.github.com/repos/kishore-sn/TizenRT/issues{/number}","pulls_url":"https://api.github.com/repos/kishore-sn/TizenRT/pulls{/number}","milestones_url":"https://api.github.com/repos/kishore-sn/TizenRT/milestones{/number}","notifications_url":"https://api.github.com/repos/kishore-sn/TizenRT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kishore-sn/TizenRT/labels{/name}","releases_url":"https://api.github.com/repos/kishore-sn/TizenRT/releases{/id}","deployments_url":"https://api.github.com/repos/kishore-sn/TizenRT/deployments","created_at":"2017-08-30T13:47:43Z","updated_at":"2017-08-30T13:48:01Z","pushed_at":"2017-12-20T03:52:54Z","git_url":"git://github.com/kishore-sn/TizenRT.git","ssh_url":"git@github.com:kishore-sn/TizenRT.git","clone_url":"https://github.com/kishore-sn/TizenRT.git","svn_url":"https://github.com/kishore-sn/TizenRT","homepage":"","size":82941,"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,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Samsung:master","ref":"master","sha":"96e61e6752dcfddc9d5d402915e03890ed304432","user":{"login":"Samsung","id":6210390,"avatar_url":"https://avatars3.githubusercontent.com/u/6210390?v=4","gravatar_id":"","url":"https://api.github.com/users/Samsung","html_url":"https://github.com/Samsung","followers_url":"https://api.github.com/users/Samsung/followers","following_url":"https://api.github.com/users/Samsung/following{/other_user}","gists_url":"https://api.github.com/users/Samsung/gists{/gist_id}","starred_url":"https://api.github.com/users/Samsung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Samsung/subscriptions","organizations_url":"https://api.github.com/users/Samsung/orgs","repos_url":"https://api.github.com/users/Samsung/repos","events_url":"https://api.github.com/users/Samsung/events{/privacy}","received_events_url":"https://api.github.com/users/Samsung/received_events","type":"Organization","site_admin":false},"repo":{"id":82517252,"name":"TizenRT","full_name":"Samsung/TizenRT","owner":{"login":"Samsung","id":6210390,"avatar_url":"https://avatars3.githubusercontent.com/u/6210390?v=4","gravatar_id":"","url":"https://api.github.com/users/Samsung","html_url":"https://github.com/Samsung","followers_url":"https://api.github.com/users/Samsung/followers","following_url":"https://api.github.com/users/Samsung/following{/other_user}","gists_url":"https://api.github.com/users/Samsung/gists{/gist_id}","starred_url":"https://api.github.com/users/Samsung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Samsung/subscriptions","organizations_url":"https://api.github.com/users/Samsung/orgs","repos_url":"https://api.github.com/users/Samsung/repos","events_url":"https://api.github.com/users/Samsung/events{/privacy}","received_events_url":"https://api.github.com/users/Samsung/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Samsung/TizenRT","description":"Tizen RT is a lightweight RTOS-based platform to support low-end IoT devices","fork":false,"url":"https://api.github.com/repos/Samsung/TizenRT","forks_url":"https://api.github.com/repos/Samsung/TizenRT/forks","keys_url":"https://api.github.com/repos/Samsung/TizenRT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Samsung/TizenRT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Samsung/TizenRT/teams","hooks_url":"https://api.github.com/repos/Samsung/TizenRT/hooks","issue_events_url":"https://api.github.com/repos/Samsung/TizenRT/issues/events{/number}","events_url":"https://api.github.com/repos/Samsung/TizenRT/events","assignees_url":"https://api.github.com/repos/Samsung/TizenRT/assignees{/user}","branches_url":"https://api.github.com/repos/Samsung/TizenRT/branches{/branch}","tags_url":"https://api.github.com/repos/Samsung/TizenRT/tags","blobs_url":"https://api.github.com/repos/Samsung/TizenRT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Samsung/TizenRT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Samsung/TizenRT/git/refs{/sha}","trees_url":"https://api.github.com/repos/Samsung/TizenRT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Samsung/TizenRT/statuses/{sha}","languages_url":"https://api.github.com/repos/Samsung/TizenRT/languages","stargazers_url":"https://api.github.com/repos/Samsung/TizenRT/stargazers","contributors_url":"https://api.github.com/repos/Samsung/TizenRT/contributors","subscribers_url":"https://api.github.com/repos/Samsung/TizenRT/subscribers","subscription_url":"https://api.github.com/repos/Samsung/TizenRT/subscription","commits_url":"https://api.github.com/repos/Samsung/TizenRT/commits{/sha}","git_commits_url":"https://api.github.com/repos/Samsung/TizenRT/git/commits{/sha}","comments_url":"https://api.github.com/repos/Samsung/TizenRT/comments{/number}","issue_comment_url":"https://api.github.com/repos/Samsung/TizenRT/issues/comments{/number}","contents_url":"https://api.github.com/repos/Samsung/TizenRT/contents/{+path}","compare_url":"https://api.github.com/repos/Samsung/TizenRT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Samsung/TizenRT/merges","archive_url":"https://api.github.com/repos/Samsung/TizenRT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Samsung/TizenRT/downloads","issues_url":"https://api.github.com/repos/Samsung/TizenRT/issues{/number}","pulls_url":"https://api.github.com/repos/Samsung/TizenRT/pulls{/number}","milestones_url":"https://api.github.com/repos/Samsung/TizenRT/milestones{/number}","notifications_url":"https://api.github.com/repos/Samsung/TizenRT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Samsung/TizenRT/labels{/name}","releases_url":"https://api.github.com/repos/Samsung/TizenRT/releases{/id}","deployments_url":"https://api.github.com/repos/Samsung/TizenRT/deployments","created_at":"2017-02-20T04:38:30Z","updated_at":"2017-12-15T14:57:03Z","pushed_at":"2017-12-20T10:05:21Z","git_url":"git://github.com/Samsung/TizenRT.git","ssh_url":"git@github.com:Samsung/TizenRT.git","clone_url":"https://github.com/Samsung/TizenRT.git","svn_url":"https://github.com/Samsung/TizenRT","homepage":"","size":82951,"stargazers_count":105,"watchers_count":105,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":135,"mirror_url":null,"archived":false,"open_issues_count":46,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":135,"open_issues":46,"watchers":105,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Samsung/TizenRT/pulls/1126"},"html":{"href":"https://github.com/Samsung/TizenRT/pull/1126"},"issue":{"href":"https://api.github.com/repos/Samsung/TizenRT/issues/1126"},"comments":{"href":"https://api.github.com/repos/Samsung/TizenRT/issues/1126/comments"},"review_comments":{"href":"https://api.github.com/repos/Samsung/TizenRT/pulls/1126/comments"},"review_comment":{"href":"https://api.github.com/repos/Samsung/TizenRT/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Samsung/TizenRT/pulls/1126/commits"},"statuses":{"href":"https://api.github.com/repos/Samsung/TizenRT/statuses/97bd92b6e2cf2739c8f8e88694ab5f92280e9c8b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"lokeshbv"}}