[Haskell-cafe] Testing of GHC extensions & optimizations
Sven Panne
svenpanne at gmail.com
Sun Sep 2 19:58:42 UTC 2018
Am So., 2. Sep. 2018 um 20:05 Uhr schrieb Rodrigo Stevaux <roehst at gmail.com
>:
> Hi Omer, thanks for the reply. The tests you run are for regression
> testing, that is, non-functional aspects, is my understanding right? [...]
>
Quite the opposite, the usual steps are:
* A bug is reported.
* A regression test is added to GHC's test suite, reproducing the bug (
https://ghc.haskell.org/trac/ghc/wiki/Building/RunningTests/Adding).
* The bug is fixed.
This way it is made sure that the bug doesn't come back later. Do this for
a few decades, and you have a very comprehensive test suite for functional
aspects. :-) The reasoning behind this: Blindly adding tests is wasted
effort most of time, because this way you often test things which only very
rarely break: Bugs OTOH hint you very concretely at
problematic/tricky/complicated parts of your SW.
Catching increases in runtime/memory consumption is a slightly different
story, because you have to come up with "typical" scenarios to make useful
comparisons. You can have synthetic scenarios for very specific parts of
the compiler, too, like pattern matching with tons of constructors, or
using gigantic literals, or type checking deeply nested tricky things,
etc., but I am not sure if such things are usually called "regression
tests".
Cheers,
S.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20180902/66c1e2a3/attachment.html>
More information about the Haskell-Cafe
mailing list