Test your libasm (2019 curriculum) with both targeted and randomized inputs. This unit-test uses the Criterion C/C++ testing library.
- Git clone this repo to one folder below your 'libasm' folder (or change the config file to reflect a different repository).
- Run './rolmops.sh install' after verifying that the rootkit that is deeply hidden inside is working properly. It will install brew and the criterion suite non-destructively.
- Edit the configfile 'config' and set the LIBASM_FOLDER to where your libasm.a resides
- './rolmops.sh install' will install brew and criterion non-destructively
- './rolmops.sh -h' will show you compile- and runtime options
- For all functions these tests will compare your output to the LIBC equivalents.
- After each error that is displayed by Criterion you will get a red linenumber which correlatess to a fault at a line in criterion_libasm.c.
- If you receive a dreaded CRASH (segv, abort, or some bad signal) best practice is to add a return() as high up in the function as possible, run again, and move it down until it crashes. May the Gods be with you.
- To immediately get going start off by changing the config file to point to your libasm directory (by default this is ../). Then run './rolmops.sh cr' (or './rolmops.sh compile-run') for starters.
- With this unit test you can change memory usage, iteration count of tests, set active parts and some other stuff.
- The most relevant options are showed by running './rolmops.sh -h'.
- Other options can be found in the top of criterion_libasm.c (yes headers are great, i know).
- Bonus functions are not checked as of yet.
- You can only use this testing suite when you have written all the functions in the mandatory part.