[MERGE] crash when "bzr add" (under win32)

Martin Pool mbp at sourcefrog.net
Thu Jul 12 07:43:47 BST 2007


On 7/12/07, Kuno Meyer <kuno.meyer at gmx.ch> wrote:

> > There do not seem to be any explicit tests already.  I think it would
> > be good to add two different tests.
> >
> > 1- When glob_expand_for_win32 is called, it has the right effect:
> > expanding things that are globs and can match something.  The easiest
> > thing is probably to make it a TestCaseInTempDir and then use
> > build_tree to make some files to test against.
> >
> > 2- When we do a blackbox test on bzr add, this method does get
> > correctly invoked.  This is a bit tricky as it's only supposed to be
> > active on Windows.
> > I can see a couple of options:
> >
> > 2a - use run_bzr_subprocess, which will give the shell a chance to do
> > the expansion on Unix (i think).
> >
> > 2b - change run_bzr and rearrange the layering so that if you try to
> > run bzr in-process with wildcards it does the expansion through this
> > method, even on unix.
>
> Ok. I will provide some tests at least for case 1-, but in a separate
> patch. Thank you for a hint how to implement it.

Thanks, that would be great.

> As of the cases 2-, I'm not sure what you want to test in addition to
> the mere callability of the function, which already is covered enough (I
> think) by the blackbox tests.

Well, there are no tests in tests/blackbox/test_add that try calling
add with a wildcard.  And yet the add command does have special
behaviour (expanding the wildcard) in this case.  As far as I can see
we could remove that line from cmd_add and all the tests would pass,
even on Windows, so it's untested.

-- 
Martin



More information about the bazaar mailing list