From: Paul Floyd Date: Thu, 24 Jul 2025 20:44:09 +0000 (+0200) Subject: README_DEVELOPERS: more on scalar test X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0369a3b9c7dd216b660615d91ae3836f69d674fa;p=thirdparty%2Fvalgrind.git README_DEVELOPERS: more on scalar test One typo and add an example. --- diff --git a/README_DEVELOPERS b/README_DEVELOPERS index 5bcb8ea87..a3360580e 100644 --- a/README_DEVELOPERS +++ b/README_DEVELOPERS @@ -197,13 +197,27 @@ The last file to change is .gitignore in the top directory. Add a new entry, for example "/tool/tests/newtest". The 'scalar' tests are something of a special case. Scalar in this sense -refers to the registers (or stack slots) used to pas in arguments. These tests +refers to the registers (or stack slots) used to pass in arguments. These tests directly use the 'syscall' syscall via a macro, SY. They make little effort to use the sysall in a realistic manner. Rather, the objective is to exhaustively test all of the arguemnts and referenced memory of syscalls. +The variable 'x0' is a long integer, containing the value of 0 but +also uninitialised. It can be used on its own or with some other value +to ensure that all of the syscall arguemts are uninitialised. A second macro, GO, is used precede the syscall (and subsequent errors) with a header. The GO string includes the name of the syscall, a count of -expected scalar errors and a count of memory errors. +expected scalar errors and a count of memory errors. The tests are usually +followed by the FAIL macro, which ensures that the syscall failed. +An example scalar test is + + /* SYS_link 9 */ + GO(SYS_link, "2s 2m"); + SY(SYS_link, x0, x0); FAIL; + + +This syscall takes two strings so the expected errors are +2 scalar (for the pointer arguments) and 2 memory (for +the strings themselves). When your test is done check for mistakes in Makefile.am. In the top directory run