Amiga.org

Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: freqmax on April 04, 2011, 10:37:48 PM

Title: Verification of all system calls() ?
Post by: freqmax on April 04, 2011, 10:37:48 PM
Is there any existing software to verify the correct functionality of the kickstart ROMs and libraries? ie that calls to them will actually produce the correct output.

Can be kind of useful for AROS m68k ROMs (http://aros.sourceforge.net/cgi-bin/nightly-download?20110331/Binaries/AROS-20110331-amiga-m68k-system.tar.bz2). (distfiles/aros-amiga-m68k-rom.bin)
For starters focus could be on the essential calls.
Title: Re: Verification of all system calls() ?
Post by: Piru on April 04, 2011, 11:08:43 PM
Quote from: freqmax;627988
Is there any existing software to verify the correct functionality of the kickstart ROMs and libraries? ie that calls to them will actually produce the correct output.
No

Such verification will be huge pain in the behind, too. There are tons of functions that are very rarely used, and in some cases no viable example code exist at all.

Good luck.
Title: Re: Verification of all system calls() ?
Post by: Karlos on April 04, 2011, 11:17:29 PM
What you are asking for is a suite of unit tests for the system libraries. Speaking as someone that has to write unit tests for production code on a regular basis, such a task would be very non-trivial.

Application-level unit tests aren't so difficult to manage since it's fairly easy to spoof data structures, add shims and other mechanisms to fake the environment the code that is being tested will be expected to run in and automate the verification of calls to a given piece of code.

Although the same principles would apply, doing the same things for operating system internals is rather more difficult, especially when you have to potentially deal with multiple threads, changes in privilege (not that a lot runs supervisor in AmigaOS) and whatever potential system-wide side effects of whatever the call you are trying to test hhas.
Title: Re: Verification of all system calls() ?
Post by: freqmax on April 05, 2011, 12:46:47 AM
If the scope is narrowed to application level test. And in particular the calls mostly used. So things like loading a sector from hard-disc actually returns 512 bytes and not 511 bytes or open a window with intuition actually does so etc..
I don't think automated test for OS internals will be needed. Though it doesn't hurt. Not many Amiga CPUs does threads nor does the OS implement privileges.
Title: Re: Verification of all system calls() ?
Post by: vidarh on April 05, 2011, 07:14:05 AM
Nothing existing. Get started!

Seriously, I've been compiling various small test cases for the console handler and device because I was (and still am when I get a few precious spare moments, which isn't often at the moment) working on the AROS console code and it behaves differently from the AmigaOS one in quite a few ways still.

I'd love seeing other people adding coverage for other parts, and perhaps jointly start assembling a proper set of unit tests that can run on at least classic AmigaOS and AROS...