Skip to content

Add 'strace' sub command for generated test reproduction scripts#22529

Open
derickr wants to merge 1 commit into
php:masterfrom
derickr:run-tests-strace
Open

Add 'strace' sub command for generated test reproduction scripts#22529
derickr wants to merge 1 commit into
php:masterfrom
derickr:run-tests-strace

Conversation

@derickr

@derickr derickr commented Jun 30, 2026

Copy link
Copy Markdown
Member

This adds strace to the options for running the reproducing .sh files that the test runner creates when a test fails. This is useful in case the test itself starts other scripts, and/or does IO between them or at all.

I have had this in Xdebug's variant for some time now, and it would be nice not to maintain my patch for this specific item.

@derickr derickr requested review from TimWolla and iluuu1994 June 30, 2026 14:26
Comment thread run-tests.php
USE_ZEND_ALLOC=0 valgrind $2 {$orig_cmd}
;;
"strace")
strace -o /tmp/strace -tt -ff $2 {$orig_cmd}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should write to hardcoded filenames on the file system - and perhaps not add opinionated options either. The -o /tmp/strace can be provided as a parameter.

Perhaps it might make sense to adjust all the cases as follows:

Suggested change
strace -o /tmp/strace -tt -ff $2 {$orig_cmd}
shift
strace "$@" {$orig_cmd}

This should then cleanly enable tests/test.sh strace -tt -ff -o /tmp/strace

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.

3 participants