Skip to content

support running testsuite with negative niceness#11481

Merged
iluuu1994 merged 2 commits into
php:masterfrom
divinity76:patch-10
Jun 21, 2023
Merged

support running testsuite with negative niceness#11481
iluuu1994 merged 2 commits into
php:masterfrom
divinity76:patch-10

Conversation

@divinity76

@divinity76 divinity76 commented Jun 19, 2023

Copy link
Copy Markdown
Contributor

a bug in the regex would break getNice() if the current niceness was negative, which would make the whole test fail.

Previously:
this would fail:
time sudo nice --adjustment=-19 ./php run-tests.php -j$(nproc) -x --offline ext/standard/tests/general_functions/proc_nice_basic.phpt --color --show-all

and this would work:
time sudo ./php run-tests.php -j$(nproc) -x --offline ext/standard/tests/general_functions/proc_nice_basic.phpt --color --show-all

now they both work.

a bug in the regex would break getNice() if the current niceness was negative, which would make the whole test fail.

Previously:
this would fail:
time sudo nice --adjustment=-19 ./php run-tests.php -j$(nproc) -x --offline ext/standard/tests/general_functions/proc_nice_basic.phpt --color --show-all

and this would work: 
time sudo ./php run-tests.php -j$(nproc) -x --offline ext/standard/tests/general_functions/proc_nice_basic.phpt --color --show-all
Comment thread ext/standard/tests/general_functions/proc_nice_basic.phpt Outdated
Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz>
@iluuu1994 iluuu1994 merged commit 4960070 into php:master Jun 21, 2023
@iluuu1994

Copy link
Copy Markdown
Member

Thank you @divinity76!

iluuu1994 pushed a commit that referenced this pull request Sep 22, 2023
* support running testsuite with negative niceness

a bug in the regex would break getNice() if the current niceness was negative, which would make the whole test fail.

Previously:
this would fail:
time sudo nice --adjustment=-19 ./php run-tests.php -j$(nproc) -x --offline ext/standard/tests/general_functions/proc_nice_basic.phpt --color --show-all

and this would work: 
time sudo ./php run-tests.php -j$(nproc) -x --offline ext/standard/tests/general_functions/proc_nice_basic.phpt --color --show-all

* Update ext/standard/tests/general_functions/proc_nice_basic.phpt

Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz>

---------

Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz>
iluuu1994 added a commit that referenced this pull request Sep 22, 2023
* PHP-8.1:
  support running testsuite with negative niceness (#11481)
iluuu1994 added a commit that referenced this pull request Sep 22, 2023
* PHP-8.2:
  support running testsuite with negative niceness (#11481)
iluuu1994 added a commit that referenced this pull request Sep 22, 2023
* PHP-8.3:
  support running testsuite with negative niceness (#11481)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants