zeek/testing
Arne Welzel a5f04b6270 cat_sep: Make fully vararg and do explicit runtime type checks
Using positional and vararg arguments for BIFs, it's not possible to do
proper runtime type checking on them as discussed in #2425. The bifcl produced
code unconditionally attempts to convert the positional arguments to StringVals,
but nothing ever type checks them. Instead of improving the vararg support in
Zeek script and bifcl, align cat_sep() with fmt() in making it fully vararg
and do implement type checks by hand.

With this change, passing wrong types for the separator and default argument
isn't a fatal error anymore and the error messages are also more descriptive.

It's a bit of a crutch working around varargs limitations.

Fixes #2425
2022-10-27 13:06:06 +02:00
..
benchmark/broker Port Zeek to latest Broker API 2022-04-27 23:02:27 +02:00
btest cat_sep: Make fully vararg and do explicit runtime type checks 2022-10-27 13:06:06 +02:00
coverage Format shell scripts with shfmt. 2021-11-24 23:13:02 +01:00
external Management framework: bump zeek-client and cluster testsuite 2022-10-24 16:00:58 -07:00
scripts Include in Jan's AF_PACKET plugin as builtin plugin 2022-10-13 13:29:27 +02:00
.gitignore
CMakeLists.txt Install Zeek's btest tooling with the distribution 2021-03-11 13:00:15 -08:00
Makefile
README

This directory contains suites for testing for Zeek's correct
operation:

    btest/
        An ever-growing set of small unit tests testing Zeek's
        functionality.

    external/
        A framework for downloading additional test sets that run more
        complex Zeek configuration on larger traces files. Due to their
        size, these are not included directly. See the README for more
        information. 

    scripts/
        Helpers scripts used by some tests.