Gas-pressure-based testing, in some embodiments, features a self-leak-testing module (120) that includes an internal sensor and is configured for measuring, using the sensor, gas leakage (179, 180) from a set of walls that defines respective gas passageways that both exist within the module and are incident to the gas pressure measured. One or more walls of the set may extend outside the module. The module can be configured for deciding, based on a result of the measuring, whether a magnitude of the leakage exceeds a predetermined threshold. A source for applying the pressure may be internal (138) or external (104, 132, 135). Gas pressure based pattern recognition can be used to identify, optionally during treatment and in real time, one or more leak sites responsible for the leakage. The module is implementable as a ventilation monitoring module that measures differential flow of a breathing circuit, the testing serving to prevent cross-contamination of patients.