Skip to content

Fix timeout worker output filtering and failing p-code tests - #307

Merged
trufae merged 1 commit into
masterfrom
fix/timeout-worker-output
Oct 18, 2026
Merged

trufae merged 1 commit into
masterfrom
fix/timeout-worker-output

Conversation

@trufae

@trufae trufae commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

The two failing Linux CI tests exercise pdgj/pdgx with r2ghidra.timeout. The child flushes directly to stdout, bypassing the parent console where JSON selectors, grep counts and redirections are applied. The tests also set the plugin option with -e before plugin initialization, producing an unknown-variable error on radare2 6.2.4.

Send the child's raw console buffer through the pipe and append it to the parent console after successful completion. Drain the pipe while enforcing a monotonic deadline so output larger than the pipe capacity cannot deadlock. Reset the inherited child buffer, handle interrupted/partial I/O, close descriptors on fork failure, and use _exit to avoid flushing inherited stdio. Set the timeout inside the existing test command sequences after plugin initialization.

Validation against the same radare2 6.2.4 release used by CI:

  • Full make -C test: 189 passed, 0 failed.
  • Original worker code with corrected test setup: 6 passed, 2 failed; fixed worker: 8 passed.
  • C, JSON and XML output matches direct execution byte-for-byte (2,045 / 55,293 / 95,839 bytes).
  • Checked buffered output without duplication, JSON file redirection without stdout leakage, and a forced 1ms timeout followed by successful decompilation.

The macOS ARM failure in the master run was a transient Could not resolve host: github.com while cloning ghidra-native. That job has been retried; no platform build workaround is included.

@trufae
trufae merged commit af847a9 into master Oct 18, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant