Add new runtime tests to validate the order of probe firing #3170
Labels
difficulty: easy
good first issue
Good for newcomers
priority: low
tests
Issues with our tests or test framework; missing tests; invalid tests
Multiple probes are allowed to be attached to the same event. When this happens, bpftrace tries to ensure that the probes fire in the order that they're defined in the script.
e.g. this script should always print a sequence of "abc" and not "cba":
For reference, this is the code that controls the order in which we load duplicate probes and defines the order they fire in:
bpftrace/src/bpftrace.cpp
Lines 952 to 976 in bc73244
This area of code may be changing in the future, with #3128 and/or #2334, so it'd be good to add some test coverage.
For as many of the different probe types as is practical, we should try to write new runtime tests that confirm they fire in the correct order.
The text was updated successfully, but these errors were encountered: