unittests: add unittest suite for lib/memalign.c
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Fri, 26 Oct 2018 16:35:41 +0000 (09:35 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 26 Oct 2018 16:24:21 +0000 (10:24 -0600)
commite37155efe2b60fe0acc5051e774d2eb49e4b7ca7
tree1b75ab56cd8232e57ac09fffdc49fe34d80e6577
parentb8b0e1eea7780a02ff67f0caeba446cc403f1b37
unittests: add unittest suite for lib/memalign.c

Add test cases for lib/memalign.c as an example of unittest.

A workaround code to emulate smalloc()/sfree() was needed since
3114b675fd("fio: enable cross-thread overlap checking with processes")
introduced dependency on smalloc()/sfree() which has dependency
on fio code.

Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Makefile
unittests/lib/memalign.c [new file with mode: 0644]
unittests/unittest.c
unittests/unittest.h