-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Remove ignored lines from tests #4872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
See https://qa.php.net/write-test.php#lastbit for why these exist. Personally I don't think I ever cared about this and I don't think anyone does it for new tests, so I think it's okay to drop them if we like. However, if we do we should also drop the |
@nikic The unnecessary Do you agree that I also remove the part about this tag from |
I see thousands of files changed, I don't think it appropriate to merge this into 7.4 ... generally we merge test changes like this into master only ... I'm neutral on the actual change, but if it's going to happen please make pulls for qa and anywhere else this is documented. |
@krakjoe the PR now targets master After thinking it through I'm reluctant to remove this feature entirely since it causes no harm and I don't know how it is used by third-party PHP extensions. I still think this PR has value though: |
In the FILE section every lines after ===DONE=== are ignored. These lines give the false impression that they have a reason to be there. Removing these lines removes also this ambiguity.
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.
I haven't reviewed all the changes, assuming everything is as expected here...
Agree that support should not be dropped from run-tests.php, as 3rd party tests are definitely using this, and having an exit(0) in a test causes a lot of damage, we definitely do not want that to accidentally run.
@nikic @villfa Couldn't this result in missing some crashes. For example if a555cc0#diff-3ae61fee455644f3a3c763c005fdbf57L12 |
@bukka The presence or the absence of |
@bukka A message is appended to the test output if it exits with an unusual exit code. |
@nikic Would that still be the case if the library / extension exited successfully (e.g. calling C exit(0)) somehow because of the bug? |
I share @bukka's concerns... Take e.g.: --TEST--
Dummy example
--FILE--
<?php
// the following call is expected to "println" its arg then let the script continue:
some_function('Hello world!');
?>
Done.
--EXPECT--
Hello world!
Done. If a bug in the implementation of In general I like the last line of a test to be a hard output, to make sure everything is executed to the end. |
In the FILE section every lines after
===DONE===
are ignored.These lines give the false impression that they have a reason to be there.
Removing these lines removes also this ambiguity.