php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: santi at mola dot io
New email:
PHP Version: OS:

 

 [2020-07-29 22:25 UTC] santi at mola dot io
Description:
------------
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)

Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

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:  https://github.com/php/php-src/pull/5909
Patch:      https://github.com/php/php-src/pull/5909.patch
 [2020-07-29 23:18 UTC] beberlei@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: beberlei
 [2020-07-29 23:18 UTC] beberlei@php.net
Hey Santi,

thank you for your contribution, but run-tests.php in master is changed already to allow running "some-test.sh 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-2020 The PHP Group
All rights reserved.
Last updated: Wed Dec 02 01:01:24 2020 UTC