php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80138 getservbyname and getservbyport tests fail if there is no /etc/services
Submitted: 2020-09-22 19:17 UTC Modified: -
From: sigsegv at makadev dot de Assigned:
Status: Closed Package: Testing related
PHP Version: 8.0Git-2020-09-22 (Git) OS: debian:buster (docker container)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sigsegv at makadev dot de
New email:
PHP Version: OS:

 

 [2020-09-22 19:17 UTC] 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)
================================================================================

Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-09-23 12:34 UTC] sigsegv at makadev dot de
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
 [2020-09-29 08:59 UTC] nikic@php.net
Automatic comment on behalf of karbe@celloon.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=28991373917da1964d457994245eb0a7c83ca19e
Log: Fix bug #80138
 [2020-09-29 08:59 UTC] nikic@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Oct 25 19:01:23 2020 UTC