1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 19:41:05 +02:00
Commit Graph

83 Commits

Author SHA1 Message Date
Nikita Popov
ef773bf4d5 Remove posix_kill() test
This test is doing something really dubious. There's a race
condition here that would kill some poor process that happens
to start at just the wrong time.
2020-08-05 10:39:30 +02:00
Matteo Beccati
5c8124d311 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Skip test when SIGKILL is not defined
2019-08-09 10:33:15 +02:00
Matteo Beccati
5ef1a30aaf Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Skip test when SIGKILL is not defined
2019-08-09 10:32:56 +02:00
Matteo Beccati
796efd849e Skip test when SIGKILL is not defined 2019-08-09 10:32:15 +02:00
Nikita Popov
08027e85fa Remove posix_getlogin_basic.phpt test
The premise of this test (that the getlogin user has to be the same
as the geteuid user) is incorrect.
2019-06-27 16:15:13 +02:00
Peter Kokot
a29bf46b68 Fix posix_errno test without PCNTL dep
When PCNTL extension is not enabled, the SIGKILL constant is also not
available.
2019-06-27 00:24:37 +02:00
Nikita Popov
d584f92195 Add debug output to posix_getlogin() test 2019-06-17 13:05:59 +02:00
Joe Watkins
829d046241 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  fix flaky posix test
2019-06-05 16:35:55 +02:00
Joe Watkins
249c20023d Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  fix flaky posix test
2019-06-05 16:35:43 +02:00
Joe Watkins
f4474e5724 fix flaky posix test 2019-06-05 16:34:50 +02:00
Joe Watkins
d669d55fe1 skip where no groups available 2019-06-01 07:36:03 +02:00
Nikita Popov
33a149afba Remove posix_getlogin() check from posix_getpwnam() test
It doesn't make sense to pass false to posix_getpwnam(). I'm not
sure what exactly this is guarding against, but it won't work in
this form.
2019-04-10 14:43:52 +02:00
Nikita Popov
10b4113638 Remove more zpp error tests 2019-03-05 17:09:09 +01:00
Rodrigo Prado
54ef8d13d8 Test for function posix_getpwnam() basic functionality
The coverage for the function posix_getpwnam() that was not covered yet.
http://gcov.php.net/PHP_HEAD/lcov_html/ext/posix/posix.c.gcov.php#1182
Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
User Group: PHPSP #PHPTestFestBrasil
2019-03-01 02:01:52 +01:00
Rodrigo Prado de Jesus
c2eb68aafe Add test to function posix_getlogin()
Increased the coverage lines 587-595 in file ext/posix/posix.c

User Groups: PHPVale   PHPSP   PHPDF    PHPWomenBR

Hangout presented by #PHPTestFestBrasil on 2017-11-14
https://www.youtube.com/watch?v=bBWkzZEadNo
2019-02-14 20:49:25 +01:00
Rodrigo Prado
2c90beacf0 Create posix_getpwnam_basic_01.phpt
User Group: PHPSP #phptestfestbrasil
2019-02-14 20:36:53 +01:00
Riccardo Magliocchetti
4411cb6656 Add basic test for posix getgrnam 2019-02-14 20:28:11 +01:00
Nikita Popov
b5f852a8cb Some more test removals
Noticed these while implementing error handler changes.
2019-02-05 12:42:18 +01:00
Nikita Popov
8bc663f43b Remove zpp variation tests 2019-02-05 09:38:55 +01:00
Peter Kokot
d679f02295 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:33:09 +02:00
Peter Kokot
b746e69887 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:32:30 +02:00
Peter Kokot
f1d7e3ca0b Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:31:31 +02:00
Peter Kokot
d7a3edd45d Trim trailing whitespace in *.phpt 2018-10-14 19:46:15 +02:00
Peter Kokot
782352c54a Trim trailing whitespace in *.phpt 2018-10-14 19:45:12 +02:00
Peter Kokot
17ccbeec32 Trim trailing whitespace in *.phpt 2018-10-14 19:44:14 +02:00
Gabriel Caruso
9c144e0d82 Trim trailing whitespace in tests 2018-10-14 12:07:20 -03:00
Christoph M. Becker
0a51e75e28 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #75696: posix_getgrnam fails to print details of group
2018-09-01 14:30:08 +02:00
Christoph M. Becker
7bcda659f8 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #75696: posix_getgrnam fails to print details of group
2018-09-01 14:28:13 +02:00
Christoph M. Becker
2677d43850 Fix #75696: posix_getgrnam fails to print details of group
According to the POSIX specification of `getgrnam_r()` the result of
`sysconf(_SC_GETGR_R_SIZE_MAX)` is an initial value suggested for the
size of the buffer, and `ERANGE` signals that insufficient storage was
supplied.  So if we get `ERANGE`, we try again with a buffer twice as
big, and so on, instead of failing.
2018-09-01 14:25:59 +02:00
Gabriel Caruso
ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
Gabriel Caruso
ce1d69a1f6 Use int instead of integer in type errors
PHP requires integer typehints to be written "int" and does not
allow "integer" as an alias. This changes type error messages to
match the actual type name and avoids confusing messages like
"must be of the type integer, integer given".
2018-02-04 19:08:23 +01:00
Gabriel Caruso
53dbc69a8d Use %d when expecting line number in tests 2018-02-02 22:35:13 +01:00
Tom Van Looy
04fb3f28ff Remove superfluous semicolons 2017-06-26 00:23:25 +02:00
Shaikhul Chowdhury
6ee932ccce Add basic test for posix_setegid function 2017-06-02 23:43:56 +02:00
Nikita Popov
fb008bf60e Remove obsolete version checks from tests 2017-02-02 00:58:04 +01:00
Christoph M. Becker
727b422ad9 Fix #72948: Uncatchable "Catchable" fatal error for class to string conversions
E_RECOVERABLE errors are reported as "Catchable fatal error". This is
misleading, because they actually can't be caught via try-catch statements.
Therefore we change the wording to "Recoverable fatal error" as suggested by
Nikita.
2016-09-03 13:05:37 +02:00
Magnus Määttä
963d906aff Add posix_setrlimit() FR #54603 2015-07-08 22:12:07 +02:00
Andrea Faulds
e5eb9530ab Use "float" and "integer" in typehint and zpp errors 2014-12-21 13:23:02 +00:00
Andrea Faulds
088580557d skip posix 32-bit 2014-11-28 23:39:08 +00:00
Florian MARGAINE
62f6c3c0c4 Fixes posix tests 2014-11-09 22:48:56 +01:00
Stanislav Malyshev
b727934591 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix test - on CI somebody could create a process in the meantime
2014-04-14 15:45:53 -07:00
Stanislav Malyshev
eea75e7146 Fix test - on CI somebody could create a process in the meantime 2014-04-14 15:44:23 -07:00
Rasmus Lerdorf
2129de4569 These getpwnam('') tests are silly and not portable 2013-10-20 14:04:47 -07:00
Veres Lajos
8d86597d73 non living code related typo fixes 2013-08-04 16:05:36 -07:00
David Soria Parra
b9babd22e0 Merge branch 'PHP-5.3' into PHP-5.4
By Stanislav Malyshev (1) and michelangelo (1)
* PHP-5.3:
  Adding a test for ext/posix/tests/posix_getegid_basic.phpt
  typo
2012-06-10 17:08:02 +04:00
michelangelo
cda14b995c Adding a test for ext/posix/tests/posix_getegid_basic.phpt 2012-06-10 17:07:49 +04:00
zoe slattery
d99203d44b Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Small fixes to tests, see #62022
2012-05-15 11:43:28 +01:00
zoe slattery
e35f09d774 Small fixes to tests, see #62022 2012-05-15 11:42:14 +01:00
Stanislav Malyshev
d81ea16ef1 Changed silent conversion of array to string to produce a notice. (Patrick) 2011-10-21 06:08:47 +00:00
Ulf Wendel
58e167974c Fixing SKIPIF 2011-09-06 16:39:55 +00:00