GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix remaining skipped tests by carlos-granados · Pull Request #61 · php-debugger/php-debugger

Conversation

@carlos-granados

@carlos-granados carlos-granados commented Apr 19, 2026

Copy link
Copy Markdown
Collaborator

There were several tests which had been skipped as they failed in the new debugger. This PR fixes all the remaining cases. In most places we just need to adjust the test but there was an important bug where we had removed the call to the existing php error handler which resulted in several failures and which would have made error handling not work properly with the php-debugger installed.

This PR also removes all the tests which targeted versions of PHP lower than PHP 8.2

With these changes and the changes proposed in the two PRs which fix the remaining XFAIL tests, all tests are passing as in the initial fork 🎉

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

pronskiy reacted with hooray emoji
All reactions
  • 🎉 1 reaction
carlos-granados
carlos-granados commented Apr 19, 2026
View reviewed changes
Comment thread src/base/base.c

xdfree(error_type_str);
}
xdebug_old_error_cb(orig_type, error_filename, error_lineno, message);

@carlos-granados carlos-granados Apr 19, 2026

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This was an important bug, we had removed calling the existing php error handler and this resulted in several issues

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
carlos-granados
carlos-granados commented Apr 19, 2026
View reviewed changes
Comment thread tests/base/bug01048-002.phpt Outdated

@carlos-granados carlos-granados Apr 19, 2026

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

We removed all tests which targeted PHP versions lower than 8.2

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
carlos-granados
carlos-granados commented Apr 19, 2026
View reviewed changes
Comment thread tests/debugger/bug00494.phpt

@carlos-granados carlos-granados Apr 19, 2026

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

After removing the tests that targeted versions lower than 8.2 we sometimes were left with versions of the tests which targeted all the versions that we handle. In that case it does not make sense to name them with a specific version, so I renamed them

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
carlos-granados
carlos-granados commented Apr 19, 2026
View reviewed changes
Comment thread tests/debugger/bug00790-001.phpt
<?php
require __DIR__ . '/../utils.inc';
check_reqs('dbgp');
if (is_stripped_debugger()) die('skip Known issue in stripped build');

@carlos-granados carlos-granados Apr 19, 2026

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Bug fixed by the change in the error callback

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
carlos-granados
carlos-granados commented Apr 19, 2026
View reviewed changes
Comment thread tests/debugger/bug01656.phpt
var_dump( $_SERVER['I_LIKE_COOKIES'] );
?>
--EXPECTF--
Xdebug: [Step Debug] %sTried: 127.0.0.1:9999 (from I_LIKE_COOKIES HTTP header), localhost:9999 (fallback through xdebug.client_host/xdebug.client_port).

@carlos-granados carlos-granados Apr 19, 2026

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Our debugger does not print a message when it cannot connect, so this needs to be removed from the output of some tests

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
carlos-granados
carlos-granados commented Apr 19, 2026
View reviewed changes
Comment thread tests/debugger/bug01901.phpt
@@ -1,10 +1,5 @@
--TEST--
Test for bug #1901: Stack traces are shown (with a broken time) when Xdebug's mode includes 'debug' but not 'develop' or 'trace'
--SKIPIF--

@carlos-granados carlos-granados Apr 19, 2026

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Fixed by the change in the error callback

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
carlos-granados
carlos-granados commented Apr 19, 2026
View reviewed changes
Comment thread tests/debugger/bug02250.phpt
@@ -1,10 +1,5 @@
--TEST--
Test for bug #2250: Multiple 'DEBUG SESSION ENDED' messages
--SKIPIF--

@carlos-granados carlos-granados Apr 19, 2026

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Not really sure which of our changes fixed this, but now it works

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
carlos-granados
carlos-granados commented Apr 19, 2026
View reviewed changes
Comment thread tests/debugger/bug02322.phpt
}
?>
--EXPECTF--
Xdebug: [Step Debug] %sdebugging client%s

@carlos-granados carlos-granados Apr 19, 2026

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

We don't print a message if we can't connect

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
carlos-granados
carlos-granados commented Apr 19, 2026
View reviewed changes
Comment thread tests/debugger/bug02251.phpt
@unlink(getTmpFile('bug02251.log'));
?>
--EXPECTF--
%A[Step Debug] %sTried: localhost:9172 (through xdebug.client_host/xdebug.client_port).

@carlos-granados carlos-granados Apr 19, 2026

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

What is logged is different as our start sequence is different, but this is not important for this test which actually tests that the log configuration is picked from the env variables

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
carlos-granados
carlos-granados commented Apr 19, 2026
View reviewed changes
Comment thread tests/debugger/bug02251.phpt
--ENV--
XDEBUG_CONFIG=log={TMPFILE:bug02251.log}
--INI--
xdebug.mode=debug,develop

@carlos-granados carlos-granados Apr 19, 2026

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This is not important for the test

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
carlos-granados
carlos-granados commented Apr 19, 2026
View reviewed changes
Comment thread tests/debugger/bug02381.phpt
<?php
require __DIR__ . '/../utils.inc';
check_reqs('dbgp');
if (is_stripped_debugger()) die('skip Known issue in stripped build');

@carlos-granados carlos-granados Apr 19, 2026

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Fixed by our change in the error handler

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
carlos-granados
carlos-granados commented Apr 19, 2026
View reviewed changes
Comment thread tests/debugger/remote_log-unix-2.phpt
[%d] [Step Debug] WARN: Invalid remote address provided containing URI spec 'unix:///tmp/haxx0r.sock'.
[%d] [Step Debug] WARN: Could not discover client host through HTTP headers, connecting to configured address/port: unix:///tmp/xdbg.sock:0.
[%d] [Step Debug] WARN: Creating socket for 'unix:///tmp/xdbg.sock', connect: No such file or directory.
[%d] [Step Debug] ERR: Could not connect to debugging client. Tried: unix:///tmp/xdbg.sock:0 (fallback through xdebug.client_host/xdebug.client_port).

@carlos-granados carlos-granados Apr 19, 2026

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

In the logs we don't log an error when we can't connect to a client

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
carlos-granados
carlos-granados commented Apr 19, 2026
View reviewed changes
Comment thread tests/debugger/dbgp-breakpoint-return-function-006.phpt
'step_into',
'context_get',
'property_get -n $__RETURN_VALUE',
'property_get -n $__RETURN_VALUE[1]',

@carlos-granados carlos-granados Apr 19, 2026

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The stack that we get does not have as much detail as the one provided by xdebug. However this is not very important for this test which actually tests that we can access the return value when the function at the top of the frame is internal, so checking for less detail is fine

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@carlos-granados
carlos-granados requested a review from pronskiy April 19, 2026 17:40
@carlos-granados
carlos-granados force-pushed the fix/skipped-tests branch from ff40147 to 28dc8e0 Compare April 19, 2026 19:36
@carlos-granados
fix remaining skipped tests
e120c02
# Conflicts:
#	src/base/base.c
@carlos-granados
carlos-granados force-pushed the fix/skipped-tests branch from 28dc8e0 to e120c02 Compare April 19, 2026 21:13
@carlos-granados
Fix bug found by ASAN + UBSAN
9508ce5
@carlos-granados
carlos-granados force-pushed the fix/skipped-tests branch from e97fb4b to 9508ce5 Compare April 19, 2026 21:30
carlos-granados
carlos-granados commented Apr 19, 2026
View reviewed changes
Comment thread src/debugger/com.c
xdfree(header_name);
}

xdebug_arg_dtor(headers);

@carlos-granados carlos-granados Apr 19, 2026

Copy link
Copy Markdown
Collaborator Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Includes some fixes to memory leaks found by USBAN. These had not been seen before because the tests that run this code were skipped

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
pronskiy
pronskiy approved these changes Apr 22, 2026
View reviewed changes

@pronskiy pronskiy left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

👍

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@carlos-granados
carlos-granados merged commit b209bc5 into php-debugger:main Apr 22, 2026
14 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@carlos-granados
carlos-granados deleted the fix/skipped-tests branch April 22, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@pronskiy pronskiy pronskiy approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@carlos-granados @pronskiy
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.