Bug #80138 [PATCH]: getservbyname and getservbyport tests fail if there is no /etc/services

2020-09-23 Thread sigs...@makadev.de
Edit report at https://bugs.php.net/bug.php?id=80138&edit=1

 ID: 80138
 Patch added by: [email protected]
 Reported by:sigsegv at makadev dot de
 Summary:getservbyname and getservbyport tests fail if there
 is no /etc/services
 Status: Open
 Type:   Bug
 Package:Testing related
 Operating System:   debian:buster (docker container)
 PHP Version:8.0Git-2020-09-22 (Git)
 Block user comment: N
 Private report: N

 New Comment:

The following pull request has been associated:

Patch Name: Fix #80138: skip getservbyname() and getservbyport() tests on *nix 
if there is no /etc/services file
On GitHub:  https://github.com/php/php-src/pull/6191
Patch:  https://github.com/php/php-src/pull/6191.patch


Previous Comments:

[2020-09-22 19:17:00] sigsegv at makadev dot de

Description:

the following tests fail inside a debian:buster (and most likely other) 
container because /etc/services doesn't exist:

Test function getservbyport() by calling it more than or less than its expected 
arguments [ext/standard/tests/general_functions/getservbyport_basic.phpt]
Test function getservbyport() by calling it more than or less than its expected 
arguments [ext/standard/tests/general_functions/getservbyport_variation1.phpt]
Test function getservbyname() 
[ext/standard/tests/general_functions/getservbyname_basic.phpt]


Expected result:

tests should be skipped if /etc/services doesn't exist

Actual result:
--
tests fail:


/home/php-tester/php-src/ext/standard/tests/general_functions/getservbyport_basic.phpt

Linux unsupported

001+ Linux unsupported
001- PASS





/home/php-tester/php-src/ext/standard/tests/general_functions/getservbyport_variation1.phpt

bool(false)
bool(false)
bool(false)
bool(false)
bool(false)

--
 bool(false)
 bool(false)
 bool(false)
005+ bool(false)
005- string(%d) "%s"





/home/php-tester/php-src/ext/standard/tests/general_functions/getservbyname_basic.phpt

bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)

001+ bool(false)
002+ bool(false)
003+ bool(false)
004+ bool(false)
005+ bool(false)
006+ bool(false)
007+ bool(false)
008+ bool(false)
009+ bool(false)
010+ bool(false)
011+ bool(false)
001- int(%d)
002- int(%d)
003- int(%d)
004- int(%d)
005- int(%d)
006- int(%d)
007- int(%d)
008- int(%d)
009- int(%d)
010- int(%d)
011- int(%d)







--
Edit this bug report at https://bugs.php.net/bug.php?id=80138&edit=1


Bug #80137 [PATCH]: getprotobyname and getprotobynumber fail since there is no /etc/protocols

2020-09-23 Thread sigs...@makadev.de
Edit report at https://bugs.php.net/bug.php?id=80137&edit=1

 ID: 80137
 Patch added by: [email protected]
 Reported by:sigsegv at makadev dot de
 Summary:getprotobyname and getprotobynumber fail since there
 is no /etc/protocols
 Status: Open
 Type:   Bug
 Package:Testing related
 Operating System:   debian:buster (docker container)
 PHP Version:8.0Git-2020-09-22 (Git)
 Block user comment: N
 Private report: N

 New Comment:

The following pull request has been associated:

Patch Name: Fix #80137: skip getprotobyname() and getprotobynumber() tests on 
*nix if there is no /etc/protocols file
On GitHub:  https://github.com/php/php-src/pull/6193
Patch:  https://github.com/php/php-src/pull/6193.patch


Previous Comments:

[2020-09-22 19:10:03] sigsegv at makadev dot de

Description:

The following tests fail inside a debian:buster (and most likely other) 
container because /etc/protocols doesn't exist:

getprotobyname function basic test 
[ext/standard/tests/network/getprotobyname_basic.phpt]
getprotobynumber function basic test 
[ext/standard/tests/network/getprotobynumber_basic.phpt]


Expected result:

the test should be skipped if /etc/protocols doesn't exist

Actual result:
--
the test fails:


/home/php-tester/php-src/ext/standard/tests/network/getprotobyname_basic.phpt

bool(false)

001+ bool(false)
001- int(6)





/home/php-tester/php-src/ext/standard/tests/network/getprotobynumber_basic.phpt

bool(false)

001+ bool(false)
001- string(3) "tcp"








--
Edit this bug report at https://bugs.php.net/bug.php?id=80137&edit=1