{"comment":{"url":"https://api.github.com/repos/dachary/ceph/comments/11229380","html_url":"https://github.com/dachary/ceph/commit/a8d4fb4c8786bc937e119a8f93d7ab75b129a7ec#commitcomment-11229380","id":11229380,"user":{"login":"dachary","id":433594,"avatar_url":"https://avatars.githubusercontent.com/u/433594?v=3","gravatar_id":"","url":"https://api.github.com/users/dachary","html_url":"https://github.com/dachary","followers_url":"https://api.github.com/users/dachary/followers","following_url":"https://api.github.com/users/dachary/following{/other_user}","gists_url":"https://api.github.com/users/dachary/gists{/gist_id}","starred_url":"https://api.github.com/users/dachary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dachary/subscriptions","organizations_url":"https://api.github.com/users/dachary/orgs","repos_url":"https://api.github.com/users/dachary/repos","events_url":"https://api.github.com/users/dachary/events{/privacy}","received_events_url":"https://api.github.com/users/dachary/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"a8d4fb4c8786bc937e119a8f93d7ab75b129a7ec","created_at":"2015-05-17T10:25:09Z","updated_at":"2015-05-17T10:25:09Z","body":"Oh, now I remember why it's there. The error handling pattern for all tests is to return 1 when something unexpected happens, which means the teardown function at the end of the test is not called when doing so. Such tests rely on the caller to properly cleanup when there is a problem, which makes tests a little easier to write. The main function can be relied on to cleanup everything. To avoid calling teardown twice, we could not call it when the return code is 0 and only call it when the return code is 1. However that subtle distinction will probably be lost on most developers and reviewers. Since the only drawback for having the teardown called all the time is a performance loss, I think it's a small price to pay for having a consistent behavior.\r\n\r\nThe **setup** call is however entirely redudant and has no advantage, I'll remove it."}}