{"action":"created","comment":{"url":"https://api.github.com/repos/cvmfs/cvmfs/pulls/comments/26040692","id":26040692,"diff_hunk":"@@ -1181,3 +1188,125 @@ cp_usrbin() {\n     sudo chmod 0444 $f || return 3\n   done\n }\n+\n+\n+# waits until cvmfs is mounted\n+wait_fqrn_mount() {\n+  local waits=0\n+  while ! mount | grep \"/cvmfs/${FQRN}\" > /dev/null 2>&1; do\n+    waits=$(( waits + 1 ))\n+    if [ \"$waits\" -ge 10 ]; then\n+      die \"${FQRN} could not be mounted (not superuser?)\"\n+    fi\n+    sleep 1\n+  done\n+}\n+\n+\n+# runs the command once in order to get a warm cache\n+create_warm_cache() {\n+  local workspace=$1\n+  cvmfs2 -f -o config=cvmfs.conf,disable_watchdog,simple_options_parsing $FQRN /cvmfs/$FQRN &> /dev/null &\n+  wait_fqrn_mount\n+\n+  bash -c \"cvmfs_run_benchmark\" > /dev/null 2>&1\n+  umount /cvmfs/$FQRN\n+  return 0\n+}\n+\n+\n+# creates the default cvmfs.conf file for normal testing\n+#\n+# @param destination_file  absolute path of the directory\n+create_default_cvmfs_config() {\n+  local destination_directory=\"$1\"\n+  echo 'CVMFS_CACHE_BASE=/root/cvmfs_testing/cache\n+CVMFS_RELOAD_SOCKETS=/root/cvmfs_testing/cache\n+CVMFS_SERVER_URL=http://cvmfs-stratum-one.cern.ch/cvmfs/@fqrn@\n+CVMFS_SHARED_CACHE=no\n+CVMFS_HTTP_PROXY=http://ca-proxy.cern.ch:3128\n+CVMFS_AUTO_UPDATE=false' > $destination_directory/cvmfs.conf\n+}\n+\n+\n+# sets the valgrind options depending on the test type\n+#\n+# @param test_type  concrete test to execute\n+set_valgrind_options() {\n+  local CVMFS_OPT_CALLGRIND=\"--tool=callgrind --dump-before=fuse_session_loop_mt --dump-after=fuse_session_loop_mt --dsymutil=yes --log-file=${FQRN}.callgrind.log -v\"\n+  local CVMFS_OPT_MEMCHECK=\"--tool=memcheck --xml=yes --xml-file=${FQRN}.memcheck.xml --trace-children=yes --child-silent-after-fork=yes --leak-check=yes --log-file=${FQRN}.memcheck.log -v\"\n+  OPTIONS=\"\"\n+  case $CVMFS_OPT_TEST_TYPE in\n+    callgrind)\n+      OPTIONS=$CVMFS_OPT_CALLGRIND\n+    ;;\n+    memcheck)\n+      OPTIONS=$CVMFS_OPT_MEMCHECK\n+    ;;\n+  esac\n+}\n+\n+\n+# creates the environment to run the benchmark\n+#\n+# @param workspace  absolute path to the directory where the benchmark will put the files in\n+setup_benchmark_environment() {","path":"test/test_functions","position":80,"original_position":80,"commit_id":"1640d14f5da1aa42412e45d1fb71ac750177f609","original_commit_id":"1640d14f5da1aa42412e45d1fb71ac750177f609","user":{"login":"jblomer","id":1557360,"avatar_url":"https://avatars.githubusercontent.com/u/1557360?v=3","gravatar_id":"","url":"https://api.github.com/users/jblomer","html_url":"https://github.com/jblomer","followers_url":"https://api.github.com/users/jblomer/followers","following_url":"https://api.github.com/users/jblomer/following{/other_user}","gists_url":"https://api.github.com/users/jblomer/gists{/gist_id}","starred_url":"https://api.github.com/users/jblomer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jblomer/subscriptions","organizations_url":"https://api.github.com/users/jblomer/orgs","repos_url":"https://api.github.com/users/jblomer/repos","events_url":"https://api.github.com/users/jblomer/events{/privacy}","received_events_url":"https://api.github.com/users/jblomer/received_events","type":"User","site_admin":false},"body":"The /etc/mtab trick could be part of the setup, too.","created_at":"2015-03-09T14:45:00Z","updated_at":"2015-03-09T14:45:00Z","html_url":"https://github.com/cvmfs/cvmfs/pull/813#discussion_r26040692","pull_request_url":"https://api.github.com/repos/cvmfs/cvmfs/pulls/813","_links":{"self":{"href":"https://api.github.com/repos/cvmfs/cvmfs/pulls/comments/26040692"},"html":{"href":"https://github.com/cvmfs/cvmfs/pull/813#discussion_r26040692"},"pull_request":{"href":"https://api.github.com/repos/cvmfs/cvmfs/pulls/813"}}},"pull_request":{"url":"https://api.github.com/repos/cvmfs/cvmfs/pulls/813","id":30764655,"html_url":"https://github.com/cvmfs/cvmfs/pull/813","diff_url":"https://github.com/cvmfs/cvmfs/pull/813.diff","patch_url":"https://github.com/cvmfs/cvmfs/pull/813.patch","issue_url":"https://api.github.com/repos/cvmfs/cvmfs/issues/813","number":813,"state":"open","locked":false,"title":"Added benchmarks","user":{"login":"Moliholy","id":2722756,"avatar_url":"https://avatars.githubusercontent.com/u/2722756?v=3","gravatar_id":"","url":"https://api.github.com/users/Moliholy","html_url":"https://github.com/Moliholy","followers_url":"https://api.github.com/users/Moliholy/followers","following_url":"https://api.github.com/users/Moliholy/following{/other_user}","gists_url":"https://api.github.com/users/Moliholy/gists{/gist_id}","starred_url":"https://api.github.com/users/Moliholy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Moliholy/subscriptions","organizations_url":"https://api.github.com/users/Moliholy/orgs","repos_url":"https://api.github.com/users/Moliholy/repos","events_url":"https://api.github.com/users/Moliholy/events{/privacy}","received_events_url":"https://api.github.com/users/Moliholy/received_events","type":"User","site_admin":false},"body":"Added a benchmark_tests folder including the tests we've been dealing with. Modified run.sh and test_functions in consequence","created_at":"2015-03-09T14:28:50Z","updated_at":"2015-03-09T14:45:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8be3e926067ff8a3ddc295d5410677c39eb64d1c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cvmfs/cvmfs/pulls/813/commits","review_comments_url":"https://api.github.com/repos/cvmfs/cvmfs/pulls/813/comments","review_comment_url":"https://api.github.com/repos/cvmfs/cvmfs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cvmfs/cvmfs/issues/813/comments","statuses_url":"https://api.github.com/repos/cvmfs/cvmfs/statuses/1640d14f5da1aa42412e45d1fb71ac750177f609","head":{"label":"Moliholy:benchmark","ref":"benchmark","sha":"1640d14f5da1aa42412e45d1fb71ac750177f609","user":{"login":"Moliholy","id":2722756,"avatar_url":"https://avatars.githubusercontent.com/u/2722756?v=3","gravatar_id":"","url":"https://api.github.com/users/Moliholy","html_url":"https://github.com/Moliholy","followers_url":"https://api.github.com/users/Moliholy/followers","following_url":"https://api.github.com/users/Moliholy/following{/other_user}","gists_url":"https://api.github.com/users/Moliholy/gists{/gist_id}","starred_url":"https://api.github.com/users/Moliholy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Moliholy/subscriptions","organizations_url":"https://api.github.com/users/Moliholy/orgs","repos_url":"https://api.github.com/users/Moliholy/repos","events_url":"https://api.github.com/users/Moliholy/events{/privacy}","received_events_url":"https://api.github.com/users/Moliholy/received_events","type":"User","site_admin":false},"repo":{"id":30241604,"name":"cvmfs","full_name":"Moliholy/cvmfs","owner":{"login":"Moliholy","id":2722756,"avatar_url":"https://avatars.githubusercontent.com/u/2722756?v=3","gravatar_id":"","url":"https://api.github.com/users/Moliholy","html_url":"https://github.com/Moliholy","followers_url":"https://api.github.com/users/Moliholy/followers","following_url":"https://api.github.com/users/Moliholy/following{/other_user}","gists_url":"https://api.github.com/users/Moliholy/gists{/gist_id}","starred_url":"https://api.github.com/users/Moliholy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Moliholy/subscriptions","organizations_url":"https://api.github.com/users/Moliholy/orgs","repos_url":"https://api.github.com/users/Moliholy/repos","events_url":"https://api.github.com/users/Moliholy/events{/privacy}","received_events_url":"https://api.github.com/users/Moliholy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Moliholy/cvmfs","description":"The CernVM File System","fork":true,"url":"https://api.github.com/repos/Moliholy/cvmfs","forks_url":"https://api.github.com/repos/Moliholy/cvmfs/forks","keys_url":"https://api.github.com/repos/Moliholy/cvmfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Moliholy/cvmfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Moliholy/cvmfs/teams","hooks_url":"https://api.github.com/repos/Moliholy/cvmfs/hooks","issue_events_url":"https://api.github.com/repos/Moliholy/cvmfs/issues/events{/number}","events_url":"https://api.github.com/repos/Moliholy/cvmfs/events","assignees_url":"https://api.github.com/repos/Moliholy/cvmfs/assignees{/user}","branches_url":"https://api.github.com/repos/Moliholy/cvmfs/branches{/branch}","tags_url":"https://api.github.com/repos/Moliholy/cvmfs/tags","blobs_url":"https://api.github.com/repos/Moliholy/cvmfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Moliholy/cvmfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Moliholy/cvmfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/Moliholy/cvmfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Moliholy/cvmfs/statuses/{sha}","languages_url":"https://api.github.com/repos/Moliholy/cvmfs/languages","stargazers_url":"https://api.github.com/repos/Moliholy/cvmfs/stargazers","contributors_url":"https://api.github.com/repos/Moliholy/cvmfs/contributors","subscribers_url":"https://api.github.com/repos/Moliholy/cvmfs/subscribers","subscription_url":"https://api.github.com/repos/Moliholy/cvmfs/subscription","commits_url":"https://api.github.com/repos/Moliholy/cvmfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/Moliholy/cvmfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/Moliholy/cvmfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/Moliholy/cvmfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/Moliholy/cvmfs/contents/{+path}","compare_url":"https://api.github.com/repos/Moliholy/cvmfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Moliholy/cvmfs/merges","archive_url":"https://api.github.com/repos/Moliholy/cvmfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Moliholy/cvmfs/downloads","issues_url":"https://api.github.com/repos/Moliholy/cvmfs/issues{/number}","pulls_url":"https://api.github.com/repos/Moliholy/cvmfs/pulls{/number}","milestones_url":"https://api.github.com/repos/Moliholy/cvmfs/milestones{/number}","notifications_url":"https://api.github.com/repos/Moliholy/cvmfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Moliholy/cvmfs/labels{/name}","releases_url":"https://api.github.com/repos/Moliholy/cvmfs/releases{/id}","created_at":"2015-02-03T12:29:22Z","updated_at":"2015-02-25T17:09:27Z","pushed_at":"2015-03-09T14:24:32Z","git_url":"git://github.com/Moliholy/cvmfs.git","ssh_url":"git@github.com:Moliholy/cvmfs.git","clone_url":"https://github.com/Moliholy/cvmfs.git","svn_url":"https://github.com/Moliholy/cvmfs","homepage":"http://cernvm.cern.ch/portal/filesystem","size":88202,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"cvmfs:devel","ref":"devel","sha":"ed98585a0dd75dd3668f8e5907f43ac0dca34dec","user":{"login":"cvmfs","id":1560859,"avatar_url":"https://avatars.githubusercontent.com/u/1560859?v=3","gravatar_id":"","url":"https://api.github.com/users/cvmfs","html_url":"https://github.com/cvmfs","followers_url":"https://api.github.com/users/cvmfs/followers","following_url":"https://api.github.com/users/cvmfs/following{/other_user}","gists_url":"https://api.github.com/users/cvmfs/gists{/gist_id}","starred_url":"https://api.github.com/users/cvmfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cvmfs/subscriptions","organizations_url":"https://api.github.com/users/cvmfs/orgs","repos_url":"https://api.github.com/users/cvmfs/repos","events_url":"https://api.github.com/users/cvmfs/events{/privacy}","received_events_url":"https://api.github.com/users/cvmfs/received_events","type":"Organization","site_admin":false},"repo":{"id":3784908,"name":"cvmfs","full_name":"cvmfs/cvmfs","owner":{"login":"cvmfs","id":1560859,"avatar_url":"https://avatars.githubusercontent.com/u/1560859?v=3","gravatar_id":"","url":"https://api.github.com/users/cvmfs","html_url":"https://github.com/cvmfs","followers_url":"https://api.github.com/users/cvmfs/followers","following_url":"https://api.github.com/users/cvmfs/following{/other_user}","gists_url":"https://api.github.com/users/cvmfs/gists{/gist_id}","starred_url":"https://api.github.com/users/cvmfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cvmfs/subscriptions","organizations_url":"https://api.github.com/users/cvmfs/orgs","repos_url":"https://api.github.com/users/cvmfs/repos","events_url":"https://api.github.com/users/cvmfs/events{/privacy}","received_events_url":"https://api.github.com/users/cvmfs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cvmfs/cvmfs","description":"The CernVM File System","fork":false,"url":"https://api.github.com/repos/cvmfs/cvmfs","forks_url":"https://api.github.com/repos/cvmfs/cvmfs/forks","keys_url":"https://api.github.com/repos/cvmfs/cvmfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cvmfs/cvmfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cvmfs/cvmfs/teams","hooks_url":"https://api.github.com/repos/cvmfs/cvmfs/hooks","issue_events_url":"https://api.github.com/repos/cvmfs/cvmfs/issues/events{/number}","events_url":"https://api.github.com/repos/cvmfs/cvmfs/events","assignees_url":"https://api.github.com/repos/cvmfs/cvmfs/assignees{/user}","branches_url":"https://api.github.com/repos/cvmfs/cvmfs/branches{/branch}","tags_url":"https://api.github.com/repos/cvmfs/cvmfs/tags","blobs_url":"https://api.github.com/repos/cvmfs/cvmfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cvmfs/cvmfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cvmfs/cvmfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/cvmfs/cvmfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cvmfs/cvmfs/statuses/{sha}","languages_url":"https://api.github.com/repos/cvmfs/cvmfs/languages","stargazers_url":"https://api.github.com/repos/cvmfs/cvmfs/stargazers","contributors_url":"https://api.github.com/repos/cvmfs/cvmfs/contributors","subscribers_url":"https://api.github.com/repos/cvmfs/cvmfs/subscribers","subscription_url":"https://api.github.com/repos/cvmfs/cvmfs/subscription","commits_url":"https://api.github.com/repos/cvmfs/cvmfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/cvmfs/cvmfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/cvmfs/cvmfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/cvmfs/cvmfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/cvmfs/cvmfs/contents/{+path}","compare_url":"https://api.github.com/repos/cvmfs/cvmfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cvmfs/cvmfs/merges","archive_url":"https://api.github.com/repos/cvmfs/cvmfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cvmfs/cvmfs/downloads","issues_url":"https://api.github.com/repos/cvmfs/cvmfs/issues{/number}","pulls_url":"https://api.github.com/repos/cvmfs/cvmfs/pulls{/number}","milestones_url":"https://api.github.com/repos/cvmfs/cvmfs/milestones{/number}","notifications_url":"https://api.github.com/repos/cvmfs/cvmfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cvmfs/cvmfs/labels{/name}","releases_url":"https://api.github.com/repos/cvmfs/cvmfs/releases{/id}","created_at":"2012-03-21T09:10:41Z","updated_at":"2015-03-08T19:44:00Z","pushed_at":"2015-03-07T14:56:35Z","git_url":"git://github.com/cvmfs/cvmfs.git","ssh_url":"git@github.com:cvmfs/cvmfs.git","clone_url":"https://github.com/cvmfs/cvmfs.git","svn_url":"https://github.com/cvmfs/cvmfs","homepage":"http://cernvm.cern.ch/portal/filesystem","size":96024,"stargazers_count":32,"watchers_count":32,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":3,"forks":28,"open_issues":3,"watchers":32,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/cvmfs/cvmfs/pulls/813"},"html":{"href":"https://github.com/cvmfs/cvmfs/pull/813"},"issue":{"href":"https://api.github.com/repos/cvmfs/cvmfs/issues/813"},"comments":{"href":"https://api.github.com/repos/cvmfs/cvmfs/issues/813/comments"},"review_comments":{"href":"https://api.github.com/repos/cvmfs/cvmfs/pulls/813/comments"},"review_comment":{"href":"https://api.github.com/repos/cvmfs/cvmfs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cvmfs/cvmfs/pulls/813/commits"},"statuses":{"href":"https://api.github.com/repos/cvmfs/cvmfs/statuses/1640d14f5da1aa42412e45d1fb71ac750177f609"}}}}