allen8807 / memcached

Automatically exported from code.google.com/p/memcached
0 stars 0 forks source link

Memcached issue 67 test will fail if compiling as root #232

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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;

Original issue reported on code.google.com by jari.tur...@visma.com on 4 Nov 2011 at 7:10

GoogleCodeExporter commented 9 years ago
AUGH. FINE. YEESH.

fixed for 1.4.10.

Original comment by dorma...@rydia.net on 10 Nov 2011 at 12:07