{"action":"created","comment":{"url":"https://api.github.com/repos/linux-test-project/ltp/pulls/comments/238201478","pull_request_review_id":180682794,"id":238201478,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODIwMTQ3OA==","diff_hunk":"@@ -0,0 +1,95 @@\n+/*\n+ * This file is licensed under the GPL license.  For the full content\n+ * of this license, see the COPYING file at the top level of this\n+ * source tree.\n+ */\n+\n+/*\n+ * assertion:\n+ * Establish the connection between file and file descriptor\n+ *\n+ * method:\n+ *\t-open file in write mode using open()\n+ *\t-write 1 sample string into a file\n+ *\t-close the file\n+ *\t-open the same file in read mode\n+ *\t-read data from the file\n+ *\t-compare the value read with the value written in first step\n+ */\n+\n+#define _XOPEN_SOURCE 700\n+#include <stdio.h>\n+#include <errno.h>\n+#include <stdlib.h>\n+#include <unistd.h>\n+#include <fcntl.h>\n+#include \"posixtest.h\"\n+\n+#define TNAME \"open/1-1.c\"\n+#define FNAME \"./test_file\"\n+#define STR_CONST \"POSIX CONFORMANCE TEST\"\n+\n+static void remove_file(int fd)\n+{\n+\terrno = 0;\n+\tif (fd > 0) {\n+\t\tif (close(fd) < 0) {\n+\t\t\tprintf(TNAME \" Error at close(), errno = %d, %s \\n\", errno, strerror(errno));\n+\t\t\tunlink(FNAME);\n+\t\t\texit(PTS_UNRESOLVED);\n+\t\t}\n+\t}\n+\tunlink(FNAME);\n+}\n+\n+int main(void)\n+{\n+\tint test_fd, ret;\n+\tchar read_value[sizeof(STR_CONST)] = {};\n+\terrno = 0;\n+\n+\ttest_fd = open(FNAME, O_CREAT | O_WRONLY, S_IRWXG | S_IRWXU);\n+\tif (test_fd < 0) {\n+\t\tprintf(TNAME \" Error in open(), errno: %d, %s\\n\", errno, strerror(errno));\n+\t\texit(PTS_UNRESOLVED);\n+\t}\n+\n+\tret = write(test_fd, STR_CONST, sizeof(STR_CONST));\n+\tif (ret < 0) {\n+\t\tprintf(TNAME \" Error in write()\\n\");\n+\t\tremove_file(test_fd);\n+\t\texit(PTS_UNRESOLVED);\n+\t}\n+\terrno = 0;\n+\tif (close(test_fd) < 0) {\n+\t\tprintf(TNAME \" Error at close(), errno = %d, %s\\n\", errno, strerror(errno));\n+\t\tunlink(FNAME);\n+\t\texit(PTS_UNRESOLVED);\n+\t}\n+\n+\terrno = 0;\n+\ttest_fd = open(FNAME, O_RDONLY);\n+\tif (test_fd < 0) {\n+\t\tprintf(TNAME \" Error in open(), errno = %d, %s\\n\", errno, strerror(errno));\n+\t\tremove_file(test_fd);\n+\t\texit(PTS_UNRESOLVED);\n+\t}\n+\n+\terrno = 0;","path":"testcases/open_posix_testsuite/conformance/interfaces/open/1-1.c","position":78,"original_position":78,"commit_id":"f3a196e5c716c704a8fb1c579e51dbc8f67f34d2","original_commit_id":"f3a196e5c716c704a8fb1c579e51dbc8f67f34d2","user":{"login":"avinash-palleti","id":362099,"node_id":"MDQ6VXNlcjM2MjA5OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/362099?v=4","gravatar_id":"","url":"https://api.github.com/users/avinash-palleti","html_url":"https://github.com/avinash-palleti","followers_url":"https://api.github.com/users/avinash-palleti/followers","following_url":"https://api.github.com/users/avinash-palleti/following{/other_user}","gists_url":"https://api.github.com/users/avinash-palleti/gists{/gist_id}","starred_url":"https://api.github.com/users/avinash-palleti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avinash-palleti/subscriptions","organizations_url":"https://api.github.com/users/avinash-palleti/orgs","repos_url":"https://api.github.com/users/avinash-palleti/repos","events_url":"https://api.github.com/users/avinash-palleti/events{/privacy}","received_events_url":"https://api.github.com/users/avinash-palleti/received_events","type":"User","site_admin":false},"body":"same here.","created_at":"2018-12-03T09:52:34Z","updated_at":"2018-12-03T09:52:34Z","html_url":"https://github.com/linux-test-project/ltp/pull/432#discussion_r238201478","pull_request_url":"https://api.github.com/repos/linux-test-project/ltp/pulls/432","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/linux-test-project/ltp/pulls/comments/238201478"},"html":{"href":"https://github.com/linux-test-project/ltp/pull/432#discussion_r238201478"},"pull_request":{"href":"https://api.github.com/repos/linux-test-project/ltp/pulls/432"}},"in_reply_to_id":237089849},"pull_request":{"url":"https://api.github.com/repos/linux-test-project/ltp/pulls/432","id":234202383,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0MjAyMzgz","html_url":"https://github.com/linux-test-project/ltp/pull/432","diff_url":"https://github.com/linux-test-project/ltp/pull/432.diff","patch_url":"https://github.com/linux-test-project/ltp/pull/432.patch","issue_url":"https://api.github.com/repos/linux-test-project/ltp/issues/432","number":432,"state":"open","locked":false,"title":"[open_posix_testsuite] Add tests for open() api","user":{"login":"avinash-palleti","id":362099,"node_id":"MDQ6VXNlcjM2MjA5OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/362099?v=4","gravatar_id":"","url":"https://api.github.com/users/avinash-palleti","html_url":"https://github.com/avinash-palleti","followers_url":"https://api.github.com/users/avinash-palleti/followers","following_url":"https://api.github.com/users/avinash-palleti/following{/other_user}","gists_url":"https://api.github.com/users/avinash-palleti/gists{/gist_id}","starred_url":"https://api.github.com/users/avinash-palleti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avinash-palleti/subscriptions","organizations_url":"https://api.github.com/users/avinash-palleti/orgs","repos_url":"https://api.github.com/users/avinash-palleti/repos","events_url":"https://api.github.com/users/avinash-palleti/events{/privacy}","received_events_url":"https://api.github.com/users/avinash-palleti/received_events","type":"User","site_admin":false},"body":"Adding assertions.xml and initial set of tests for open() api.\r\n\r\nSigned-off-by: Palleti, Avinash Reddy <avinash.reddy.palleti@intel.com>\r\nChange-Id: I7262497df1251d7d87a74ae8da954cf1842f1cb7","created_at":"2018-11-28T09:24:34Z","updated_at":"2018-12-03T09:52:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bbc5d6fc23a6a56c76fec589b89b6e5c6376353c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/linux-test-project/ltp/pulls/432/commits","review_comments_url":"https://api.github.com/repos/linux-test-project/ltp/pulls/432/comments","review_comment_url":"https://api.github.com/repos/linux-test-project/ltp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linux-test-project/ltp/issues/432/comments","statuses_url":"https://api.github.com/repos/linux-test-project/ltp/statuses/f3a196e5c716c704a8fb1c579e51dbc8f67f34d2","head":{"label":"avinash-palleti:master","ref":"master","sha":"f3a196e5c716c704a8fb1c579e51dbc8f67f34d2","user":{"login":"avinash-palleti","id":362099,"node_id":"MDQ6VXNlcjM2MjA5OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/362099?v=4","gravatar_id":"","url":"https://api.github.com/users/avinash-palleti","html_url":"https://github.com/avinash-palleti","followers_url":"https://api.github.com/users/avinash-palleti/followers","following_url":"https://api.github.com/users/avinash-palleti/following{/other_user}","gists_url":"https://api.github.com/users/avinash-palleti/gists{/gist_id}","starred_url":"https://api.github.com/users/avinash-palleti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avinash-palleti/subscriptions","organizations_url":"https://api.github.com/users/avinash-palleti/orgs","repos_url":"https://api.github.com/users/avinash-palleti/repos","events_url":"https://api.github.com/users/avinash-palleti/events{/privacy}","received_events_url":"https://api.github.com/users/avinash-palleti/received_events","type":"User","site_admin":false},"repo":{"id":159475553,"node_id":"MDEwOlJlcG9zaXRvcnkxNTk0NzU1NTM=","name":"ltp","full_name":"avinash-palleti/ltp","private":false,"owner":{"login":"avinash-palleti","id":362099,"node_id":"MDQ6VXNlcjM2MjA5OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/362099?v=4","gravatar_id":"","url":"https://api.github.com/users/avinash-palleti","html_url":"https://github.com/avinash-palleti","followers_url":"https://api.github.com/users/avinash-palleti/followers","following_url":"https://api.github.com/users/avinash-palleti/following{/other_user}","gists_url":"https://api.github.com/users/avinash-palleti/gists{/gist_id}","starred_url":"https://api.github.com/users/avinash-palleti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avinash-palleti/subscriptions","organizations_url":"https://api.github.com/users/avinash-palleti/orgs","repos_url":"https://api.github.com/users/avinash-palleti/repos","events_url":"https://api.github.com/users/avinash-palleti/events{/privacy}","received_events_url":"https://api.github.com/users/avinash-palleti/received_events","type":"User","site_admin":false},"html_url":"https://github.com/avinash-palleti/ltp","description":"Linux Test Project","fork":true,"url":"https://api.github.com/repos/avinash-palleti/ltp","forks_url":"https://api.github.com/repos/avinash-palleti/ltp/forks","keys_url":"https://api.github.com/repos/avinash-palleti/ltp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/avinash-palleti/ltp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/avinash-palleti/ltp/teams","hooks_url":"https://api.github.com/repos/avinash-palleti/ltp/hooks","issue_events_url":"https://api.github.com/repos/avinash-palleti/ltp/issues/events{/number}","events_url":"https://api.github.com/repos/avinash-palleti/ltp/events","assignees_url":"https://api.github.com/repos/avinash-palleti/ltp/assignees{/user}","branches_url":"https://api.github.com/repos/avinash-palleti/ltp/branches{/branch}","tags_url":"https://api.github.com/repos/avinash-palleti/ltp/tags","blobs_url":"https://api.github.com/repos/avinash-palleti/ltp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/avinash-palleti/ltp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/avinash-palleti/ltp/git/refs{/sha}","trees_url":"https://api.github.com/repos/avinash-palleti/ltp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/avinash-palleti/ltp/statuses/{sha}","languages_url":"https://api.github.com/repos/avinash-palleti/ltp/languages","stargazers_url":"https://api.github.com/repos/avinash-palleti/ltp/stargazers","contributors_url":"https://api.github.com/repos/avinash-palleti/ltp/contributors","subscribers_url":"https://api.github.com/repos/avinash-palleti/ltp/subscribers","subscription_url":"https://api.github.com/repos/avinash-palleti/ltp/subscription","commits_url":"https://api.github.com/repos/avinash-palleti/ltp/commits{/sha}","git_commits_url":"https://api.github.com/repos/avinash-palleti/ltp/git/commits{/sha}","comments_url":"https://api.github.com/repos/avinash-palleti/ltp/comments{/number}","issue_comment_url":"https://api.github.com/repos/avinash-palleti/ltp/issues/comments{/number}","contents_url":"https://api.github.com/repos/avinash-palleti/ltp/contents/{+path}","compare_url":"https://api.github.com/repos/avinash-palleti/ltp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/avinash-palleti/ltp/merges","archive_url":"https://api.github.com/repos/avinash-palleti/ltp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/avinash-palleti/ltp/downloads","issues_url":"https://api.github.com/repos/avinash-palleti/ltp/issues{/number}","pulls_url":"https://api.github.com/repos/avinash-palleti/ltp/pulls{/number}","milestones_url":"https://api.github.com/repos/avinash-palleti/ltp/milestones{/number}","notifications_url":"https://api.github.com/repos/avinash-palleti/ltp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/avinash-palleti/ltp/labels{/name}","releases_url":"https://api.github.com/repos/avinash-palleti/ltp/releases{/id}","deployments_url":"https://api.github.com/repos/avinash-palleti/ltp/deployments","created_at":"2018-11-28T09:21:31Z","updated_at":"2018-11-28T09:23:17Z","pushed_at":"2018-11-28T09:23:15Z","git_url":"git://github.com/avinash-palleti/ltp.git","ssh_url":"git@github.com:avinash-palleti/ltp.git","clone_url":"https://github.com/avinash-palleti/ltp.git","svn_url":"https://github.com/avinash-palleti/ltp","homepage":"http://linux-test-project.github.io/","size":54613,"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":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"linux-test-project:master","ref":"master","sha":"3d7bc899bd276b228d85ee6cc77231dd88c5bdf1","user":{"login":"linux-test-project","id":1511838,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MTE4Mzg=","avatar_url":"https://avatars2.githubusercontent.com/u/1511838?v=4","gravatar_id":"","url":"https://api.github.com/users/linux-test-project","html_url":"https://github.com/linux-test-project","followers_url":"https://api.github.com/users/linux-test-project/followers","following_url":"https://api.github.com/users/linux-test-project/following{/other_user}","gists_url":"https://api.github.com/users/linux-test-project/gists{/gist_id}","starred_url":"https://api.github.com/users/linux-test-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linux-test-project/subscriptions","organizations_url":"https://api.github.com/users/linux-test-project/orgs","repos_url":"https://api.github.com/users/linux-test-project/repos","events_url":"https://api.github.com/users/linux-test-project/events{/privacy}","received_events_url":"https://api.github.com/users/linux-test-project/received_events","type":"Organization","site_admin":false},"repo":{"id":3649922,"node_id":"MDEwOlJlcG9zaXRvcnkzNjQ5OTIy","name":"ltp","full_name":"linux-test-project/ltp","private":false,"owner":{"login":"linux-test-project","id":1511838,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MTE4Mzg=","avatar_url":"https://avatars2.githubusercontent.com/u/1511838?v=4","gravatar_id":"","url":"https://api.github.com/users/linux-test-project","html_url":"https://github.com/linux-test-project","followers_url":"https://api.github.com/users/linux-test-project/followers","following_url":"https://api.github.com/users/linux-test-project/following{/other_user}","gists_url":"https://api.github.com/users/linux-test-project/gists{/gist_id}","starred_url":"https://api.github.com/users/linux-test-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linux-test-project/subscriptions","organizations_url":"https://api.github.com/users/linux-test-project/orgs","repos_url":"https://api.github.com/users/linux-test-project/repos","events_url":"https://api.github.com/users/linux-test-project/events{/privacy}","received_events_url":"https://api.github.com/users/linux-test-project/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/linux-test-project/ltp","description":"Linux Test Project","fork":false,"url":"https://api.github.com/repos/linux-test-project/ltp","forks_url":"https://api.github.com/repos/linux-test-project/ltp/forks","keys_url":"https://api.github.com/repos/linux-test-project/ltp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linux-test-project/ltp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linux-test-project/ltp/teams","hooks_url":"https://api.github.com/repos/linux-test-project/ltp/hooks","issue_events_url":"https://api.github.com/repos/linux-test-project/ltp/issues/events{/number}","events_url":"https://api.github.com/repos/linux-test-project/ltp/events","assignees_url":"https://api.github.com/repos/linux-test-project/ltp/assignees{/user}","branches_url":"https://api.github.com/repos/linux-test-project/ltp/branches{/branch}","tags_url":"https://api.github.com/repos/linux-test-project/ltp/tags","blobs_url":"https://api.github.com/repos/linux-test-project/ltp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linux-test-project/ltp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linux-test-project/ltp/git/refs{/sha}","trees_url":"https://api.github.com/repos/linux-test-project/ltp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linux-test-project/ltp/statuses/{sha}","languages_url":"https://api.github.com/repos/linux-test-project/ltp/languages","stargazers_url":"https://api.github.com/repos/linux-test-project/ltp/stargazers","contributors_url":"https://api.github.com/repos/linux-test-project/ltp/contributors","subscribers_url":"https://api.github.com/repos/linux-test-project/ltp/subscribers","subscription_url":"https://api.github.com/repos/linux-test-project/ltp/subscription","commits_url":"https://api.github.com/repos/linux-test-project/ltp/commits{/sha}","git_commits_url":"https://api.github.com/repos/linux-test-project/ltp/git/commits{/sha}","comments_url":"https://api.github.com/repos/linux-test-project/ltp/comments{/number}","issue_comment_url":"https://api.github.com/repos/linux-test-project/ltp/issues/comments{/number}","contents_url":"https://api.github.com/repos/linux-test-project/ltp/contents/{+path}","compare_url":"https://api.github.com/repos/linux-test-project/ltp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linux-test-project/ltp/merges","archive_url":"https://api.github.com/repos/linux-test-project/ltp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linux-test-project/ltp/downloads","issues_url":"https://api.github.com/repos/linux-test-project/ltp/issues{/number}","pulls_url":"https://api.github.com/repos/linux-test-project/ltp/pulls{/number}","milestones_url":"https://api.github.com/repos/linux-test-project/ltp/milestones{/number}","notifications_url":"https://api.github.com/repos/linux-test-project/ltp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linux-test-project/ltp/labels{/name}","releases_url":"https://api.github.com/repos/linux-test-project/ltp/releases{/id}","deployments_url":"https://api.github.com/repos/linux-test-project/ltp/deployments","created_at":"2012-03-07T14:39:13Z","updated_at":"2018-11-30T19:37:28Z","pushed_at":"2018-12-03T07:09:53Z","git_url":"git://github.com/linux-test-project/ltp.git","ssh_url":"git@github.com:linux-test-project/ltp.git","clone_url":"https://github.com/linux-test-project/ltp.git","svn_url":"https://github.com/linux-test-project/ltp","homepage":"http://linux-test-project.github.io/","size":54638,"stargazers_count":894,"watchers_count":894,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":460,"mirror_url":null,"archived":false,"open_issues_count":150,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":460,"open_issues":150,"watchers":894,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linux-test-project/ltp/pulls/432"},"html":{"href":"https://github.com/linux-test-project/ltp/pull/432"},"issue":{"href":"https://api.github.com/repos/linux-test-project/ltp/issues/432"},"comments":{"href":"https://api.github.com/repos/linux-test-project/ltp/issues/432/comments"},"review_comments":{"href":"https://api.github.com/repos/linux-test-project/ltp/pulls/432/comments"},"review_comment":{"href":"https://api.github.com/repos/linux-test-project/ltp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linux-test-project/ltp/pulls/432/commits"},"statuses":{"href":"https://api.github.com/repos/linux-test-project/ltp/statuses/f3a196e5c716c704a8fb1c579e51dbc8f67f34d2"}},"author_association":"NONE"}}
{"actor":{"display_login":"avinash-palleti"}}