Add EXPECT_JSON
runtime test directive
#2841
Labels
enhancement
New feature or request, changes on existing features
good first issue
Good for newcomers
tests
Issues with our tests or test framework; missing tests; invalid tests
Runtime tests have quite a few available directives (see https://github.com/iovisor/bpftrace/blob/master/tests/README.md#runtime-test-directives).
A bunch of json output tests (see https://github.com/iovisor/bpftrace/blob/master/tests/runtime/json-output) pipe output from bpftrace to python like this:
Would be good to add a
EXPECT_JSON
directive to simplify all those tests. So something like:It needs to be done in python (and not an exact string match) to ignore dict reorderings. Cuz in json those kinds of reorderings are not semantically relevant.
The text was updated successfully, but these errors were encountered: