aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/README
diff options
context:
space:
mode:
authorPaul Dreik <github@pauldreik.se>2019-09-14 03:16:09 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-09-15 23:25:24 +0200
commitb7666027296a4f89a8ce6b22af335e8aee7a7782 (patch)
treee75c54442cdb8ed02be13d2a8d4dd7de16f90e2b /tests/unit/README
parent5eb75d418657a734bfbe02e5aef69cc5fe28ebc6 (diff)
doh: fix (harmless) buffer overrun
Added unit test case 1655 to verify. Close #4352 the code correctly finds the flaws in the old code, if one temporarily restores doh.c to the old version.
Diffstat (limited to 'tests/unit/README')
-rw-r--r--tests/unit/README6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/unit/README b/tests/unit/README
index b8a513b3b..060b670c6 100644
--- a/tests/unit/README
+++ b/tests/unit/README
@@ -35,6 +35,9 @@ We put tests that focus on an area or a specific function into a single C
source file. The source file should be named 'unitNNNN.c' where NNNN is a
number that starts with 1300 and you can pick the next free number.
+Add your test to tests/unit/Makefile.inc (if it is a unit test).
+Add your test data to tests/data/Makefile.inc
+
You also need a separate file called tests/data/testNNNN (using the same
number) that describes your test case. See the test1300 file for inspiration
and the tests/FILEFORMAT documentation.
@@ -46,9 +49,10 @@ For the actual C file, here's a very simple example:
#include "a libcurl header.h" /* from the lib dir */
-static void unit_setup( void )
+static CURLcode unit_setup( void )
{
/* whatever you want done first */
+ return CURLE_OK;
}
static void unit_stop( void )