{"action":"created","comment":{"url":"https://api.github.com/repos/viktormalik/diffkemp/pulls/comments/235403188","pull_request_review_id":177258864,"id":235403188,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTQwMzE4OA==","diff_hunk":"@@ -54,61 +58,53 @@ def __init__(self, spec):\n         else:\n             self.control_flow_only = False\n         self.debug = spec[\"debug\"] if \"debug\" in spec else False\n-        self.functions = spec[\"functions\"]\n+        self.function = spec[\"function\"]\n+        self.expected_result = spec[\"expected_result\"]\n \n \n def prepare_task(spec):\n     \"\"\"\n     Prepare testing task (scenario). Build old and new modules and copy\n     created files.\n     \"\"\"\n-    spec.built_functions = dict()\n-\n-    for function, desc in spec.functions.iteritems():\n-        # Find the modules\n-        first_builder = LlvmKernelBuilder(spec.old_kernel, None,\n-                                          debug=spec.debug)\n-        first_builder.source.build_cscope_database()\n-        second_builder = LlvmKernelBuilder(spec.new_kernel, None,\n-                                           debug=spec.debug)\n-        second_builder.source.build_cscope_database()\n-\n-        # Build the modules\n-        mod_first = first_builder.build_llvm_function(function)\n-        mod_second = second_builder.build_llvm_function(function)\n-\n-        # Add the function to the dictionary\n-        fun = (function, mod_first, mod_second)\n-        spec.built_functions[fun] = Result[desc.upper()]\n-\n-        # The modules were already built when finding their sources.\n-        # Now the files need only to be copied to the right place.\n-        #\n-        # Note: the files are copied to the task directory for reference only.\n-        # The exact name of the module is not known before building the\n-        # function, therefore building from module sources in kernel_modules or\n-        # using already built LLVM IR files is not possible.\n-        mod_path_old = mod_first.llvm\n-        mod_path_new = mod_second.llvm\n-        mod_old = os.path.basename(mod_first.name)\n-        mod_new = os.path.basename(mod_second.name)\n-        task_dir = os.path.join(tasks_path, mod_old)\n-        if not os.path.isdir(tasks_path):\n-            os.mkdir(tasks_path)\n-        if not os.path.isdir(task_dir):\n-            os.mkdir(task_dir)\n-        old_src = os.path.join(task_dir, mod_old + \"_old.c\")\n-        new_src = os.path.join(task_dir, mod_new + \"_new.c\")\n-        old_llvm = os.path.join(task_dir, mod_old + \"_old.ll\")\n-        new_llvm = os.path.join(task_dir, mod_new + \"_new.ll\")\n-        old_source_src = os.path.splitext(mod_path_old)[0] + \".c\"\n-        new_source_src = os.path.splitext(mod_path_new)[0] + \".c\"\n-\n-        shutil.copyfile(mod_path_old, old_llvm)\n-        shutil.copyfile(old_source_src, old_src)\n-\n-        shutil.copyfile(mod_path_new, new_llvm)\n-        shutil.copyfile(new_source_src, new_src)\n+    # Find the modules\n+    first_builder = LlvmKernelBuilder(spec.old_kernel, None,\n+                                      debug=spec.debug)\n+    second_builder = LlvmKernelBuilder(spec.new_kernel, None,\n+                                       debug=spec.debug)\n+\n+    # Build the modules\n+    old_module = first_builder.build_file_for_function(spec.function)\n+    new_module = second_builder.build_file_for_function(spec.function)\n+\n+    # The modules were already built when finding their sources.\n+    # Now the files need only to be copied to the right place.\n+    #\n+    # Note: the files are copied to the task directory for reference only.\n+    # The exact name of the module is not known before building the\n+    # function, therefore building from module sources in kernel_modules or\n+    # using already built LLVM IR files is not possible.\n+    mod_old = os.path.basename(old_module.name)\n+    mod_new = os.path.basename(new_module.name)\n+    spec.task_dir = os.path.join(tasks_path, spec.function)\n+    if not os.path.isdir(tasks_path):\n+        os.mkdir(tasks_path)","path":"tests/regression/diffkabi/diffkabi_test.py","position":91,"original_position":123,"commit_id":"4afbd5fa1824a229d4be42eb22913298c82600b9","original_commit_id":"4afbd5fa1824a229d4be42eb22913298c82600b9","user":{"login":"viktormalik","id":7603704,"node_id":"MDQ6VXNlcjc2MDM3MDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/7603704?v=4","gravatar_id":"","url":"https://api.github.com/users/viktormalik","html_url":"https://github.com/viktormalik","followers_url":"https://api.github.com/users/viktormalik/followers","following_url":"https://api.github.com/users/viktormalik/following{/other_user}","gists_url":"https://api.github.com/users/viktormalik/gists{/gist_id}","starred_url":"https://api.github.com/users/viktormalik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viktormalik/subscriptions","organizations_url":"https://api.github.com/users/viktormalik/orgs","repos_url":"https://api.github.com/users/viktormalik/repos","events_url":"https://api.github.com/users/viktormalik/events{/privacy}","received_events_url":"https://api.github.com/users/viktormalik/received_events","type":"User","site_admin":false},"body":"I see, then let's do this somewhere else, so that we don't have to check its existence in each test spec.","created_at":"2018-11-21T14:16:20Z","updated_at":"2018-11-21T14:21:36Z","html_url":"https://github.com/viktormalik/diffkemp/pull/15#discussion_r235403188","pull_request_url":"https://api.github.com/repos/viktormalik/diffkemp/pulls/15","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/viktormalik/diffkemp/pulls/comments/235403188"},"html":{"href":"https://github.com/viktormalik/diffkemp/pull/15#discussion_r235403188"},"pull_request":{"href":"https://api.github.com/repos/viktormalik/diffkemp/pulls/15"}},"in_reply_to_id":235389196},"pull_request":{"url":"https://api.github.com/repos/viktormalik/diffkemp/pulls/15","id":231213939,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxMjEzOTM5","html_url":"https://github.com/viktormalik/diffkemp/pull/15","diff_url":"https://github.com/viktormalik/diffkemp/pull/15.diff","patch_url":"https://github.com/viktormalik/diffkemp/pull/15.patch","issue_url":"https://api.github.com/repos/viktormalik/diffkemp/issues/15","number":15,"state":"open","locked":false,"title":"Added regression tests for diffkabi.","user":{"login":"lenticularis39","id":1266171,"node_id":"MDQ6VXNlcjEyNjYxNzE=","avatar_url":"https://avatars3.githubusercontent.com/u/1266171?v=4","gravatar_id":"","url":"https://api.github.com/users/lenticularis39","html_url":"https://github.com/lenticularis39","followers_url":"https://api.github.com/users/lenticularis39/followers","following_url":"https://api.github.com/users/lenticularis39/following{/other_user}","gists_url":"https://api.github.com/users/lenticularis39/gists{/gist_id}","starred_url":"https://api.github.com/users/lenticularis39/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lenticularis39/subscriptions","organizations_url":"https://api.github.com/users/lenticularis39/orgs","repos_url":"https://api.github.com/users/lenticularis39/repos","events_url":"https://api.github.com/users/lenticularis39/events{/privacy}","received_events_url":"https://api.github.com/users/lenticularis39/received_events","type":"User","site_admin":false},"body":"Also moved building functions from diffkabi.py to build_llvm.py (as a function of LlvmKernelBuilder).","created_at":"2018-11-15T14:30:13Z","updated_at":"2018-11-21T14:21:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"68d1defb9127db89d1f737607c91e8a3eca187df","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/viktormalik/diffkemp/pulls/15/commits","review_comments_url":"https://api.github.com/repos/viktormalik/diffkemp/pulls/15/comments","review_comment_url":"https://api.github.com/repos/viktormalik/diffkemp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/viktormalik/diffkemp/issues/15/comments","statuses_url":"https://api.github.com/repos/viktormalik/diffkemp/statuses/4afbd5fa1824a229d4be42eb22913298c82600b9","head":{"label":"lenticularis39:diffkabi-separate-tests_new","ref":"diffkabi-separate-tests_new","sha":"4afbd5fa1824a229d4be42eb22913298c82600b9","user":{"login":"lenticularis39","id":1266171,"node_id":"MDQ6VXNlcjEyNjYxNzE=","avatar_url":"https://avatars3.githubusercontent.com/u/1266171?v=4","gravatar_id":"","url":"https://api.github.com/users/lenticularis39","html_url":"https://github.com/lenticularis39","followers_url":"https://api.github.com/users/lenticularis39/followers","following_url":"https://api.github.com/users/lenticularis39/following{/other_user}","gists_url":"https://api.github.com/users/lenticularis39/gists{/gist_id}","starred_url":"https://api.github.com/users/lenticularis39/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lenticularis39/subscriptions","organizations_url":"https://api.github.com/users/lenticularis39/orgs","repos_url":"https://api.github.com/users/lenticularis39/repos","events_url":"https://api.github.com/users/lenticularis39/events{/privacy}","received_events_url":"https://api.github.com/users/lenticularis39/received_events","type":"User","site_admin":false},"repo":{"id":141128335,"node_id":"MDEwOlJlcG9zaXRvcnkxNDExMjgzMzU=","name":"diffkemp","full_name":"lenticularis39/diffkemp","private":false,"owner":{"login":"lenticularis39","id":1266171,"node_id":"MDQ6VXNlcjEyNjYxNzE=","avatar_url":"https://avatars3.githubusercontent.com/u/1266171?v=4","gravatar_id":"","url":"https://api.github.com/users/lenticularis39","html_url":"https://github.com/lenticularis39","followers_url":"https://api.github.com/users/lenticularis39/followers","following_url":"https://api.github.com/users/lenticularis39/following{/other_user}","gists_url":"https://api.github.com/users/lenticularis39/gists{/gist_id}","starred_url":"https://api.github.com/users/lenticularis39/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lenticularis39/subscriptions","organizations_url":"https://api.github.com/users/lenticularis39/orgs","repos_url":"https://api.github.com/users/lenticularis39/repos","events_url":"https://api.github.com/users/lenticularis39/events{/privacy}","received_events_url":"https://api.github.com/users/lenticularis39/received_events","type":"User","site_admin":false},"html_url":"https://github.com/lenticularis39/diffkemp","description":"Automatic static analysis of semantic difference of kernel module parameters.","fork":true,"url":"https://api.github.com/repos/lenticularis39/diffkemp","forks_url":"https://api.github.com/repos/lenticularis39/diffkemp/forks","keys_url":"https://api.github.com/repos/lenticularis39/diffkemp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lenticularis39/diffkemp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lenticularis39/diffkemp/teams","hooks_url":"https://api.github.com/repos/lenticularis39/diffkemp/hooks","issue_events_url":"https://api.github.com/repos/lenticularis39/diffkemp/issues/events{/number}","events_url":"https://api.github.com/repos/lenticularis39/diffkemp/events","assignees_url":"https://api.github.com/repos/lenticularis39/diffkemp/assignees{/user}","branches_url":"https://api.github.com/repos/lenticularis39/diffkemp/branches{/branch}","tags_url":"https://api.github.com/repos/lenticularis39/diffkemp/tags","blobs_url":"https://api.github.com/repos/lenticularis39/diffkemp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lenticularis39/diffkemp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lenticularis39/diffkemp/git/refs{/sha}","trees_url":"https://api.github.com/repos/lenticularis39/diffkemp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lenticularis39/diffkemp/statuses/{sha}","languages_url":"https://api.github.com/repos/lenticularis39/diffkemp/languages","stargazers_url":"https://api.github.com/repos/lenticularis39/diffkemp/stargazers","contributors_url":"https://api.github.com/repos/lenticularis39/diffkemp/contributors","subscribers_url":"https://api.github.com/repos/lenticularis39/diffkemp/subscribers","subscription_url":"https://api.github.com/repos/lenticularis39/diffkemp/subscription","commits_url":"https://api.github.com/repos/lenticularis39/diffkemp/commits{/sha}","git_commits_url":"https://api.github.com/repos/lenticularis39/diffkemp/git/commits{/sha}","comments_url":"https://api.github.com/repos/lenticularis39/diffkemp/comments{/number}","issue_comment_url":"https://api.github.com/repos/lenticularis39/diffkemp/issues/comments{/number}","contents_url":"https://api.github.com/repos/lenticularis39/diffkemp/contents/{+path}","compare_url":"https://api.github.com/repos/lenticularis39/diffkemp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lenticularis39/diffkemp/merges","archive_url":"https://api.github.com/repos/lenticularis39/diffkemp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lenticularis39/diffkemp/downloads","issues_url":"https://api.github.com/repos/lenticularis39/diffkemp/issues{/number}","pulls_url":"https://api.github.com/repos/lenticularis39/diffkemp/pulls{/number}","milestones_url":"https://api.github.com/repos/lenticularis39/diffkemp/milestones{/number}","notifications_url":"https://api.github.com/repos/lenticularis39/diffkemp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lenticularis39/diffkemp/labels{/name}","releases_url":"https://api.github.com/repos/lenticularis39/diffkemp/releases{/id}","deployments_url":"https://api.github.com/repos/lenticularis39/diffkemp/deployments","created_at":"2018-07-16T11:15:41Z","updated_at":"2018-11-21T13:09:06Z","pushed_at":"2018-11-21T13:31:31Z","git_url":"git://github.com/lenticularis39/diffkemp.git","ssh_url":"git@github.com:lenticularis39/diffkemp.git","clone_url":"https://github.com/lenticularis39/diffkemp.git","svn_url":"https://github.com/lenticularis39/diffkemp","homepage":"","size":47007,"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":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"viktormalik:master","ref":"master","sha":"b992b53a6b834156e19945bf7da6557714cc310c","user":{"login":"viktormalik","id":7603704,"node_id":"MDQ6VXNlcjc2MDM3MDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/7603704?v=4","gravatar_id":"","url":"https://api.github.com/users/viktormalik","html_url":"https://github.com/viktormalik","followers_url":"https://api.github.com/users/viktormalik/followers","following_url":"https://api.github.com/users/viktormalik/following{/other_user}","gists_url":"https://api.github.com/users/viktormalik/gists{/gist_id}","starred_url":"https://api.github.com/users/viktormalik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viktormalik/subscriptions","organizations_url":"https://api.github.com/users/viktormalik/orgs","repos_url":"https://api.github.com/users/viktormalik/repos","events_url":"https://api.github.com/users/viktormalik/events{/privacy}","received_events_url":"https://api.github.com/users/viktormalik/received_events","type":"User","site_admin":false},"repo":{"id":114360782,"node_id":"MDEwOlJlcG9zaXRvcnkxMTQzNjA3ODI=","name":"diffkemp","full_name":"viktormalik/diffkemp","private":false,"owner":{"login":"viktormalik","id":7603704,"node_id":"MDQ6VXNlcjc2MDM3MDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/7603704?v=4","gravatar_id":"","url":"https://api.github.com/users/viktormalik","html_url":"https://github.com/viktormalik","followers_url":"https://api.github.com/users/viktormalik/followers","following_url":"https://api.github.com/users/viktormalik/following{/other_user}","gists_url":"https://api.github.com/users/viktormalik/gists{/gist_id}","starred_url":"https://api.github.com/users/viktormalik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viktormalik/subscriptions","organizations_url":"https://api.github.com/users/viktormalik/orgs","repos_url":"https://api.github.com/users/viktormalik/repos","events_url":"https://api.github.com/users/viktormalik/events{/privacy}","received_events_url":"https://api.github.com/users/viktormalik/received_events","type":"User","site_admin":false},"html_url":"https://github.com/viktormalik/diffkemp","description":"Automatic static analysis of semantic difference of kernel configuration options","fork":false,"url":"https://api.github.com/repos/viktormalik/diffkemp","forks_url":"https://api.github.com/repos/viktormalik/diffkemp/forks","keys_url":"https://api.github.com/repos/viktormalik/diffkemp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/viktormalik/diffkemp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/viktormalik/diffkemp/teams","hooks_url":"https://api.github.com/repos/viktormalik/diffkemp/hooks","issue_events_url":"https://api.github.com/repos/viktormalik/diffkemp/issues/events{/number}","events_url":"https://api.github.com/repos/viktormalik/diffkemp/events","assignees_url":"https://api.github.com/repos/viktormalik/diffkemp/assignees{/user}","branches_url":"https://api.github.com/repos/viktormalik/diffkemp/branches{/branch}","tags_url":"https://api.github.com/repos/viktormalik/diffkemp/tags","blobs_url":"https://api.github.com/repos/viktormalik/diffkemp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/viktormalik/diffkemp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/viktormalik/diffkemp/git/refs{/sha}","trees_url":"https://api.github.com/repos/viktormalik/diffkemp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/viktormalik/diffkemp/statuses/{sha}","languages_url":"https://api.github.com/repos/viktormalik/diffkemp/languages","stargazers_url":"https://api.github.com/repos/viktormalik/diffkemp/stargazers","contributors_url":"https://api.github.com/repos/viktormalik/diffkemp/contributors","subscribers_url":"https://api.github.com/repos/viktormalik/diffkemp/subscribers","subscription_url":"https://api.github.com/repos/viktormalik/diffkemp/subscription","commits_url":"https://api.github.com/repos/viktormalik/diffkemp/commits{/sha}","git_commits_url":"https://api.github.com/repos/viktormalik/diffkemp/git/commits{/sha}","comments_url":"https://api.github.com/repos/viktormalik/diffkemp/comments{/number}","issue_comment_url":"https://api.github.com/repos/viktormalik/diffkemp/issues/comments{/number}","contents_url":"https://api.github.com/repos/viktormalik/diffkemp/contents/{+path}","compare_url":"https://api.github.com/repos/viktormalik/diffkemp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/viktormalik/diffkemp/merges","archive_url":"https://api.github.com/repos/viktormalik/diffkemp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/viktormalik/diffkemp/downloads","issues_url":"https://api.github.com/repos/viktormalik/diffkemp/issues{/number}","pulls_url":"https://api.github.com/repos/viktormalik/diffkemp/pulls{/number}","milestones_url":"https://api.github.com/repos/viktormalik/diffkemp/milestones{/number}","notifications_url":"https://api.github.com/repos/viktormalik/diffkemp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/viktormalik/diffkemp/labels{/name}","releases_url":"https://api.github.com/repos/viktormalik/diffkemp/releases{/id}","deployments_url":"https://api.github.com/repos/viktormalik/diffkemp/deployments","created_at":"2017-12-15T10:53:40Z","updated_at":"2018-11-21T08:09:35Z","pushed_at":"2018-11-21T13:31:32Z","git_url":"git://github.com/viktormalik/diffkemp.git","ssh_url":"git@github.com:viktormalik/diffkemp.git","clone_url":"https://github.com/viktormalik/diffkemp.git","svn_url":"https://github.com/viktormalik/diffkemp","homepage":"","size":46924,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/viktormalik/diffkemp/pulls/15"},"html":{"href":"https://github.com/viktormalik/diffkemp/pull/15"},"issue":{"href":"https://api.github.com/repos/viktormalik/diffkemp/issues/15"},"comments":{"href":"https://api.github.com/repos/viktormalik/diffkemp/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/viktormalik/diffkemp/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/viktormalik/diffkemp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/viktormalik/diffkemp/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/viktormalik/diffkemp/statuses/4afbd5fa1824a229d4be42eb22913298c82600b9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"viktormalik"}}