piclist 2009\02\05\194130a >
Thread: Agile programming (was Re: [P|C] Banksel)
www.piclist.com/techref/microchip/devprogs.htm?key=programming
picon face BY : Gerhard Fiedler email (remove spam text)



Rolf wrote:

{Quote hidden}

I agree with Rolf. This is a good example of the test environment being
more complex than the DUT. And it is such a common scenario.


>>> how do you test a software implemented queue that is accessed in a
>>> multi-threaded environment for both adding to and removing from the
>>> queue...
>>
>> You write functions that put something in the queue, and other
>> functions that pull stuff from the queue. What's complicated about
>> it?

Ouch... :) The problem is not in the simple case of just putting in to
and pulling out from the queue -- in a single-threaded environment, this
is a task for students in an early semester. The problem is testing that
it works well in multi-tasked environments, and the different timings.
This is far from trivial. Try it sometime... create a queue that works
in a multi-threaded environment and a test harness for it that tests
whether it works correctly in a multi-threaded environment. I'm sure
you'll find that the test requires much more effort and analysis. It's
not only preventing harmful situations (which is what you need to think
about when creating the queue), it is about creating them -- and
creating all sorts of potentially tricky situations, not only the ones
that are tricky for this specific implementation, but for the problem
per se. (The test shouldn't depend on specific implementation details,
it should test the correctness of the DUT based on the requirements, not
the implementation.)


> I can see how at face value it may seem simple, perhaps the example is
> trivial.

It may seem trivial, but it isn't. You know that :)

Gerhard
<xakb8h329hw6.dlg@connectionbrazil.com> 7bit

In reply to: <498AEEEF.4030807@rogers.com>
See also: www.piclist.com/techref/microchip/devprogs.htm?key=programming
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Agile programming (was Re: [P|C] Banksel)

month overview.

new search...