Re: Handling unused but bit rotting code...


Marcus Shawcroft <marcus.shawcroft@...>
 

On 2 November 2016 at 18:42, Boie, Andrew P <andrew.p.boie(a)intel.com> wrote:
On Wed, 2016-11-02 at 11:36 +0000, Marcus Shawcroft wrote:
Sure, the drivers that I have yet to find a test case for are:

pwm/dw
gpio/mmio
adc/dw
pinmux_dev_qmsi
grove/temperature_sensor
grove/light_sensor
gpio/stm32
I feel that outside of extraordinary circumstances, a test program
should be added to show that a subsystem or driver at least *compiles*,
if not prove that it works.

Option 1 is clearly a good approach and indeed in the context of the
patch sets referred to above, this has happened. However it is not
always possible or practical...
Under what circumstances is adding a small sample to at least build
against the relevant APIs not possible/practical? Obviously it's not
always feasible to prove that something works correctly, especially an
external peripheral which may require some elaborate test apparatus,
but proving that something at least compiles seems trivial to me.
The trigger for this thread is pwm/dw where no board currently
supports the driver, it does not currently build but there is an
expectation that the driver will be useful in the future.

Cheers
/Marcus

Join devel@lists.zephyrproject.org to automatically receive all group messages.