php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79923 socket_set_option_bindtodevice.phpt fails on PHP 8
Submitted: 2020-08-02 13:49 UTC Modified: 2020-08-02 13:53 UTC
From: santi at mola dot io Assigned:
Status: Closed Package: Sockets related
PHP Version: 8.0.0alpha3 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: santi at mola dot io
New email:
PHP Version: OS:

 

 [2020-08-02 13:49 UTC] santi at mola dot io
Description:
------------
A change in error text (initial capitalization) for the socket extensions makes a test fail in PHP 8.

The issue was introduced here: https://github.com/php/php-src/commit/7ff8eaa5451275a5ce97b29381fc08412e6489d7

The test is ext/sockets/tests/socket_set_option_bindtodevice.phpt

Test script:
---------------
#!/bin/sh
# Run on the ubuntu:20.04 docker image:
#   docker run --rm --privileged -v $(pwd):/work -w /work ubuntu:20.04 /work/repro.sh
set -ex
DEBIAN_FRONTEND=nointeractive
apt-get update
apt-get install -y --no-install-recommends autoconf bison \
build-essential locales openssl re2c pkg-config
./buildconf -f
./configure --disable-all --disable-phpdbg --enable-posix --enable-sockets --without-libxml --without-sqlite3 --without-pdo-sqlite
make -j $(nproc)
make test TESTS=ext/sockets/tests/socket_set_option_bindtodevice.phpt



Actual result:
--------------
---- EXPECTED OUTPUT
bool(true)

Warning: socket_set_option(): unable to set socket option [19]: No such device in %s on line %d
bool(false)
---- ACTUAL OUTPUT
bool(true)

Warning: socket_set_option(): Unable to set socket option [19]: No such device in /work/ext/sockets/tests/socket_set_option_bindtodevice.php on line 10
bool(false)
---- FAILED

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-08-02 13:53 UTC] santi at mola dot io
-Summary: use exec in sh files generated by run-test.php +Summary: socket_set_option_bindtodevice.phpt fails on PHP 8
 [2020-08-02 13:53 UTC] santi at mola dot io
Updated summary, introduced a dupe one with autocompletion.
 [2020-08-02 13:57 UTC] santi at mola dot io
The following pull request has been associated:

Patch Name: Fix #79923: fix socket_set_option_bindtodevice test
On GitHub:  https://github.com/php/php-src/pull/5924
Patch:      https://github.com/php/php-src/pull/5924.patch
 [2020-08-03 13:03 UTC] nikic@php.net
Automatic comment on behalf of santi@mola.io
Revision: http://git.php.net/?p=php-src.git;a=commit;h=65713aadddaaca1b08ab6102890406f48c75475d
Log: Fix #79923: fix socket_set_option_bindtodevice test
 [2020-08-03 13:03 UTC] nikic@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 19:01:27 2024 UTC