|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #79913 use exec in sh files generated by run-test.php
Submitted: 2020-07-29 22:25 UTC Modified: 2020-07-29 23:18 UTC
From: santi at mola dot io Assigned: beberlei (profile)
Status: Closed Package: Testing related
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: santi at mola dot io
New email:
PHP Version: OS:


 [2020-07-29 22:25 UTC] santi at mola dot io
I often use gdb to debug a failed phpt tests, usually by editing the generated .sh file and prepending "gdb --args" to the command. It is also possible to run gdb directly on the .sh file (setting follow-fork-mode child) but it is less convenient, and also problematic if the test itself forks.

This can be solved by just running the test command with "exec". AFAIK this should be inocuous for regular test running, but quite convenient when running gdb.

Test script:
gdb --args bash tests/failing_tests.phpt

Expected result:
gdb running normally

Actual result:
gdb debugging the parent bash process instead (by default)


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-07-29 22:28 UTC] santi at mola dot io
The following pull request has been associated:

Patch Name: Fix #79913: add exec to run-tests.php's sh files
On GitHub:
 [2020-07-29 23:18 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: beberlei
 [2020-07-29 23:18 UTC]
Hey Santi,

thank you for your contribution, but run-tests.php in master is changed already to allow running " gdb" to directly go into GDB. It is a different approach, but arrives at the same result. As this is a new feature, your PR will not get merged into 7.3 or 7.4 both receiving only bugfixes.

I am therefore closing this issue.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Jul 29 20:01:24 2021 UTC