Status: New Owner: ---- Labels: Type-Defect Priority-Medium
New issue 232 by [email protected]: Memcached issue 67 test will fail if compiling as root
http://code.google.com/p/memcached/issues/detail?id=232 What steps will reproduce the problem? 1. Compile memcached as root What is the expected output? What do you see instead? All test should succeed Instead: t/issue_67.t ......... can't run as root without the -u switch Failed to start server. at t/issue_67.t line 59 main::run_server('-p 11212') called at t/issue_67.t line 65 main::when('specifying tcp port', '-p 11212', 11212, 11212) called at t/issue_67.t line 74 # Looks like your test exited with 2 before it could output anything. t/issue_67.t ......... Dubious, test returned 2 (wstat 512, 0x200) Failed 22/22 subtests What version of the product are you using? On what operating system? 1.4.9, Centos 5.7 Please provide any additional information below. Suggested patch to fix the issue: --- t/issue_67.t.orig 2011-11-04 00:16:44.000000000 +0200 +++ t/issue_67.t 2011-11-04 00:18:25.000000000 +0200 @@ -44,6 +44,8 @@ my $childpid = fork(); my $cmd = "$builddir/timedrun 10 $exe $args"; + $cmd .= " -u root" if ($> == 0); + $cmd .= " $args"; unless($childpid) { exec $cmd;
