On Wed, 30 Apr 2008, Robert Reif wrote: [...]
I am suppling a minimal patch to the alsa driver and a single wave test to illustrate this concept. I hope this allows valid tests to remain in spite of buggy windows drivers.
I think it should be a more general winetest concept. My idea is that some platforms (e.g. Wine) could ask for stricter checks, by using strict_wine a bit like they use todo_wine to request looser checks.
So for instance you would do:
strict_wine ok(expected_cond || buggy(this_is_a_bug), ...);
Then on Windows the test would pass if either expected_cond is true or if this_is_a_bug is true. The same would happen for other platforms that this test runs on (e.g. ReactOS).
However on Wine the strict_wine clause would cause buggy to always return false. So on Wine this test would only succeed if expected_cond is true.
In addition to buggy I would propose a deprecated(cond) macro which would behave exactly the same but document valid but deprecated Windows behavior that we really don't want to reproduce.
Finally it would also be possible to use strict_wine before skip() calls to cause the skip() to fail if running on Wine (e.g. skipping due to a missing API should not be allowed when Wine is known to implement that API).
Now we don't want to pepper these all over the tests (especially deprecated() and buggy()) so we'd need a strict policy for when to use these.
I have attached a patch that implements an older incarnation of this idea (instead of deprecated/buggy there was just ok_strict). I hope to update it and submit it some day but in the meantime this can provide a starting point.