* fix(tia): free the ReadCapture wrapper each time it steps aside
stream_wrapper_restore() takes a user wrapper out of the wrapper table
but does not free it, so every filesystem call made while a test records
kept one until the process ended. Unregistering it first frees it.
* fix(tia): skip the unregister when file:// is already gone
A test can unregister file:// itself. stream_wrapper_unregister() then
warns, where stream_wrapper_restore() alone did not, so check first.
Also run the per-test memory check over 5,000 tests and update the
snapshot and parallel totals for the new tests.
* Use fopen() in the memory regression test
---------
Co-authored-by: Mohannad Elemary <20709195+MohannadElemary@users.noreply.github.com>
* Stat once in ReadCapture url_stat
* Keep quiet url_stat probes away from error handlers
---------
Co-authored-by: Punyapal Shah <mrpunyapal@gmail.com>
* fix(tia): link files a test reads as text, not only files it executes
* fix(tia): report dangling symlinks as links while reads are captured
`is_link()` stats with STREAM_URL_STAT_LINK | STREAM_URL_STAT_QUIET.
The `file_exists()` precheck in `ReadCapture::url_stat()` follows the
link, so a dangling symlink returned false before reaching `lstat()`,
and `is_link()` reported false while a test recorded.
Handle STREAM_URL_STAT_LINK first and always answer it through
`lstat()`. A quiet stat of a path that is neither a link nor a file
still returns false without a warning.
The regression test covers a link to an existing file and a dangling
link.
* test(tia): skip the read-capture feature tests without a coverage driver
The fixture runs record a graph from coverage, so with CI's
`coverage: none` all five cases failed. Skip them when
`Coverage::isAvailable()` is false, as CoveragePiggyback does.
* chore: style
* Refresh read capture test snapshots
---------
Co-authored-by: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com>
Co-authored-by: Punyapal Shah <mrpunyapal@gmail.com>