annotate test/callback_suite/README.txt @ 509:f3d44195dbdf

callback_suite: - further, big refactoring to make the test data setup be a lot more in line with call_suite and call_suite_aggrs - added support to test void return values (was missing in prev version)
author Tassilo Philipp
date Sat, 09 Apr 2022 23:00:24 +0200
parents 1aa2af848e8a
children 95f6f43178ed
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
508
1aa2af848e8a - callback_suite: updated readme to reflect changes and general cleanup
Tassilo Philipp
parents: 507
diff changeset
1 Callback Test Suite
1aa2af848e8a - callback_suite: updated readme to reflect changes and general cleanup
Tassilo Philipp
parents: 507
diff changeset
2 -------------------
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
3
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
4
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
5 CONFIGURE SUITE
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
6
508
1aa2af848e8a - callback_suite: updated readme to reflect changes and general cleanup
Tassilo Philipp
parents: 507
diff changeset
7 needs lua: edit config.lua and run "make config".
1aa2af848e8a - callback_suite: updated readme to reflect changes and general cleanup
Tassilo Philipp
parents: 507
diff changeset
8
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
9
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
10 DESCRIPTION
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
11
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
12 Generates a set of callback invokers in C using lua as a preprocessor.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
13
509
f3d44195dbdf callback_suite:
Tassilo Philipp
parents: 508
diff changeset
14 The invokers pass random arguments to the callback to test, from a set of
f3d44195dbdf callback_suite:
Tassilo Philipp
parents: 508
diff changeset
15 reference values which are argument type- and position-specific.
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
16
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
17
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
18 The Callback Invocation Body
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
19
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
20 Example:
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
21 The body for a signature of type "dpdf)p" at case id 19 is:
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
22
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
23 void f19(void* addr)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
24 {
509
f3d44195dbdf callback_suite:
Tassilo Philipp
parents: 508
diff changeset
25 V_p[4] = ((CONFIG_API p(*)(d,p,d,f))addr)(K_d[0],K_p[1],K_d[2],K_f[3]);
f3d44195dbdf callback_suite:
Tassilo Philipp
parents: 508
diff changeset
26 } ^^^^^^^^^^- specific calling convention
f3d44195dbdf callback_suite:
Tassilo Philipp
parents: 508
diff changeset
27 ^^^^^^^^^^^^^- signature
f3d44195dbdf callback_suite:
Tassilo Philipp
parents: 508
diff changeset
28 ^- return type ^^^^- dyncallback object
f3d44195dbdf callback_suite:
Tassilo Philipp
parents: 508
diff changeset
29 ^- args from reference values (to be retrieved in handler)
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
30
509
f3d44195dbdf callback_suite:
Tassilo Philipp
parents: 508
diff changeset
31 The K_? values are the reference values, which are supposed to be copied to
f3d44195dbdf callback_suite:
Tassilo Philipp
parents: 508
diff changeset
32 V_?, and are compared for identity after invocation. The arguments are copied
f3d44195dbdf callback_suite:
Tassilo Philipp
parents: 508
diff changeset
33 to V_? in the callback handler, called through "addr".
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
34
509
f3d44195dbdf callback_suite:
Tassilo Philipp
parents: 508
diff changeset
35 The reference values stored in K_? are generated once, randomly, at startup.
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
36
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
37
508
1aa2af848e8a - callback_suite: updated readme to reflect changes and general cleanup
Tassilo Philipp
parents: 507
diff changeset
38 Testing for exotic calling conventions on Windows
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
39
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
40 Specify 'api' and 'ccprefix' accordingly:
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
41
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
42
495
45ac093ca822 - test/callback_suite: make it use shared random sig generator from call_suite and call_suite_aggrs
Tassilo Philipp
parents: 0
diff changeset
43 "__stdcall" "_s"
45ac093ca822 - test/callback_suite: make it use shared random sig generator from call_suite and call_suite_aggrs
Tassilo Philipp
parents: 0
diff changeset
44 "__fastcall" "_f" for gcc compiler
45ac093ca822 - test/callback_suite: make it use shared random sig generator from call_suite and call_suite_aggrs
Tassilo Philipp
parents: 0
diff changeset
45 "_F" for microsoft compiler
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
46
508
1aa2af848e8a - callback_suite: updated readme to reflect changes and general cleanup
Tassilo Philipp
parents: 507
diff changeset
47 See the dyncall documentation for other/more calling convention prefixes.
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
48