]> git.ipfire.org Git - thirdparty/kmod.git/commit
testsuite: use a section to put tests in instead of array
authorLucas De Marchi <lucas.demarchi@intel.com>
Thu, 9 Oct 2014 17:14:58 +0000 (14:14 -0300)
committerLucas De Marchi <lucas.demarchi@intel.com>
Thu, 9 Oct 2014 17:17:24 +0000 (14:17 -0300)
commitc5798fea9376958f62c4a7b253a9d8136c241040
treec2ccc748f51b16595938bf783b1fb5895c4196f3
parentf1155c1574b07c1e63cc6a06d51b32bc44bebcc3
testsuite: use a section to put tests in instead of array

Intead of having to declare an array of tests, tweak the definition of
DEFINE_TEST and TESTSUITE_MAIN so they know the tests are put in a
particular section of the ELF file.

This avoids the mistake of adding a test and forgetting to add it to the
array. Now once a test is defined, it's ready to run, so one less step
to define new tests.

The removal of the arrays is left for another patch so not to clutter
the diff on this one.
testsuite/testsuite.c
testsuite/testsuite.h