From reviews-return-49353-apmail-mesos-reviews-archive=mesos.apache.org@mesos.apache.org Thu Nov 3 04:27:31 2016 Return-Path: X-Original-To: apmail-mesos-reviews-archive@minotaur.apache.org Delivered-To: apmail-mesos-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 80B1419205 for ; Thu, 3 Nov 2016 04:27:31 +0000 (UTC) Received: (qmail 75457 invoked by uid 500); 3 Nov 2016 04:27:31 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 75425 invoked by uid 500); 3 Nov 2016 04:27:31 -0000 Mailing-List: contact reviews-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@mesos.apache.org Delivered-To: mailing list reviews@mesos.apache.org Received: (qmail 75411 invoked by uid 99); 3 Nov 2016 04:27:31 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2016 04:27:31 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id A35DE2DC523; Thu, 3 Nov 2016 04:27:30 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============1512520388729799435==" MIME-Version: 1.0 Subject: Re: Review Request 53387: Silenced some `clang-tidy` warnings in test cases. From: Mesos ReviewBot To: Joseph Wu Cc: Mesos ReviewBot , Neil Conway , mesos Date: Thu, 03 Nov 2016 04:27:30 -0000 Message-ID: <20161103042730.1746.38313@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Mesos ReviewBot X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/53387/ X-Sender: Mesos ReviewBot References: <20161102162429.1745.40532@reviews.apache.org> In-Reply-To: <20161102162429.1745.40532@reviews.apache.org> Reply-To: Mesos ReviewBot X-ReviewRequest-Repository: mesos --===============1512520388729799435== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/53387/#review154673 ----------------------------------------------------------- Patch looks great! Reviews applied: [53386, 53387] Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker_build.sh - Mesos ReviewBot On Nov. 2, 2016, 4:24 p.m., Neil Conway wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/53387/ > ----------------------------------------------------------- > > (Updated Nov. 2, 2016, 4:24 p.m.) > > > Review request for mesos and Joseph Wu. > > > Repository: mesos > > > Description > ------- > > `clang-tidy` points out, rightly, that an `ASSERT` failure can result in > leaking some heap-allocated values that aren't wrapped in a smart > pointer. This commit fixes the cases that `clang-tidy` complains about > by wrapping the values in `Owned`. > > Note that there are many other places in the tests that leak resources > if an exception occurs. The proper fix is usually to use a smart pointer > rather than a raw pointer. However, this is not always easy/clean, in > part because the current `Owned` and `Shared` types do not support > inheritance (MESOS-6496). So for now, just fix the cases that clang-tidy > complains about. > > > Diffs > ----- > > src/tests/containerizer/mesos_containerizer_tests.cpp 4df537747d84daa68c29e2d05b22fa386a4a16db > > Diff: https://reviews.apache.org/r/53387/diff/ > > > Testing > ------- > > `make check` > > Verified that observed `clang-tidy` warnings go away with this change. > > > Thanks, > > Neil Conway > > --===============1512520388729799435==--