[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/monotone/FC-6 monotone-0.35-parallel-tests.patch, NONE, 1.1 monotone.spec, 1.24, 1.25



Author: roland

Update of /cvs/pkgs/rpms/monotone/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv675

Modified Files:
	monotone.spec 
Added Files:
	monotone-0.35-parallel-tests.patch 
Log Message:
Patch from upstream to fix test suite failures from running in parallel with another instance.

monotone-0.35-parallel-tests.patch:

--- NEW FILE monotone-0.35-parallel-tests.patch ---
-----------------------------------------------------------------
Revision: 0b7ded5189d26b1c15b070fd801308f8ee791ab8
Ancestor: 30a13ba4c31afddded095fbbcb7a4b874b544ee4
Author: Matthew Gregan <kinetik flim org>
Date: 2007-05-12T22:55:48
Branch: net.venge.monotone
ChangeLog: 

        Don't seed PRNG with a value that can be the same for parallel
        invocations of the testsuite.  Fixes bug#19517.
        * luaext_platform.cc (LUAEXT(get_pid)): Expose portable way to get
          process ID.
        * tests/common/netsync.lua (netsync.setup): Use process ID as the
          initial seed to the Lua PRNG.

============================================================
--- luaext_platform.cc	85950c0a7933f6df1c9261172a4df13a0b354255
+++ luaext_platform.cc	2ce777d5ba2573e64f08e7d68ee8c24b2ddaa770
@@ -162,8 +162,13 @@ LUAEXT(sleep, )
   return 1;
 }
 
+LUAEXT(get_pid, )
+{
+  pid_t pid = get_process_id();
+  lua_pushnumber(L, pid);
+  return 1;
+}
 
-
 // Local Variables:
 // mode: C++
 // fill-column: 76
============================================================
--- tests/common/netsync.lua	128824e21a9a92c02b9f21eecc0f1c73556c766e
+++ tests/common/netsync.lua	9e04e633e1a8abec93b4a71d704593fa064ed935
@@ -16,7 +16,7 @@ function netsync.setup()
   check(copy("test.db", "test3.db"))
   check(copy("keys", "keys3"))
   check(getstd("common/netsync-hooks.lua", "netsync.lua"))
-  math.randomseed(os.time())
+  math.randomseed(get_pid())
 end
 
 function netsync.setup_with_notes()
@@ -51,7 +51,7 @@ function netsync.start(opts, n, min)
   end
   local args = {}
   local fn = mtn
-  local addr = "localhost:" .. math.random(20000, 50000)
+  local addr = "localhost:" .. math.random(1024, 65535)
   table.insert(args, "--dump=_MTN/server_dump")
   table.insert(args, "--bind="..addr)
   if min then
-----------------------------------------------------------------
Revision: 29c0149c0786b57a88c4b76e3cfad90571d7b053
Ancestor: dc96217431b80ee988fccab0628d234687d3c4da
Author: Matthew Gregan <kinetik flim org>
Date: 2007-05-13T00:19:13
Branch: net.venge.monotone
ChangeLog: 

        * tests/netsync,--set-default, tests/netsync_verifies_server_keys:
        Use get_pid() rather than os.time() to seed PRNG.

============================================================
--- tests/netsync,--set-default/__driver__.lua	f1b758e020bccd96da24fdf9015bb06d5c4e0725
+++ tests/netsync,--set-default/__driver__.lua	a57657e4a57c507335db1d41123a3f30641ffd97
@@ -1,8 +1,8 @@ netsync.setup()
 
 include("common/netsync.lua")
 mtn_setup()
 netsync.setup()
-rseed = os.time()
+rseed = get_pid()
 
 addfile("testfile", "foo")
 commit()
============================================================
--- tests/netsync_verifies_server_keys/__driver__.lua	13305be95a16b088e491e320e7d6a53a5fe6aa4a
+++ tests/netsync_verifies_server_keys/__driver__.lua	1faebbe461222b8dcf29847c982088237c12cd17
@@ -8,7 +8,7 @@ check(mtn("genkey", "foo bar"), 0, false
 -- Once to let the client note down the key...
 -- We need to set the random seed, because each time a server is
 -- started it picks a new random port.
-seed = os.time()
+seed = get_pid()
 math.randomseed(seed)
 netsync.pull("testbranch")
 


Index: monotone.spec
===================================================================
RCS file: /cvs/pkgs/rpms/monotone/FC-6/monotone.spec,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- monotone.spec	10 May 2007 01:39:44 -0000	1.24
+++ monotone.spec	15 May 2007 01:05:43 -0000	1.25
@@ -1,6 +1,6 @@
 Name: monotone
 Version: 0.35
-Release: 1%{?dist}
+Release: 2%{?dist}
 
 Summary: A free, distributed version control system
 Group: Development/Tools
@@ -12,6 +12,8 @@
 Source2: monotone.sysconfig
 Source3: README.monotone-server
 
+Patch1: monotone-0.35-parallel-tests.patch
+
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires: zlib-devel
@@ -58,6 +60,7 @@
 
 %prep
 %setup -q
+%patch1 -p0
 
 %build
 %configure --with-bundled-lua=%{bundled_lua} \
@@ -165,7 +168,7 @@
 
 
 %changelog
-* Wed May  9 2007 Roland McGrath <roland redhat com> - 0.35-1
+* Wed May  9 2007 Roland McGrath <roland redhat com> - 0.35-2
 - Updated for 0.35 release.
 - Avoid unnecessary "db migrate" in monotone-server init script. (#213893)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]