Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions run-tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -2769,6 +2769,9 @@ function run_test(string $php, $file, array $env): string
"valgrind")
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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think you can make a reasonable argument for not having -o /tmp/strace, but having to make people remember the other arguments seems annoying. In that case, I would just keep my own patch and not bother with this.

;;
"rr")
rr record $2 {$orig_cmd}
;;
Expand Down
Loading