Start memcached with "-u root", because it let us run tests via sudo or from the...
authorPiotr Sikora <piotr.sikora@frickle.com>
Fri, 23 Jul 2010 18:16:55 +0000 (18:16 +0000)
committerPiotr Sikora <piotr.sikora@frickle.com>
Fri, 23 Jul 2010 18:16:55 +0000 (18:16 +0000)
tests/include.am
tests/server.c

index 3d0d7760b329fd827ae70460f5b57c35b988c613..648751159842542813ce1b4b9a22003c535bd4b2 100644 (file)
@@ -92,20 +92,20 @@ tests_memplus_LDADD = $(tests_memplus_DEPENDENCIES) $(LIBSASL)
 test: check
 
 check-local: test-docs test-mem test-hash memcapable
-       echo "Tests completed"
+       @echo "Tests completed"
 
 test-x: check-local test-plus test-memcat test-memcp test-memrm test-memerror test-memdump test-memflush test-memstat
-       echo "Tests completed"
+       @echo "Tests completed"
 
 memcapable: clients/memcapable
-       @@MEMC_BINARY@ -d -P `pwd`/tests/Xumemc.pid -p 12555
+       @@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
        @clients/memcapable -p 12555 || echo "Your memcached server does not support all commands"
        @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
        @rm tests/Xumemc.pid
 
 test-memcat: clients/memcat clients/memcp
        @echo "Testing memcat"
-       @@MEMC_BINARY@ -d -P `pwd`/tests/Xumemc.pid -p 12555
+       @@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
        @clients/memcp --servers="localhost:12555" `pwd`/clients/memcp
        @clients/memcat --servers="localhost:12555" memcp > `pwd`/tests/scratch
        @clients/memcat --servers="localhost:12555" --file=`pwd`/tests/scratch2 memcp
@@ -117,7 +117,7 @@ test-memcat: clients/memcat clients/memcp
 
 valgrind-memcat: clients/memcat clients/memcp
        @echo "Testing memcat"
-       @@MEMC_BINARY@ -d -P `pwd`/tests/Xumemc.pid -p 12555
+       @@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
        @clients/memcp --servers="localhost:12555" clients/memcp
        @$(VALGRIND_COMMAND) clients/memcat --servers="localhost:12555" memcp > tests/scratch
 #      @diff clients/memcp tests/scratch
@@ -127,21 +127,21 @@ valgrind-memcat: clients/memcat clients/memcp
 
 test-memcp: clients/memcp
        @echo "Testing memcp"
-       @@MEMC_BINARY@ -d -P `pwd`/tests/Xumemc.pid -p 12555
+       @@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
        @clients/memcp --servers="localhost:12555" clients/memcp clients/memcat clients/memstat
        @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
        @rm tests/Xumemc.pid
 
 valgrind-memcp: clients/memcat clients/memcp
        @echo "Testing memcp"
-       @@MEMC_BINARY@ -d -P `pwd`/tests/Xumemc.pid -p 12555
+       @@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
        @$(VALGRIND_COMMAND) clients/memcp --servers="localhost:12555" clients/memcp clients/memcat clients/memstat
        @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
        @rm tests/Xumemc.pid
 
 test-memrm: clients/memrm clients/memcp
        @echo "Testing memrm"
-       @@MEMC_BINARY@ -d -P `pwd`/tests/Xumemc.pid -p 12555
+       @@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
        @clients/memcp --servers="localhost:12555" clients/memcat
        @clients/memrm --servers="localhost:12555" memcat
        @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
@@ -149,7 +149,7 @@ test-memrm: clients/memrm clients/memcp
 
 valgrind-memrm: clients/memcat clients/memcp
        @echo "Testing memrm"
-       @@MEMC_BINARY@ -d -P `pwd`/tests/Xumemc.pid -p 12555
+       @@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
        @clients/memcp --servers="localhost:12555" clients/memcat
        @$(VALGRIND_COMMAND) clients/memrm --servers="localhost:12555" memcat
        @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
@@ -157,21 +157,21 @@ valgrind-memrm: clients/memcat clients/memcp
 
 test-memflush: clients/memflush
        @echo "Testing memflush"
-       @$(MEMC_BINARY) -d -P `pwd`/tests/Xumemc.pid -p 12555
+       @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
        @clients/memflush --servers="localhost:12555"
        @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
        @rm tests/Xumemc.pid
 
 valgrind-memflush: clients/memflush
        @echo "Testing memflush"
-       @$(MEMC_BINARY) -d -P `pwd`/tests/Xumemc.pid -p 12555
+       @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
        @$(VALGRIND_COMMAND) clients/memflush --servers="localhost:12555"
        @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
        @rm tests/Xumemc.pid
 
 test-memdump: clients/memdump clients/memcp
        @echo "Testing memdump"
-       @$(MEMC_BINARY) -d -P `pwd`/tests/Xumemc.pid -p 12555
+       @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
        @clients/memcp --servers="localhost:12555" clients/memcat
        @clients/memdump --servers="localhost:12555" > /dev/null
        @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
@@ -179,7 +179,7 @@ test-memdump: clients/memdump clients/memcp
 
 valgrind-memdump: clients/memcat clients/memcp
        @echo "Testing memdump"
-       @$(MEMC_BINARY) -d -P `pwd`/tests/Xumemc.pid -p 12555
+       @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
        @clients/memcp --servers="localhost:12555" clients/memcat
        @$(VALGRIND_COMMAND) clients/memdump --servers="localhost:12555" > /dev/null
        @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
@@ -187,14 +187,14 @@ valgrind-memdump: clients/memcat clients/memcp
 
 test-memstat: clients/memstat
        @echo "Testing memstat"
-       @$(MEMC_BINARY) -d -P `pwd`/tests/Xumemc.pid -p 12555
+       @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
        @clients/memstat --servers="localhost:12555" > /dev/null
        @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
        @rm tests/Xumemc.pid
 
 valgrind-memstat: clients/memstat
        @echo "Testing memstat"
-       @$(MEMC_BINARY) -d -P `pwd`/tests/Xumemc.pid -p 12555
+       @$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
        @$(VALGRIND_COMMAND) clients/memstat --servers="localhost:12555" > /dev/null
        @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
        @rm tests/Xumemc.pid
index c0521e5bb26d5dabc1d615d82048b2c8fb8bd1ec..8fb4b63b57e79afe5b78f3ccb9261c9406b9a4b4 100644 (file)
@@ -73,12 +73,12 @@ void server_startup(server_startup_st *construct)
 
         if (x == 0)
         {
-          sprintf(buffer, "%s -d -P /tmp/%umemc.pid -t 1 -p %u -U %u -m 128",
+          sprintf(buffer, "%s -d -u root -P /tmp/%umemc.pid -t 1 -p %u -U %u -m 128",
                  MEMCACHED_BINARY, x, x + TEST_PORT_BASE, x + TEST_PORT_BASE);
         }
         else
         {
-          sprintf(buffer, "%s -d -P /tmp/%umemc.pid -t 1 -p %u -U %u",
+          sprintf(buffer, "%s -d -u root -P /tmp/%umemc.pid -t 1 -p %u -U %u",
                  MEMCACHED_BINARY, x, x + TEST_PORT_BASE, x + TEST_PORT_BASE);
         }
        if (libmemcached_util_ping("localhost", (in_port_t)(x + TEST_PORT_BASE), NULL))