Mailinglist Archive: yast-devel (127 mails)

< Previous Next >
Re: [yast-devel] Ruby 'next' considered dangerous
On Wed, Nov 18, 2015 at 11:33:23AM +0100, Josef Reidinger wrote:

But as seen in this example, this is often not practical. If your
code depends on the status of things beyond your immediate control,
you'd have to mock all that. In this particular case, who would have
foreseen that a seemingly unrelated scenario like having a RAID on
the previous installation might lead to such a crash?

If it happen first time like in this case I usually capture target map
( as hand crafting target map is pain ) and then write at least
regression test, that I know that covering this case.

Well, the patch for bug #930091 which introduced the wrong 'next'
statement (and btw. nothing else) was apparently not tested,
neither with unit-tests nor with integration tests. I'm sure
there are good reasons for that, e.g. time pressure.

But it shows that the concept of 'we have to test everything'
does not work in practice. So any help from static code analysis
tools should be welcomed or to quote John Carmack "it is
irresponsible to not use it" [1].



Arvin Schnell, <aschnell@xxxxxxxx>
Senior Software Engineer, Research & Development
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284
(AG Nürnberg)
Maxfeldstraße 5
90409 Nürnberg
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups