> On April 25, 2016, 2:24 p.m., Neil Conway wrote: > > src/tests/containerizer/mesos_containerizer_tests.cpp, line 958 > > <https://reviews.apache.org/r/46593/diff/1/?file=1358228#file1358228line958> > > > > Extra set of parentheses here doesn't seem useful. (Can you fix this > > where it occurs elsewhere in the test file?) > > Gilbert Song wrote: > This extra pair of parentheses was added on purpose. Otherwise, the > compile would failed: > ``` > ../../src/tests/containerizer/mesos_containerizer_tests.cpp:603:35: > error: parentheses were disambiguated as a function declaration > [-Werror,-Wvexing-parse] > MesosContainerizer > containerizer(Owned<MesosContainerizerProcess>(process)); > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../../src/tests/containerizer/mesos_containerizer_tests.cpp:603:36: note: > add a pair of parentheses to declare a variable > MesosContainerizer > containerizer(Owned<MesosContainerizerProcess>(process)); > ^ > ( > ) > ``` > This should be referred to as the "most vexing parse".
Ah, gotcha. Makes sense! - Neil ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/46593/#review130418 ----------------------------------------------------------- On June 11, 2016, 6:05 p.m., Gilbert Song wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/46593/ > ----------------------------------------------------------- > > (Updated June 11, 2016, 6:05 p.m.) > > > Review request for mesos, Artem Harutyunyan, Jie Yu, Neil Conway, and Timothy > Chen. > > > Repository: mesos > > > Description > ------- > > Added test for containerizer destroy while provisioning race. > > > Diffs > ----- > > src/tests/containerizer/mesos_containerizer_tests.cpp > 64b331d389f0b7757f50c81619114e18db2dd564 > > Diff: https://reviews.apache.org/r/46593/diff/ > > > Testing > ------- > > make check > > Verified that the test is 90% chance to be segfault if we reverted the fix. > > > Thanks, > > Gilbert Song > >
