]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
README_DEVELOPERS: better to generate stdout expecteds directly from test exes
authorPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 18 May 2024 13:39:34 +0000 (15:39 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 18 May 2024 13:39:34 +0000 (15:39 +0200)
README_DEVELOPERS

index a13b35574f57635c1313a45195d7075700c3ca67..71581bd86550b7cbbb4b07d7d3f6833ec024d5f6 100644 (file)
@@ -141,7 +141,13 @@ The easiest way to generate the expected files is to run the test. Create empty
 files with touch (otherwise the test won't run) then run the test from the
 top directory using perl and vg_regtest script (as in the "Running the
 regression tests" section. Then copy "tool/tests/newtest.stderr.out" to
-"tool/tests/newtest.stderr.exp". Do the same for the .stderr.exp file.
+"tool/tests/newtest.stderr.exp". It is better to generate the .stdout.exp
+file directly from the testcase. You can do that by redirecting stdout to
+the expected file, for instance (in the test directory)
+    ./newtest arg1 arg2 > newtest.stdout.exp
+This is not always possible - sometimes there are tests that depend on the use
+of client requests or have imperfect emulation of opcodes.
+Make sure that the test runs and passes.
 
 The last file to change is .gitignore in the top directory. Add a new entry,
 for example "/tool/tests/newtest".