{"action":"opened","number":66,"pull_request":{"url":"https://api.github.com/repos/softdevteam/krun/pulls/66","id":48440458,"html_url":"https://github.com/softdevteam/krun/pull/66","diff_url":"https://github.com/softdevteam/krun/pull/66.diff","patch_url":"https://github.com/softdevteam/krun/pull/66.patch","issue_url":"https://api.github.com/repos/softdevteam/krun/issues/66","number":66,"state":"open","locked":false,"title":"Run as a different user.","user":{"login":"vext01","id":604955,"avatar_url":"https://avatars.githubusercontent.com/u/604955?v=3","gravatar_id":"","url":"https://api.github.com/users/vext01","html_url":"https://github.com/vext01","followers_url":"https://api.github.com/users/vext01/followers","following_url":"https://api.github.com/users/vext01/following{/other_user}","gists_url":"https://api.github.com/users/vext01/gists{/gist_id}","starred_url":"https://api.github.com/users/vext01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vext01/subscriptions","organizations_url":"https://api.github.com/users/vext01/orgs","repos_url":"https://api.github.com/users/vext01/repos","events_url":"https://api.github.com/users/vext01/events{/privacy}","received_events_url":"https://api.github.com/users/vext01/received_events","type":"User","site_admin":false},"body":"In doing so, move process priority change code to platform.py. It occurs to me that `nice` is a unix utility, and should we (god forbid) ever need this to work on windows, we will be forced to think about what to do thanks to `ABCMeta` abstract methods.\r\n\r\nAlso adds a sanity check for the user change.\r\n\r\nA typical benchmark invocation looks like this now:\r\n```\r\n[2015-10-22 11:20:10 DEBUG] cmdline='sudo -u krun nice -20 taskset 0x2 env LD_LIBRARY_PATH=/home/vext01/research/warmup_experiment/krun/krun/../libkruntime work/pypy/pypy/goal/pypy-c /home/vext01/research/warmup_experiment/krun/iterations_runners/iterations_runner.py /home/vext01/research/warmup_experiment/benchmarks/nbody/python/bench.py 2 3'\r\n[2015-10-22 11:20:10 DEBUG] env='{}'\r\n```\r\n\r\nNote the now empty environment (prior to`sudo`) and the use of `sudo` to switch user. `LD_LIBRARY_PATH` is needed so the VMs can pick up my implementation of `clock_gettime_monotonic()` in `libkruntime`.\r\n\r\nLooks OK?","created_at":"2015-10-22T10:23:30Z","updated_at":"2015-10-22T10:23:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"snim2","id":97674,"avatar_url":"https://avatars.githubusercontent.com/u/97674?v=3","gravatar_id":"","url":"https://api.github.com/users/snim2","html_url":"https://github.com/snim2","followers_url":"https://api.github.com/users/snim2/followers","following_url":"https://api.github.com/users/snim2/following{/other_user}","gists_url":"https://api.github.com/users/snim2/gists{/gist_id}","starred_url":"https://api.github.com/users/snim2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snim2/subscriptions","organizations_url":"https://api.github.com/users/snim2/orgs","repos_url":"https://api.github.com/users/snim2/repos","events_url":"https://api.github.com/users/snim2/events{/privacy}","received_events_url":"https://api.github.com/users/snim2/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/softdevteam/krun/pulls/66/commits","review_comments_url":"https://api.github.com/repos/softdevteam/krun/pulls/66/comments","review_comment_url":"https://api.github.com/repos/softdevteam/krun/pulls/comments{/number}","comments_url":"https://api.github.com/repos/softdevteam/krun/issues/66/comments","statuses_url":"https://api.github.com/repos/softdevteam/krun/statuses/9424413951398d8a18c5b8e5b9c3e4e86ebd2eb8","head":{"label":"softdevteam:krun_user","ref":"krun_user","sha":"9424413951398d8a18c5b8e5b9c3e4e86ebd2eb8","user":{"login":"softdevteam","id":10271085,"avatar_url":"https://avatars.githubusercontent.com/u/10271085?v=3","gravatar_id":"","url":"https://api.github.com/users/softdevteam","html_url":"https://github.com/softdevteam","followers_url":"https://api.github.com/users/softdevteam/followers","following_url":"https://api.github.com/users/softdevteam/following{/other_user}","gists_url":"https://api.github.com/users/softdevteam/gists{/gist_id}","starred_url":"https://api.github.com/users/softdevteam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/softdevteam/subscriptions","organizations_url":"https://api.github.com/users/softdevteam/orgs","repos_url":"https://api.github.com/users/softdevteam/repos","events_url":"https://api.github.com/users/softdevteam/events{/privacy}","received_events_url":"https://api.github.com/users/softdevteam/received_events","type":"Organization","site_admin":false},"repo":{"id":36661834,"name":"krun","full_name":"softdevteam/krun","owner":{"login":"softdevteam","id":10271085,"avatar_url":"https://avatars.githubusercontent.com/u/10271085?v=3","gravatar_id":"","url":"https://api.github.com/users/softdevteam","html_url":"https://github.com/softdevteam","followers_url":"https://api.github.com/users/softdevteam/followers","following_url":"https://api.github.com/users/softdevteam/following{/other_user}","gists_url":"https://api.github.com/users/softdevteam/gists{/gist_id}","starred_url":"https://api.github.com/users/softdevteam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/softdevteam/subscriptions","organizations_url":"https://api.github.com/users/softdevteam/orgs","repos_url":"https://api.github.com/users/softdevteam/repos","events_url":"https://api.github.com/users/softdevteam/events{/privacy}","received_events_url":"https://api.github.com/users/softdevteam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/softdevteam/krun","description":"Soft-dev kalibera benchmark runner in Python.","fork":false,"url":"https://api.github.com/repos/softdevteam/krun","forks_url":"https://api.github.com/repos/softdevteam/krun/forks","keys_url":"https://api.github.com/repos/softdevteam/krun/keys{/key_id}","collaborators_url":"https://api.github.com/repos/softdevteam/krun/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/softdevteam/krun/teams","hooks_url":"https://api.github.com/repos/softdevteam/krun/hooks","issue_events_url":"https://api.github.com/repos/softdevteam/krun/issues/events{/number}","events_url":"https://api.github.com/repos/softdevteam/krun/events","assignees_url":"https://api.github.com/repos/softdevteam/krun/assignees{/user}","branches_url":"https://api.github.com/repos/softdevteam/krun/branches{/branch}","tags_url":"https://api.github.com/repos/softdevteam/krun/tags","blobs_url":"https://api.github.com/repos/softdevteam/krun/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/softdevteam/krun/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/softdevteam/krun/git/refs{/sha}","trees_url":"https://api.github.com/repos/softdevteam/krun/git/trees{/sha}","statuses_url":"https://api.github.com/repos/softdevteam/krun/statuses/{sha}","languages_url":"https://api.github.com/repos/softdevteam/krun/languages","stargazers_url":"https://api.github.com/repos/softdevteam/krun/stargazers","contributors_url":"https://api.github.com/repos/softdevteam/krun/contributors","subscribers_url":"https://api.github.com/repos/softdevteam/krun/subscribers","subscription_url":"https://api.github.com/repos/softdevteam/krun/subscription","commits_url":"https://api.github.com/repos/softdevteam/krun/commits{/sha}","git_commits_url":"https://api.github.com/repos/softdevteam/krun/git/commits{/sha}","comments_url":"https://api.github.com/repos/softdevteam/krun/comments{/number}","issue_comment_url":"https://api.github.com/repos/softdevteam/krun/issues/comments{/number}","contents_url":"https://api.github.com/repos/softdevteam/krun/contents/{+path}","compare_url":"https://api.github.com/repos/softdevteam/krun/compare/{base}...{head}","merges_url":"https://api.github.com/repos/softdevteam/krun/merges","archive_url":"https://api.github.com/repos/softdevteam/krun/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/softdevteam/krun/downloads","issues_url":"https://api.github.com/repos/softdevteam/krun/issues{/number}","pulls_url":"https://api.github.com/repos/softdevteam/krun/pulls{/number}","milestones_url":"https://api.github.com/repos/softdevteam/krun/milestones{/number}","notifications_url":"https://api.github.com/repos/softdevteam/krun/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/softdevteam/krun/labels{/name}","releases_url":"https://api.github.com/repos/softdevteam/krun/releases{/id}","created_at":"2015-06-01T13:17:06Z","updated_at":"2015-09-28T18:29:45Z","pushed_at":"2015-10-22T10:16:47Z","git_url":"git://github.com/softdevteam/krun.git","ssh_url":"git@github.com:softdevteam/krun.git","clone_url":"https://github.com/softdevteam/krun.git","svn_url":"https://github.com/softdevteam/krun","homepage":null,"size":764,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":12,"forks":0,"open_issues":12,"watchers":1,"default_branch":"master"}},"base":{"label":"softdevteam:master","ref":"master","sha":"9c6a40695345a549c2300f1313e698ecfd8935f7","user":{"login":"softdevteam","id":10271085,"avatar_url":"https://avatars.githubusercontent.com/u/10271085?v=3","gravatar_id":"","url":"https://api.github.com/users/softdevteam","html_url":"https://github.com/softdevteam","followers_url":"https://api.github.com/users/softdevteam/followers","following_url":"https://api.github.com/users/softdevteam/following{/other_user}","gists_url":"https://api.github.com/users/softdevteam/gists{/gist_id}","starred_url":"https://api.github.com/users/softdevteam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/softdevteam/subscriptions","organizations_url":"https://api.github.com/users/softdevteam/orgs","repos_url":"https://api.github.com/users/softdevteam/repos","events_url":"https://api.github.com/users/softdevteam/events{/privacy}","received_events_url":"https://api.github.com/users/softdevteam/received_events","type":"Organization","site_admin":false},"repo":{"id":36661834,"name":"krun","full_name":"softdevteam/krun","owner":{"login":"softdevteam","id":10271085,"avatar_url":"https://avatars.githubusercontent.com/u/10271085?v=3","gravatar_id":"","url":"https://api.github.com/users/softdevteam","html_url":"https://github.com/softdevteam","followers_url":"https://api.github.com/users/softdevteam/followers","following_url":"https://api.github.com/users/softdevteam/following{/other_user}","gists_url":"https://api.github.com/users/softdevteam/gists{/gist_id}","starred_url":"https://api.github.com/users/softdevteam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/softdevteam/subscriptions","organizations_url":"https://api.github.com/users/softdevteam/orgs","repos_url":"https://api.github.com/users/softdevteam/repos","events_url":"https://api.github.com/users/softdevteam/events{/privacy}","received_events_url":"https://api.github.com/users/softdevteam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/softdevteam/krun","description":"Soft-dev kalibera benchmark runner in Python.","fork":false,"url":"https://api.github.com/repos/softdevteam/krun","forks_url":"https://api.github.com/repos/softdevteam/krun/forks","keys_url":"https://api.github.com/repos/softdevteam/krun/keys{/key_id}","collaborators_url":"https://api.github.com/repos/softdevteam/krun/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/softdevteam/krun/teams","hooks_url":"https://api.github.com/repos/softdevteam/krun/hooks","issue_events_url":"https://api.github.com/repos/softdevteam/krun/issues/events{/number}","events_url":"https://api.github.com/repos/softdevteam/krun/events","assignees_url":"https://api.github.com/repos/softdevteam/krun/assignees{/user}","branches_url":"https://api.github.com/repos/softdevteam/krun/branches{/branch}","tags_url":"https://api.github.com/repos/softdevteam/krun/tags","blobs_url":"https://api.github.com/repos/softdevteam/krun/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/softdevteam/krun/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/softdevteam/krun/git/refs{/sha}","trees_url":"https://api.github.com/repos/softdevteam/krun/git/trees{/sha}","statuses_url":"https://api.github.com/repos/softdevteam/krun/statuses/{sha}","languages_url":"https://api.github.com/repos/softdevteam/krun/languages","stargazers_url":"https://api.github.com/repos/softdevteam/krun/stargazers","contributors_url":"https://api.github.com/repos/softdevteam/krun/contributors","subscribers_url":"https://api.github.com/repos/softdevteam/krun/subscribers","subscription_url":"https://api.github.com/repos/softdevteam/krun/subscription","commits_url":"https://api.github.com/repos/softdevteam/krun/commits{/sha}","git_commits_url":"https://api.github.com/repos/softdevteam/krun/git/commits{/sha}","comments_url":"https://api.github.com/repos/softdevteam/krun/comments{/number}","issue_comment_url":"https://api.github.com/repos/softdevteam/krun/issues/comments{/number}","contents_url":"https://api.github.com/repos/softdevteam/krun/contents/{+path}","compare_url":"https://api.github.com/repos/softdevteam/krun/compare/{base}...{head}","merges_url":"https://api.github.com/repos/softdevteam/krun/merges","archive_url":"https://api.github.com/repos/softdevteam/krun/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/softdevteam/krun/downloads","issues_url":"https://api.github.com/repos/softdevteam/krun/issues{/number}","pulls_url":"https://api.github.com/repos/softdevteam/krun/pulls{/number}","milestones_url":"https://api.github.com/repos/softdevteam/krun/milestones{/number}","notifications_url":"https://api.github.com/repos/softdevteam/krun/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/softdevteam/krun/labels{/name}","releases_url":"https://api.github.com/repos/softdevteam/krun/releases{/id}","created_at":"2015-06-01T13:17:06Z","updated_at":"2015-09-28T18:29:45Z","pushed_at":"2015-10-22T10:16:47Z","git_url":"git://github.com/softdevteam/krun.git","ssh_url":"git@github.com:softdevteam/krun.git","clone_url":"https://github.com/softdevteam/krun.git","svn_url":"https://github.com/softdevteam/krun","homepage":null,"size":764,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":12,"forks":0,"open_issues":12,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/softdevteam/krun/pulls/66"},"html":{"href":"https://github.com/softdevteam/krun/pull/66"},"issue":{"href":"https://api.github.com/repos/softdevteam/krun/issues/66"},"comments":{"href":"https://api.github.com/repos/softdevteam/krun/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/softdevteam/krun/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/softdevteam/krun/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/softdevteam/krun/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/softdevteam/krun/statuses/9424413951398d8a18c5b8e5b9c3e4e86ebd2eb8"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":128,"deletions":30,"changed_files":4}}