Fixing crashes in Tests (OS version check)

Juan Lang juan.lang at gmail.com
Sun Jun 1 19:54:30 CDT 2008


> The thing is that this evolves with time. Back in 2000 nobody would have
> called SnmpUtilOidToA with a NULL parameter as it would have meant
> crashing on a lot of the Windows install base. Nowadays every ISV
> expects you to have at least Windows XP and wouldn't care one bit if
> that call means crashing the application on NT4 or lower.
>
> So you could say that nowadays applications are likely to expect
> SnmpUtilOidToA(NULL) not to crash which means keeping these tests.
> However I don't think our conformance tests should crash on older
> systems and that's what makes things tricky...

I agree with you that resolving issues like this can be subtle, since
there will always be specific examples when a general principle does
not apply.  They don't invalidate the general principle unless they
outnumber it or outweigh it in some way.  So, in my opinion, the
general principle is this:  if the behavior is very different on
different Windows versions, and if the behavior on some Windows
version is to crash, it seems reasonable to remove the test, as: 1) we
want our tests to reflect Windows behavior that applications count on,
and different behavior (especially crashing) often implies the
applications don't count on a particular behavior, and 2) having
regression tests crash is undesirable, as many other valid tests will
not be run on a platform.

This doesn't mean that we can't make Wine not crash given the bogus
input, it just means we may not be able to have a regression test for
this behavior.  And, of course, there may be specific instances in
which we wish to test potentially crashy behavior, but I'd argue that
they better be really important to override points 1) and 2).

And coming back to this test:  I still think it's easier just to
remove the test than to come up with a hacky way of avoiding it on a
crashy system.
--Juan



More information about the wine-devel mailing list