git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-svn test suite failures due to Subversion race

From
EWEric Wong <normalperson@yhbt.net>
Date
Feb 12, 2007, 10:38 UTC
Message-ID
<20070212103822.GA21413@localdomain>
In-Reply-To
<45CFDFDE.8080907@uwaterloo.ca>
Michael Spang <mspang@uwaterloo.ca> wrote:
Show 5 quoted lines
> Some of the git-svn tests can fail on fast machines due to a race in
> Subversion: if a file is modified in the same second it was checked out
> (or in for that matter), Subversion will not consider it modified.
> Apparently there is also a "racy Subversion" problem parallel to the
> "racy-git" problem. The machine is an Athlon 64 X2 3800+.

I don't think any of my machines are even half as fast. The git-svn tests take a long time on my dev machine, so we have entirely different issues.

Show 16 quoted lines
> For example, test #3 of t9106-git-svn-commit-diff-clobber.sh will fail
> if Subversion happens to fail to make any commit in test #2 of the same
> file. Test #2 will silently pass if no commit was made, as it is not an
> error to commit nothing. The commit in #3 is supposed to conflict with
> the one from #2, but obviously won't if that commit wasn't made. So in
> this case test #3's commit succeeds when failure is expected, and the
> test fails. The [annotated] output of a test run where this happens is
> attached. A couple of other tests have the same problem.
> 
> This may be a known issue, but my search of the archives was fruitless
> and it doesn't appear to be documented anywhere. It's obviously one that
> would need to ultimately be fixed in Subversion, although a workaround
> in the test suite might help those whose builds depend on a passing test
> suite. It's problematic for me to have the git test suite fail because
> the git package for Debian runs the test suite while building, and will
> abort the build if there are failures.

Not known to me. This is the first time I've heard of this issue; but I'm not at all surprised that this is happening, though.

Show 6 quoted lines
> Until this race is fixed in Subversion I guess I'm stuck either skipping
> the git-svn tests or inserting `sleep 1` in a few places to work around
> it. A patch that works around this problem in all of the tests that
> failed for me is attached in case its useful to someone. Even faster
> machines may reveal more instances of the problem. I did not attempt to
> "fix" any tests that will still pass if commits are lost.

This is disconcerting. Given that hardware is still getting faster, I suspect there will be many more problems with the svn tests in the future. I have no plans for upgrading hardware in the near future; so I won't be hitting these problems myself.

I'm alright with adding the `sleep 1` in several more places where this can be an issue. If it gets bad enough for people with slower computers, I'll probably just create a function that sleeps only if a variable is not set (TOO_SLOW_TO_RACE=1 :)

I've been considering rewriting the tests to use the Perl SVN:: libraries exclusively; but that runs the risk of introducing new bugs.

Show 6 quoted lines
> From 97e90fcd7cf600726ec468016eb37d1e1de38dde Mon Sep 17 00:00:00 2001
> From: Michael Spang <mspang@uwaterloo.ca>
> Date: Sun, 11 Feb 2007 20:56:22 -0500
> Subject: [PATCH] Work around Subversion race in git-svn tests.
> 
> Signed-off-by: Michael Spang <mspang@uwaterloo.ca>

It would've been good to have the above email explanation above in the commit message below so we know why the patch was needed (when it gets applied).

-- 
Eric Wong
Previous: Michael SpangNext: Michael Spang
Message 2 of 7 in “git-svn test suite failures due to Subversion race”
  1. Michael SpangFeb 12, 2007
  2. Eric WongFeb 12, 2007
  3. Michael SpangFeb 13, 2007
  4. Junio C HamanoFeb 13, 2007
  5. Eric WongFeb 13, 2007
  6. Junio C HamanoFeb 13, 2007
  7. Michael SpangFeb 14, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.