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

 ID:                 74082
 Updated by:         c...@php.net
 Reported by:        edward dot vielmetti at gmail dot com
 Summary:            Test strncmp() function : usage variations - binary
                     safe(binary values)
 Status:             Open
 Type:               Bug
 Package:            Testing related
 Operating System:   Ubuntu 16.04 LTS on aarch64
 PHP Version:        7.1.1
 Block user comment: N
 Private report:     N

 New Comment:

This test[1] confuses binary strings and binary numbers, and
should better be rewritten or dropped, anyway.

Furthermore, and this is might be the reason for the reported test
failure, the test assumes that strncmp() would return exactly 1,
if the first string is greater than the second, but strncmp() only
guarantees that a positive integer is returned in this case.

[1] 
<https://github.com/php/php-src/blob/php-7.1.1/ext/standard/tests/strings/strncmp_variation6.phpt>


Previous Comments:
------------------------------------------------------------------------
[2017-02-10 21:42:05] edward dot vielmetti at gmail dot com

root@docker-build-test:/mnt/src/php/php-7.1.1/ext/standard/tests/strings# more 
strncmp*diff
774+ int(128)
774- int(1)

------------------------------------------------------------------------
[2017-02-10 21:19:41] ni...@php.net

What's the diff? (ext/standard/tests/strings/strncmp_variation6.diff)

------------------------------------------------------------------------
[2017-02-10 21:01:20] edward dot vielmetti at gmail dot com

Description:
------------
FAILED TEST SUMMARY
---------------------------------------------------------------------
Test strncmp() function : usage variations - binary safe(binary values) 
[ext/standard/tests/strings/strncmp_variation6.phpt]

"make test" fails this one test on aarch64 (ARMv8, arm64) on Packet 2A 96-core 
system.



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



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

-- 
PHP Quality Assurance Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to