Unit Testing: Difference between revisions

Converted page, removed PFR tag, categorisation
[unchecked revision][unchecked revision]
No edit summary
(Converted page, removed PFR tag, categorisation)
Line 1:
{{Convert}}
 
'''Unit testing''' means that, in addition to the implementation code, you also write a "test driver" that puts the implementation code through a set of trials, checking the returns for correctness. Note that this is done during development / testing - the "test driver" is not shipped with the released code.
 
Line 15 ⟶ 13:
* If your memory manager has some 'free zone merging' feature, allocate as much 'small' zones as you can, then free all the 'odd' zones and then all the 'even' zones (stressing the merge feature). When you're done, try to allocate a single zone as large as the collection of all the small zones you initially get.
 
* before starting many threads, launch a thread that is expected to signal a [Semaphore|[Semaphores|semaphore]] and then wait on that semaphore. If your dispatcher (and semaphores) works fine, you can only go on if that other thread has been executed.
 
* after enabling interrupts (and especially the timer), poll the 'tick counter' and don't go on until it advanced (confirming you that the timer interrupt works fine)
 
As many of those tests may hang, you're suggested to print what test you're running before you know if the test was successful or not.
 
[[Category:OS development]]
1,490

edits