summaryrefslogtreecommitdiffstats
path: root/tests/helpers (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: reindentreindent-master-afterwhitespace / reindent2017-07-174-194/+173
| | | | | | indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests: update prng to return better pseudo random numbersChristian Franke2017-07-122-30/+14
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* lib: more `show thread cpu`Quentin Young2017-06-301-1/+1
| | | | | | | Add support for naming pthreads. Also, note that we don't have any records yet if that's the case. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: make consistent & update GPLv2 file headersDavid Lamparter2017-05-154-16/+12
| | | | | | | | | | | The FSF's address changed, and we had a mixture of comment styles for the GPL file header. (The style with * at the beginning won out with 580 to 141 in existing files.) Note: I've intentionally left intact other "variations" of the copyright header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: remove THREAD_ON macros, add nullity checkQuentin Young2017-05-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way thread.c is written, a caller who wishes to be able to cancel a thread or avoid scheduling it twice must keep a reference to the thread. Typically this is done with a long lived pointer whose value is checked for null in order to know if the thread is currently scheduled. The check-and-schedule idiom is so common that several wrapper macros in thread.h existed solely to provide it. This patch removes those macros and adds a new parameter to all thread_add_* functions which is a pointer to the struct thread * to store the result of a scheduling call. If the value passed is non-null, the thread will only be scheduled if the value is null. This helps with consistency. A Coccinelle spatch has been used to transform code of the form: if (t == NULL) t = thread_add_* (...) to the form thread_add_* (..., &t) The THREAD_ON macros have also been transformed to the underlying thread.c calls. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* tests: allow to use exit_cleanly as test methodChristian Franke2017-05-081-1/+2
| | | | | | TestMultiOut can now also just check for clean exit Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* Rename: FreeRangeRouting FRRoutingLou Berger2017-03-301-1/+1
| | | | Signed-off-by: Lou Berger <lberger@labn.net>
* tests: format TestRefMismatch more readableChristian Franke2017-03-281-1/+13
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* tests: fix out-of-tree buildDavid Lamparter2017-02-131-2/+8
| | | | | | Fix pytest with $(top_srcdir) != "." Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tests: add pytest testrunnersChristian Franke2017-02-132-0/+257
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* tests: reorganize tests hierarchicallyChristian Franke2017-02-134-0/+402
Signed-off-by: Christian Franke <chris@opensourcerouting.org>