Skip to content

pv-wrap: Create a PvWrapContext object to store global state

Simon McVittie requested to merge wip/smcv/pv-wrap-context into main
  • pv-wrap: Create a PvWrapContext object to store global state

    This initially only contains a copy of the original environment, but other global state such as command-line options should move into it over time. This will allow command-line parsing and similar things to be unit-tested.

  • pv-wrap: Move argv parsing and simple environment parsing to PvWrapContext

    No functional change intended, except that now, pass_fds and preload_modules are always non-NULL (but may be empty).

  • tests: Add basic test coverage for pv-wrap arguments parsing


Part of my ongoing efforts to make pressure-vessel more unit-testable (and when we add new things, add them somewhere that is more amenable to being tested).

Edited by Simon McVittie

Merge request reports