This project helps to test v4l2 stateless decoder drivers by tracing, recording and replaying (i.e. "retracing") userspace's interaction with a stateless decoder driver. The tracer utility attaches to a userspace application and generates a json file with relevant system calls, parameters and encoded data. The retracer utility reads the json-file and makes the same system calls to a v4l2 stateless driver. Since the retracer is independent from the original userspace application that was traced, testing can be decoupled from extraneous factors in the userspace environment. The json-file can also be edited to inject errors and test a driver's error-handling abilities. NOTE: This project is work in progress and currently only traces VP8, but H264 and FWHT will follow shortly. EXAMPLE: ./tracer gst-launch-1.0 -- filesrc location=<some_vp8_file> ! parsebin ! v4l2slvp8dec ! videocodectestsink ./retracer 10284_trace.json FURTHER INFO AND TEST FILES: https://gitlab.collabora.com/dbrouwer/v4l2-stateless-tracer-utility/-/tree/main/ Deborah Brouwer (2): utils: add stateless tracer utility utils: add stateless retracer utility configure.ac | 6 + utils/Makefile.am | 5 + utils/common/v4l2-info.cpp | 7 +- utils/common/v4l2-info.h | 8 + utils/tracer/.gitignore | 9 + utils/tracer/Makefile.am | 23 + utils/tracer/libtracer.cpp | 217 ++++++ utils/tracer/libtracer.h | 92 +++ utils/tracer/retrace-helper.cpp | 141 ++++ utils/tracer/retrace-helper.h | 18 + utils/tracer/retrace-vp8.cpp | 288 ++++++++ utils/tracer/retrace-vp8.h | 11 + utils/tracer/retracer.cpp | 1090 +++++++++++++++++++++++++++++++ utils/tracer/retracer.h | 24 + utils/tracer/trace-helper.cpp | 218 +++++++ utils/tracer/trace-info.cpp | 358 ++++++++++ utils/tracer/trace-info.h | 72 ++ utils/tracer/trace-vp8.cpp | 183 ++++++ utils/tracer/trace.cpp | 520 +++++++++++++++ utils/tracer/tracer.cpp | 91 +++ 20 files changed, 3375 insertions(+), 6 deletions(-) create mode 100644 utils/tracer/.gitignore create mode 100644 utils/tracer/Makefile.am create mode 100644 utils/tracer/libtracer.cpp create mode 100644 utils/tracer/libtracer.h create mode 100755 utils/tracer/retrace-helper.cpp create mode 100644 utils/tracer/retrace-helper.h create mode 100755 utils/tracer/retrace-vp8.cpp create mode 100644 utils/tracer/retrace-vp8.h create mode 100755 utils/tracer/retracer.cpp create mode 100644 utils/tracer/retracer.h create mode 100644 utils/tracer/trace-helper.cpp create mode 100644 utils/tracer/trace-info.cpp create mode 100644 utils/tracer/trace-info.h create mode 100644 utils/tracer/trace-vp8.cpp create mode 100644 utils/tracer/trace.cpp create mode 100644 utils/tracer/tracer.cpp -- 2.37.1