summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2019-12-11 13:03:43 +1300
committerAndrew Bartlett <abartlet@samba.org>2019-12-11 02:55:32 +0000
commite6fc8e79aee289f79b5fba7b7c2974d476702b1e (patch)
tree0f03a1655ca1f9ddd92f993d4c492933151f9d37 /buildtools
parent6e5aefc2d3095f0fb6535e6ab3a4ec12b898794f (diff)
downloadsamba-e6fc8e79aee289f79b5fba7b7c2974d476702b1e.tar.gz
lib/fuzzing: Split up automatically build fuzzers into TYPE_{IN,OUT,STRUCT}
The advise is that a fuzz target should be as small as possible so we split this up. Splitting up by function would build too many fuzzers, but this should help a little. See for example: https://github.com/google/fuzzing/blob/master/docs/good-fuzz-target.md#large-apis Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@samba.org>
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/samba_pidl.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_pidl.py b/buildtools/wafsamba/samba_pidl.py
index b92120edd23..d7e1247aa20 100644
--- a/buildtools/wafsamba/samba_pidl.py
+++ b/buildtools/wafsamba/samba_pidl.py
@@ -123,7 +123,19 @@ def SAMBA_PIDL_LIST(bld, name, source,
# the fuzzers rely
if generate_tables and generate_fuzzers:
interface = p[0:-4] # strip off the .idl suffix
- bld.SAMBA_NDR_FUZZ(interface, auto_deps=True)
+ bld.SAMBA_NDR_FUZZ(interface,
+ auto_deps=True,
+ fuzz_type="TYPE_STRUCT")
+
+ # Only generate the TYPE_STRUCT fuzzer if this isn't
+ # really DCE/RPC
+ if '--client' in options:
+ bld.SAMBA_NDR_FUZZ(interface,
+ auto_deps=True,
+ fuzz_type="TYPE_IN")
+ bld.SAMBA_NDR_FUZZ(interface,
+ auto_deps=True,
+ fuzz_type="TYPE_OUT")
Build.BuildContext.SAMBA_PIDL_LIST = SAMBA_PIDL_LIST