cmd/tests: Test del /s recursion in subdirectories with colons.
frederic.delanoy at gmail.com
Wed Aug 31 05:24:27 CDT 2011
2011/8/30 Octavian Voicu <octavian.voicu at gmail.com>:
> 2011/8/30 Frédéric Delanoy <frederic.delanoy at gmail.com>:
>> You don't test the result of your 'mkdir "foo:"'. You can't know from
>> the test whether the dir was created and removed, or never existed.
> That's the whole point! I tested in cmd prompt on a Windows XP machine
> (and I assume all Windows versions act the same in this regard), and
> mkdir refuses to create a directory with colons in its name (same goes
> with explorer). Even if it might be possible to create a directory
> with a colon in its name by using some API, it's not relevant.
> So this test is strictly for Wine -- but it does have to pass on
> Windows too. The test I wrote is designed to fail (with a stack
> overflow) if you revert my earlier patch. It's not like any (sane)
> Windows application will be trying to create directories with colons
> in their names, but if it happens that the users has such a directory,
> you don't want Wine to go crashing because of it.
>> You should use something like "if exist ... echo blablabla", or a 'dir
>> /b' in a directory to verify it's not created.
>> Be aware that error messages are generally lost/discarded, so you have
>> to test differently
> I don't see the point of actually testing if the directory was
> created, because it will always fail on Windows (and you can't really
> mark this failure as broken, because it's standard Windows behavior).
My point was simply to make sure that subsequent wine patches, maybe a
year or two from now, won't make it "work" again (think regression)
I never talked about marking it as broken (it obviously doesn't work
on any windows), just that running a plain "mkdir foo:" and not
checking the expected outcome is pointless IMHO (besides detecting
crash/overflows don't occur again in wine)
Maybe a simple "if exist foo: (echo wine is broken)" would be
sufficient. This way you would detect quickly it wine somehow makes it
More information about the wine-devel