Bug #79923 [Opn]: socket_set_option_bindtodevice.phpt fails on PHP 8

From: Date: Sun, 02 Aug 2020 13:53:42 +0000
Subject: Bug #79923 [Opn]: socket_set_option_bindtodevice.phpt fails on PHP 8
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-228374@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79923&edit=1

 ID:                 79923
 User updated by:    santi at mola dot io
 Reported by:        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
 Status:             Open
 Type:               Bug
 Package:            Sockets related
 Operating System:   Linux
 PHP Version:        8.0.0alpha3
 Block user comment: N
 Private report:     N

 New Comment:

Updated summary, introduced a dupe one with autocompletion.


Previous Comments:
------------------------------------------------------------------------
[2020-08-02 13:49:39] 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


------------------------------------------------------------------------



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


Thread (4 messages)

« previous php.bugs (#228374) next »